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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user