diff --git a/examples/companion_radio/MyMesh.h b/examples/companion_radio/MyMesh.h index 3b02f5f6..cb733267 100644 --- a/examples/companion_radio/MyMesh.h +++ b/examples/companion_radio/MyMesh.h @@ -150,6 +150,10 @@ protected: uint32_t calcFloodTimeoutMillisFor(uint32_t pkt_airtime_millis) const override; uint32_t calcDirectTimeoutMillisFor(uint32_t pkt_airtime_millis, uint8_t path_len) const override; + uint32_t getCADFailMaxDuration() const override { + if (_radio->isJapanMode()) return UINT32_MAX; // JP LBT: no forced TX — channel must be free per ARIB STD-T108 + return Dispatcher::getCADFailMaxDuration(); + } void onSendTimeout() override; // DataStoreHost methods diff --git a/examples/simple_repeater/MyMesh.h b/examples/simple_repeater/MyMesh.h index 88729ea7..98a71153 100644 --- a/examples/simple_repeater/MyMesh.h +++ b/examples/simple_repeater/MyMesh.h @@ -142,6 +142,10 @@ protected: void logTx(mesh::Packet* pkt, int len) override; void logTxFail(mesh::Packet* pkt, int len) override; int calcRxDelay(float score, uint32_t air_time) const override; + uint32_t getCADFailMaxDuration() const override { + if (_radio->isJapanMode()) return UINT32_MAX; // JP LBT: no forced TX — channel must be free per ARIB STD-T108 + return Dispatcher::getCADFailMaxDuration(); + } uint32_t getRetransmitDelay(const mesh::Packet* packet) override; uint32_t getDirectRetransmitDelay(const mesh::Packet* packet) override; diff --git a/examples/simple_room_server/MyMesh.h b/examples/simple_room_server/MyMesh.h index e888bfa5..131e3566 100644 --- a/examples/simple_room_server/MyMesh.h +++ b/examples/simple_room_server/MyMesh.h @@ -130,6 +130,11 @@ protected: void logTxFail(mesh::Packet* pkt, int len) override; int calcRxDelay(float score, uint32_t air_time) const override; + uint32_t getCADFailMaxDuration() const override { + if (_radio->isJapanMode()) return UINT32_MAX; // JP LBT: no forced TX — channel must be free per ARIB STD-T108 + return Dispatcher::getCADFailMaxDuration(); + } + const char* getLogDateTime() override; uint32_t getRetransmitDelay(const mesh::Packet* packet) override; uint32_t getDirectRetransmitDelay(const mesh::Packet* packet) override; diff --git a/examples/simple_sensor/SensorMesh.h b/examples/simple_sensor/SensorMesh.h index bb786b2a..7a1b8b1b 100644 --- a/examples/simple_sensor/SensorMesh.h +++ b/examples/simple_sensor/SensorMesh.h @@ -116,6 +116,10 @@ protected: float getAirtimeBudgetFactor() const override; bool allowPacketForward(const mesh::Packet* packet) override; int calcRxDelay(float score, uint32_t air_time) const override; + uint32_t getCADFailMaxDuration() const override { + if (_radio->isJapanMode()) return UINT32_MAX; // JP LBT: no forced TX — channel must be free per ARIB STD-T108 + return Dispatcher::getCADFailMaxDuration(); + } uint32_t getRetransmitDelay(const mesh::Packet* packet) override; uint32_t getDirectRetransmitDelay(const mesh::Packet* packet) override; int getInterferenceThreshold() const override; diff --git a/src/Dispatcher.h b/src/Dispatcher.h index d32633f1..5c362c2d 100644 --- a/src/Dispatcher.h +++ b/src/Dispatcher.h @@ -40,6 +40,7 @@ public: virtual int getMaxTextLen() const { return 10 * 16; } // default: non-JP virtual int getMaxGroupTextLen() const { return 10 * 16; } // default: non-JP + virtual bool isJapanMode() const { return false; } // default: non-JP /** * \brief starts the raw packet send. (no wait)