fix(llcc68): align airtime estimate with radio config

Calculate LoRa airtime from the exact LDRO value supplied to SetModulationParams instead of inferring it from symbol time.

Keep transmit_result airtime in microseconds for both LoRa and GFSK, using integer Hz math and 64-bit ceil division to avoid truncation errors.

Reapply modulation parameters during async TX flush so the estimator and the bytes sent to the radio stay in sync, and add a compile-time check for the intended SF7/BW125 implicit 6-byte airtime.
This commit is contained in:
2026-05-25 12:54:15 +08:00
parent d8db9e1eb0
commit 32a0c80ab0
3 changed files with 86 additions and 33 deletions
+2 -2
View File
@@ -14,7 +14,7 @@
namespace app::driver::llcc68 {
struct LLCC68;
using airtime_t = std::chrono::duration<uint32_t, std::micro>;
using airtime_t = std::chrono::microseconds;
using error_code = std::error_code;
enum class Errc : uint8_t {
@@ -1097,7 +1097,7 @@ struct transmit_result {
error_code post_action();
LLCC68 *self{};
std::chrono::milliseconds airtime_estimated;
airtime_t airtime_estimated;
};
} // namespace app::driver::llcc68