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:
@@ -1022,6 +1022,8 @@ bool MyMesh::formatFileSystem() {
|
||||
return LittleFS.format();
|
||||
#elif defined(ESP32)
|
||||
return SPIFFS.format();
|
||||
#elif defined(SIM_PLATFORM)
|
||||
return _fs->format();
|
||||
#else
|
||||
#error "need to implement file system erase"
|
||||
return false;
|
||||
@@ -1181,6 +1183,8 @@ void MyMesh::saveIdentity(const mesh::LocalIdentity &new_id) {
|
||||
IdentityStore store(*_fs, "/identity");
|
||||
#elif defined(RP2040_PLATFORM)
|
||||
IdentityStore store(*_fs, "/identity");
|
||||
#elif defined(SIM_PLATFORM)
|
||||
IdentityStore store(*_fs, "/identity");
|
||||
#else
|
||||
#error "need to define saveIdentity()"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user