mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-09-14 15:16:40 +00:00
feat(sim): two-device messaging + repeater relay over a JS ether
Ports examples/simple_repeater to variants/sim/ (new sim_simple_repeater native env + build_wasm_repeater.sh) and adds a JS "ether" (variants/sim/web/mesh.html) that bridges two real companion_radio WASM instances through a real simple_repeater instance in a strict A<->R<->B topology (no direct A-B link), proving genuine relay routing rather than a shortcut. Also fixes multi-instance issues Phase 2's single-instance design never surfaced: SimDisplayDriver's canvas context/id caching was keyed on a single global instead of per-instance, and both wasm builds were missing _malloc/_free/HEAPU8 runtime exports needed for the ether to poke bytes into an instance's memory. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,18 @@ public:
|
||||
virtual long getHDOP() { return -1; }
|
||||
virtual bool isValid() = 0;
|
||||
virtual long getTimestamp() = 0;
|
||||
virtual void sendSentence(const char * sentence);
|
||||
// Default no-op body (every existing subclass overrides this anyway --
|
||||
// MicroNMEALocationProvider.h forwards to the NMEA lib,
|
||||
// EnvironmentSensorManager.cpp's GPS classes no-op it explicitly) --
|
||||
// previously declared with NO definition anywhere in the codebase
|
||||
// (confirmed by repo-wide grep), which is latently a hard link error
|
||||
// ("undefined symbol: typeinfo for LocationProvider") for ANY subclass
|
||||
// that doesn't override it, since base-subobject construction of any
|
||||
// LocationProvider-derived object needs this class's own vtable/RTTI to
|
||||
// exist as a real linkable symbol. Surfaced by variants/sim's
|
||||
// SimLocationProvider (Phase 3 of the sim plan) being the first
|
||||
// consumer to construct one outside of code that always overrides it.
|
||||
virtual void sendSentence(const char * sentence) { }
|
||||
virtual void reset() = 0;
|
||||
virtual void begin() = 0;
|
||||
virtual void stop() = 0;
|
||||
|
||||
Reference in New Issue
Block a user