Add per-profile TX routing and bridge filtering

Persist Companion TX preferences per contact and channel. Default repeater,
room, and sensor replies to both active TX profiles, with a reply-only force
option for an RX-only secondary profile. Track both reply copies before a
temporary-radio handoff and account for OTA copies under queue backpressure.

Add bridge/crossover filter modes and the third built-in wardriving filter,
plus compact filter CLI syntax, documentation, and CI coverage.

Fix quoted target names being interpreted as slot/key selectors, partial
recovery of invalid saved reply settings, filter suspension during tempradio2,
and unnecessary packet allocation while OTA traffic is throttled.

Validation: 1,477 native tests, 52 Python integration tests, 29 filter UI tests,
and five firmware builds covering ESP32, nRF52, and STM32 passed.
This commit is contained in:
mikecarper
2026-09-15 01:58:43 -07:00
parent 0e0aa8e014
commit 95aca52b4e
60 changed files with 3188 additions and 362 deletions
+21
View File
@@ -240,6 +240,9 @@ public:
#define MSG_SEND_SENT_DIRECT 2
#define ADV_TYPE_ROOM 3
class BaseChatMesh : public mesh::Mesh {
uint32_t getTransmitAirtime(const mesh::Packet* packet) const {
return _radio->getEstAirtimeFor(packet->getRawLength());
}
struct Radio { uint32_t getEstAirtimeFor(int) { return 20; } } radio;
struct Clock { uint32_t getCurrentTimeUnique() { return 100; } } clock;
struct Rng { void random(uint8_t* data, size_t size) { memset(data, 42, size); } } rng;
@@ -638,7 +641,25 @@ static void nrf52_migration_snapshots_and_failed_page_replacement() {
}
#endif
static void contact_tx_policy_round_trips_without_growing_records() {
Fixture f(1);
auto& contact = f.host.contacts[0];
assert(contact.tx_radio == mesh::RADIO_TX_AUTO);
for (uint8_t policy = mesh::RADIO_TX_AUTO; policy <= mesh::RADIO_TX_OFF; ++policy) {
contact.tx_radio = policy;
contact.shared_secret_valid = true;
uint8_t record[mesh::storage::CONTACT_RECORD_SIZE];
assert(serializeContactRecord(contact, record));
assert(sizeof(record) == 152 && record[66] == mesh::encodeRadioTxPolicy(policy));
ContactInfo restored;
assert(deserializeContactRecord(record, restored, 0));
assert(restored.tx_radio == policy && !restored.shared_secret_valid);
assert(contact.shared_secret_valid && contact.tx_radio == policy);
}
}
int main() {
contact_tx_policy_round_trips_without_growing_records();
#if defined(ESP32_PLATFORM)
routes_survive_eviction_and_full_sync();
snapshot_rollback_and_dirty_eviction();