diff --git a/src/flasher.rs b/src/flasher.rs index 924f494..2090488 100644 --- a/src/flasher.rs +++ b/src/flasher.rs @@ -78,8 +78,9 @@ fn setup_flash(window: &MainWindow, ctx: &AppContext) { let port = flasher.get_selected_prog_port().to_string(); let path = flasher.get_firmware_path().to_string(); let offset: u32 = match flasher.get_flash_offset_index() { - 0 => 0x20000, // factory - 1 => 0x220000, // ota_0 + 0 => 0x0, // full flash + 1 => 0x20000, // factory + 2 => 0x220000, // ota_0 _ => 0x20000, }; diff --git a/ui/globals.slint b/ui/globals.slint index 60d1908..591f0f7 100644 --- a/ui/globals.slint +++ b/ui/globals.slint @@ -264,7 +264,7 @@ export global FlasherBridge { in property <[string]> prog-ports; in-out property selected-prog-port: ""; in-out property firmware-path: ""; - in-out property flash-offset-index: 0; // 0=factory(0x20000), 1=ota_0(0x220000) + in-out property flash-offset-index: 1; // 0=full(0x0), 1=factory(0x20000), 2=ota_0(0x220000) in property flash-progress: 0; in property flash-status: ""; in property flashing: false; diff --git a/ui/tabs/tab_flasher.slint b/ui/tabs/tab_flasher.slint index 146dfbd..5342fa6 100644 --- a/ui/tabs/tab_flasher.slint +++ b/ui/tabs/tab_flasher.slint @@ -91,7 +91,7 @@ export component TabFlasher inherits Rectangle { } DarkComboBox { - model: ["factory (0x20000)", "ota_0 (0x220000)"]; + model: ["full (0x0)", "factory (0x20000)", "ota_0 (0x220000)"]; current-index <=> FlasherBridge.flash-offset-index; } } diff --git a/ui/tabs/tab_tools.slint b/ui/tabs/tab_tools.slint index 99b7cb0..106094a 100644 --- a/ui/tabs/tab_tools.slint +++ b/ui/tabs/tab_tools.slint @@ -214,7 +214,7 @@ export component TabTools inherits Rectangle { DarkComboBox { width: 200px; - model: ["factory (0x20000)", "ota\\_0 (0x220000)"]; + model: ["full (0x0)", "factory (0x20000)", "ota\\_0 (0x220000)"]; current-index <=> FlasherBridge.flash-offset-index; }