diff --git a/src/mesh/Default.cpp b/src/mesh/Default.cpp index 7f3d6c6e9..7a2d9e410 100644 --- a/src/mesh/Default.cpp +++ b/src/mesh/Default.cpp @@ -2,11 +2,7 @@ #include "meshUtils.h" -// Convert seconds to ms, clamping at INT32_MAX (~24.86 days). Callers store the -// result in uint32_t but the ultimate consumers (OSThread runOnce returns, -// `MAX_INTERVAL`, Apple-client interop per the FIXME at Default.h:14) treat it -// as int32_t. Saturating at INT32_MAX keeps every conversion well-defined and -// non-negative; no realistic interval (broadcast, throttle, sleep) needs more. +// Convert seconds to ms, clamping at INT32_MAX (~24.86 days) static inline uint32_t secondsToMsClamped(uint32_t secs) { constexpr uint32_t MAX_MS = static_cast(INT32_MAX); @@ -80,4 +76,4 @@ uint8_t Default::getConfiguredOrDefaultHopLimit(uint8_t configured) #else return (configured >= HOP_MAX) ? HOP_MAX : config.lora.hop_limit; #endif -} \ No newline at end of file +}