mirror of
https://github.com/bleackstorm/SteamFrame-FPV-Control-Center.git
synced 2026-12-03 07:31:57 +01:00
refactor(review): harden audio OnceLock/buffer, NaN-safe XR spatial anchor, and Copy VrxLinkStats
This commit is contained in:
1 parent
dfa142c2d1
commit
cf1197a33b
5 files changed
+78
-37
No files matched your search
@@ -42,7 +42,7 @@ const VRX_TIMEOUT_MS: u64 = 3000;
|
||||
const TOAST_DURATION_MS: u64 = 1500;
|
||||
|
||||
/// Télémétrie temps réel de la liaison radio WFB-ng et du SoC Radxa Zero 3W (`$VRX,...`).
|
||||
#[derive(Debug, Clone)]
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub struct VrxLinkStats {
|
||||
pub temp_c: f32,
|
||||
pub rssi_a_dbm: i16,
|
||||
@@ -421,7 +421,11 @@ impl G29BridgeReceiver {
|
||||
};
|
||||
|
||||
let mut st = state.lock();
|
||||
st.vrx.temp_c = if temp_c.is_finite() { temp_c } else { -1.0 };
|
||||
st.vrx.temp_c = if temp_c.is_finite() && (-40.0..=150.0).contains(&temp_c) {
|
||||
temp_c
|
||||
} else {
|
||||
-1.0
|
||||
};
|
||||
st.vrx.rssi_a_dbm = rssi_a.clamp(-127, 0);
|
||||
st.vrx.rssi_b_dbm = rssi_b.clamp(-127, 0);
|
||||
st.vrx.fec_recovered = fec_rec;
|
||||
|
||||
Reference in new issue
Block a user