feat: Add full flash (0x0) option to flasher offset combobox
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
1420bbcc74
commit
67a883dd0b
4 changed files with 6 additions and 5 deletions
|
|
@ -78,8 +78,9 @@ fn setup_flash(window: &MainWindow, ctx: &AppContext) {
|
||||||
let port = flasher.get_selected_prog_port().to_string();
|
let port = flasher.get_selected_prog_port().to_string();
|
||||||
let path = flasher.get_firmware_path().to_string();
|
let path = flasher.get_firmware_path().to_string();
|
||||||
let offset: u32 = match flasher.get_flash_offset_index() {
|
let offset: u32 = match flasher.get_flash_offset_index() {
|
||||||
0 => 0x20000, // factory
|
0 => 0x0, // full flash
|
||||||
1 => 0x220000, // ota_0
|
1 => 0x20000, // factory
|
||||||
|
2 => 0x220000, // ota_0
|
||||||
_ => 0x20000,
|
_ => 0x20000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ export global FlasherBridge {
|
||||||
in property <[string]> prog-ports;
|
in property <[string]> prog-ports;
|
||||||
in-out property <string> selected-prog-port: "";
|
in-out property <string> selected-prog-port: "";
|
||||||
in-out property <string> firmware-path: "";
|
in-out property <string> firmware-path: "";
|
||||||
in-out property <int> flash-offset-index: 0; // 0=factory(0x20000), 1=ota_0(0x220000)
|
in-out property <int> flash-offset-index: 1; // 0=full(0x0), 1=factory(0x20000), 2=ota_0(0x220000)
|
||||||
in property <float> flash-progress: 0;
|
in property <float> flash-progress: 0;
|
||||||
in property <string> flash-status: "";
|
in property <string> flash-status: "";
|
||||||
in property <bool> flashing: false;
|
in property <bool> flashing: false;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ export component TabFlasher inherits Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
DarkComboBox {
|
DarkComboBox {
|
||||||
model: ["factory (0x20000)", "ota_0 (0x220000)"];
|
model: ["full (0x0)", "factory (0x20000)", "ota_0 (0x220000)"];
|
||||||
current-index <=> FlasherBridge.flash-offset-index;
|
current-index <=> FlasherBridge.flash-offset-index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,7 @@ export component TabTools inherits Rectangle {
|
||||||
|
|
||||||
DarkComboBox {
|
DarkComboBox {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
model: ["factory (0x20000)", "ota\\_0 (0x220000)"];
|
model: ["full (0x0)", "factory (0x20000)", "ota\\_0 (0x220000)"];
|
||||||
current-index <=> FlasherBridge.flash-offset-index;
|
current-index <=> FlasherBridge.flash-offset-index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue