Sync modem presets with current firmware
- Replace array-based modem configuration with preset dictionary
- Add missing SHORT_TURBO preset (500kHz, SF=7, CR=5)
- Fix coding rates to match firmware (CR=5 for most, CR=8 for LONG_MODERATE/SLOW)
- Add current_preset property for cleaner access throughout codebase
- Update all references from array indices to string-based preset names
- Add Docker support for testing without local environment setup
This brings the simulator in sync with the current Meshtastic firmware modem presets and improves maintainability with string-based configuration.
It looks like the coding rate (CR) was wrong for some of the configs.
Modem Preset Configuration Differences
| Preset Name | Index | Parameter | Original (Array-based) | New (Firmware-synced) | Change |
|---|---|---|---|---|---|
| SHORT_TURBO | 8 | Bandwidth | Not Available | 500 kHz | ✅ Added |
| SF | Not Available | 7 | ✅ Added | ||
| CR | Not Available | 5 | ✅ Added | ||
| Sensitivity | Not Available | -121.5 dBm | ✅ Added | ||
| SHORT_FAST | 0 | Bandwidth | 250 kHz | 250 kHz | No change |
| SF | 7 | 7 | No change | ||
| CR | 8 | 5 | ⚠️ Fixed | ||
| Sensitivity | -121.5 dBm | -121.5 dBm | No change | ||
| SHORT_SLOW | 1 | Bandwidth | 250 kHz | 250 kHz | No change |
| SF | 8 | 8 | No change | ||
| CR | 8 | 5 | ⚠️ Fixed | ||
| Sensitivity | -124.0 dBm | -124.0 dBm | No change | ||
| MEDIUM_FAST | 2 | Bandwidth | 250 kHz | 250 kHz | No change |
| SF | 9 | 9 | No change | ||
| CR | 8 | 5 | ⚠️ Fixed | ||
| Sensitivity | -126.5 dBm | -126.5 dBm | No change | ||
| MEDIUM_SLOW | 3 | Bandwidth | 250 kHz | 250 kHz | No change |
| SF | 10 | 10 | No change | ||
| CR | 8 | 5 | ⚠️ Fixed | ||
| Sensitivity | -129.0 dBm | -129.0 dBm | No change | ||
| LONG_FAST | 4 | Bandwidth | 250 kHz | 250 kHz | No change |
| SF | 11 | 11 | No change | ||
| CR | 8 | 5 | ⚠️ Fixed | ||
| Sensitivity | -131.5 dBm | -131.5 dBm | No change | ||
| LONG_MODERATE | 5 | Bandwidth | 125 kHz | 125 kHz | No change |
| SF | 11 | 11 | No change | ||
| CR | 8 | 8 | No change | ||
| Sensitivity | -134.5 dBm | -134.5 dBm | No change | ||
| LONG_SLOW | 6 | Bandwidth | 125 kHz | 125 kHz | No change |
| SF | 12 | 12 | No change | ||
| CR | 8 | 8 | No change | ||
| Sensitivity | -137.0 dBm | -137.0 dBm | No change | ||
| VERY_LONG_SLOW | 7 | Bandwidth | 62.5 kHz | 62.5 kHz | No change |
| SF | 12 | 12 | No change | ||
| CR | 8 | 8 | No change | ||
| Sensitivity | -140.0 dBm | -140.0 dBm | No change |
Looking good @powersjcb, thanks. Before merging I would like to keep the original Meshtastic logic only, so when you're ready can you remove the Burning Man-specific things?
It looks like the coding rate (CR) was wrong for some of the configs.
True, actually we changed this somewhere in firmware 2.4 I think. It's a non-breaking change as the CR is in the LoRa header, so you can change it on the fly even.
Hey @powersjcb, hope you had a good time at Burning Man.
If you have time, could you separate the optimizations from the Burning Man-specific changes so we could get this merged?