diff --git a/patches/elrs_backpack_1.5.9_udp_msp_ptr.patch b/patches/elrs_backpack_1.5.9_udp_msp_ptr.patch index 7501aeb..f6a1bf1 100644 --- a/patches/elrs_backpack_1.5.9_udp_msp_ptr.patch +++ b/patches/elrs_backpack_1.5.9_udp_msp_ptr.patch @@ -35,23 +35,25 @@ index 26b4013..77dd0fa 100644 #if defined(TARGET_TX_BACKPACK) bool SendTxBackpackTelemetryViaUDP(const uint8_t *data, uint16_t size) { -@@ -577,6 +603,7 @@ static void WebMAVLinkHandler(AsyncWebServerRequest *request) +@@ -577,6 +603,8 @@ static void WebMAVLinkHandler(AsyncWebServerRequest *request) json["counters"]["packets_up"] = stats->packets_uplink; json["counters"]["drops_down"] = stats->drops_downlink; json["counters"]["overflows_down"] = stats->overflows_downlink; + json["counters"]["ptr_packets"] = ptrPacketsCount; ++ json["custom_build"] = "steamframe-1.5.9-udp-msp-ptr-b2"; json["ports"]["listen"] = config.GetMavlinkListenPort(); json["ports"]["send"] = config.GetMavlinkSendPort(); if (gcsIPSet) { -@@ -792,6 +819,7 @@ static void startServices() +@@ -792,6 +820,8 @@ static void startServices() #if defined(MAVLINK_ENABLED) mavlinkUDP.begin(config.GetMavlinkListenPort()); #endif + ptrUDP.begin(14550); ++ DBGLN("SteamFrame custom build: steamframe-1.5.9-udp-msp-ptr-b2 (UDP :14550/:14555)"); servicesStarted = true; DBGLN("HTTPUpdateServer ready! Open http://%s.local in your browser", myHostname); -@@ -923,7 +951,7 @@ static void HandleWebUpdate() +@@ -923,7 +953,7 @@ static void HandleWebUpdate() last_mavlink_to_gcs_dump = millis(); } @@ -60,7 +62,7 @@ index 26b4013..77dd0fa 100644 if (wifiService == WIFI_SERVICE_MAVLINK_TX) { uint16_t packetSize = mavlinkUDP.parsePacket(); -@@ -932,13 +960,28 @@ static void HandleWebUpdate() +@@ -932,13 +962,28 @@ static void HandleWebUpdate() gcsIP = mavlinkUDP.remoteIP(); // store the IP of the GCS so we can send to it directly gcsIPSet = true; uint8_t buf[MAVLINK_MAX_PACKET_LEN]; diff --git a/src/gui.rs b/src/gui.rs index c849de8..012b8f0 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -336,7 +336,10 @@ impl eframe::App for SteamFrameGuiApp { egui::TopBottomPanel::top("top_status_bar") .show(ctx, |ui| { ui.horizontal_wrapped(|ui| { - ui.heading(RichText::new("🥽 SteamFrame FPV Control Center").strong()); + ui.heading( + RichText::new(concat!("🥽 SteamFrame FPV v", env!("CARGO_PKG_VERSION"))) + .strong(), + ); ui.separator(); let is_running = self diff --git a/src/gui_gpui.rs b/src/gui_gpui.rs index 557173f..0eab6b6 100644 --- a/src/gui_gpui.rs +++ b/src/gui_gpui.rs @@ -616,7 +616,7 @@ impl SteamFrameGpuiApp { .text_base() .font_weight(gpui::FontWeight::BOLD) .text_color(rgb(COLOR_CYAN)) - .child("🥽 SteamFrame FPV"), + .child(concat!("🥽 SteamFrame FPV v", env!("CARGO_PKG_VERSION"))), ) .child(self.render_status_badge("VRX", &self.usb_status)) .child(self.render_status_badge("VR", &self.xr_status)) diff --git a/src/main.rs b/src/main.rs index 6fc775e..63e4026 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,7 +25,8 @@ fn main() -> Result<()> { let log_buffer = GuiLogger::init(&cfg.log_file); log::info!( - "=== Démarrage de SteamFrame FPV v0.2 (Moteur IHM : {}, Fichier journal : {}) ===", + "=== Démarrage de SteamFrame FPV v{} (Moteur IHM : {}, Fichier journal : {}) ===", + env!("CARGO_PKG_VERSION"), cfg.gui_engine, cfg.log_file ); @@ -49,7 +50,10 @@ fn main() -> Result<()> { let native_options = eframe::NativeOptions { viewport: eframe::egui::ViewportBuilder::default() - .with_title("SteamFrame FPV - Eachine Sphere Link & RadioMaster Nomad") + .with_title(format!( + "SteamFrame FPV v{} - Eachine Sphere Link & RadioMaster Nomad", + env!("CARGO_PKG_VERSION") + )) .with_inner_size([1220.0, 820.0]) .with_min_inner_size([920.0, 620.0]), ..Default::default()