feat(nomad): add editable network target, 50Hz manual mock, MAVLink protocol & ELRS Backpack UDP MSPv2 patch

This commit is contained in:
bleackstorm committed 2026-11-15 13:07:41 +01:00
1 parent 7bee072e21
commit e859d0e21c
7 files changed
+860 -57

No files matched your search

+12 -10
View File
@@ -3,7 +3,7 @@ use crate::dome_projection::ProjectionMode;
use crate::dvr::{DvrContainer, DvrMode};
use crate::engine::{FpvEngineController, LiveOpticalParams, SubsystemStatus};
use crate::logger::{LogBuffer, LogFilter};
use crate::nomad_elrs::NomadHeadTracker;
use crate::nomad_elrs::{NomadHeadTracker, NomadProtocol};
use eframe::egui::{self, Color32, RichText, TextureHandle, TextureOptions};
use log::Level;
use parking_lot::Mutex;
@@ -172,19 +172,20 @@ impl SteamFrameGuiApp {
}
fn test_nomad_udp_packet(&self) {
let protocol = NomadProtocol::from_str(&self.cfg.ht_protocol);
log::info!(
"[Test Nomad] Envoi d'un paquet de test Head-Tracking (neutre 992) vers {}:{}...",
"[Test Nomad] Envoi d'un paquet de test ({}) vers {}:{}...",
protocol.label(),
self.cfg.nomad_ip,
self.cfg.nomad_port
);
let use_crsf = self.cfg.ht_protocol.eq_ignore_ascii_case("crsf");
match NomadHeadTracker::new(
&self.cfg.nomad_ip,
self.cfg.nomad_port,
self.cfg.max_pan_deg,
self.cfg.max_tilt_deg,
self.cfg.max_roll_deg,
use_crsf,
protocol,
) {
Ok(mut ht) => match ht.send_pose(glam::Quat::IDENTITY) {
Ok(sample) => {
@@ -752,22 +753,23 @@ impl eframe::App for SteamFrameGuiApp {
ui.label("Protocole Head-Track :");
egui::ComboBox::from_id_salt("ht_proto_combo")
.selected_text(if self.cfg.ht_protocol == "crsf" {
"CRSF (0x16)"
} else {
"MSPv2 PTR (0x0383)"
})
.selected_text(NomadProtocol::from_str(&self.cfg.ht_protocol).label())
.show_ui(ui, |ui| {
ui.selectable_value(
&mut self.cfg.ht_protocol,
"msp".to_string(),
"MSPv2 PTR (0x0383 - Recommandé)",
"MSPv2 PTR (0x0383 - Backpack AP)",
);
ui.selectable_value(
&mut self.cfg.ht_protocol,
"crsf".to_string(),
"CRSF RC_CHANNELS_PACKED (0x16)",
);
ui.selectable_value(
&mut self.cfg.ht_protocol,
"mavlink".to_string(),
"MAVLink v1 RC Override (UDP 14555)",
);
});
ui.end_row();