feat(terrain,ci): add lost-model GPS, GPX trace, inclinometer, throttle expo/crawl, relay ping, log rotation & release CI

This commit is contained in:
bleackstorm committed 2026-11-26 12:15:20 +01:00
1 parent c83f90570f
commit 9f0c64f873
20 files changed
+926 -78

No files matched your search

+39
View File
@@ -167,6 +167,25 @@ impl OsdOverlay {
scale,
[255, 60, 60, 255],
);
// Mode « Véhicule Perdu » : afficher immédiatement la dernière position GPS valide connue
if extra.show_gps {
if let Some((lat, lon, _, sats)) = telem.last_valid_gps {
let mut last_gps_buf = StackStr::<64>::new();
let _ = write!(last_gps_buf, "LAST GPS {:.5},{:.5} ({}S)", lat, lon, sats);
let gx = (width as i32 / 2)
- ((last_gps_buf.as_str().chars().count() as i32 * 6 * scale as i32) / 2);
Self::draw_text(
rgba,
width,
height,
gx,
top_center_bottom + 2,
last_gps_buf.as_str(),
scale,
[255, 200, 50, 255],
);
}
}
} else {
Self::draw_heading_ribbon(
rgba,
@@ -331,6 +350,26 @@ impl OsdOverlay {
telem.drone_pitch_rad,
);
// Inclinomètre numérique (Pitch / Roll en degrés) avec alerte dévers crawler/aile (>= 25° orange, >= 35° rouge)
if telem.is_live() {
let pitch_deg = telem.drone_pitch_rad.to_degrees();
let roll_deg = telem.drone_roll_rad.to_degrees();
let max_tilt = pitch_deg.abs().max(roll_deg.abs());
let inc_color = if max_tilt >= 35.0 {
[255, 60, 60, 255]
} else if max_tilt >= 25.0 {
[255, 185, 45, 255]
} else {
[180, 230, 255, 220]
};
let mut inc_buf = StackStr::<32>::new();
let _ = write!(inc_buf, "P:{:+3.0}° R:{:+3.0}°", pitch_deg, roll_deg);
let ix = (width as i32 / 2)
- ((inc_buf.as_str().chars().count() as i32 * 6 * scale as i32) / 2);
let iy = (height as i32 / 2) + 52;
Self::draw_text(rgba, width, height, ix, iy, inc_buf.as_str(), scale, inc_color);
}
let bottom_y = height.saturating_sub(28 + 8 * scale) as i32;
let spd_kmh = telem.groundspeed_ms * 3.6;
let mut left_bottom_buf = StackStr::<48>::new();