mirror of
https://github.com/bleackstorm/SteamFrame-FPV-Control-Center.git
synced 2026-12-03 07:31:57 +01:00
feat(nomad): add editable network target, 50Hz manual mock, MAVLink protocol & ELRS Backpack UDP MSPv2 patch
This commit is contained in:
1 parent
7bee072e21
commit
e859d0e21c
7 files changed
+860
-57
No files matched your search
+12
-10
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user