@@ -63,7 +63,7 @@ use crate::{
6363#[ cfg( feature = "espflash" ) ]
6464use crate :: keybinds:: esp_methods:: * ;
6565#[ cfg( feature = "espflash" ) ]
66- use crate :: serial:: esp:: EspEvent ;
66+ use crate :: serial:: esp:: { EspEvent , EspRestartType } ;
6767#[ cfg( feature = "espflash" ) ]
6868use crate :: tui:: esp:: espflash_buttons;
6969#[ cfg( feature = "espflash" ) ]
@@ -1045,12 +1045,21 @@ impl App {
10451045
10461046 #[ cfg( feature = "espflash" ) ]
10471047 _ if m == ESP_HARD_RESET => {
1048- self . serial . esp_restart ( false ) . unwrap ( ) ;
1048+ self . serial . esp_restart ( EspRestartType :: UserCode ) . unwrap ( ) ;
10491049 }
10501050
10511051 #[ cfg( feature = "espflash" ) ]
10521052 _ if m == ESP_BOOTLOADER => {
1053- self . serial . esp_restart ( true ) . unwrap ( ) ;
1053+ self . serial
1054+ . esp_restart ( EspRestartType :: Bootloader { active : true } )
1055+ . unwrap ( ) ;
1056+ }
1057+
1058+ #[ cfg( feature = "espflash" ) ]
1059+ _ if m == ESP_BOOTLOADER_UNCHECKED => {
1060+ self . serial
1061+ . esp_restart ( EspRestartType :: Bootloader { active : false } )
1062+ . unwrap ( ) ;
10541063 }
10551064
10561065 #[ cfg( feature = "espflash" ) ]
@@ -1601,6 +1610,9 @@ impl App {
16011610 } else {
16021611 match selected {
16031612 0 => self . run_method_from_string ( ESP_HARD_RESET ) . unwrap ( ) ,
1613+ 1 if ctrl_pressed || shift_pressed => self
1614+ . run_method_from_string ( ESP_BOOTLOADER_UNCHECKED )
1615+ . unwrap ( ) ,
16041616 1 => self . run_method_from_string ( ESP_BOOTLOADER ) . unwrap ( ) ,
16051617 2 => self . run_method_from_string ( ESP_DEVICE_INFO ) . unwrap ( ) ,
16061618 3 => {
@@ -2281,6 +2293,26 @@ impl App {
22812293 bins_area,
22822294 & mut self . popup_table_state ,
22832295 ) ;
2296+
2297+ if let Some ( profile) = self
2298+ . popup_table_state
2299+ . selected ( )
2300+ . and_then ( |idx| self . espflash . profile_from_index ( idx) )
2301+ {
2302+ let hint_text = match profile {
2303+ esp:: EspProfile :: Bins ( _) => "Flash profile binaries to ESP Flash." ,
2304+ esp:: EspProfile :: Elf ( profile) if profile. ram => {
2305+ "Load profile ELF into RAM."
2306+ }
2307+ esp:: EspProfile :: Elf ( _) => "Flash profile ELF to ESP Flash." ,
2308+ } ;
2309+ render_scrolling_line (
2310+ hint_text,
2311+ frame,
2312+ scrolling_text_area,
2313+ & mut self . popup_desc_scroll ,
2314+ ) ;
2315+ }
22842316 } else {
22852317 frame. render_stateful_widget (
22862318 esp:: espflash_buttons ( & mut self . popup_table_state ) ,
@@ -2292,6 +2324,23 @@ impl App {
22922324 self . espflash . profiles_table ( & mut self . popup_table_state ) ,
22932325 bins_area,
22942326 ) ;
2327+
2328+ let hints = [
2329+ "Attempt to remotely reset the chip." ,
2330+ "Attempt to reboot into bootloader. Shift/Ctrl to skip check." ,
2331+ "Query ESP for Flash Size, MAC Address, etc." ,
2332+ "Erase all flash contents." ,
2333+ ] ;
2334+ if let Some ( idx) = self . popup_table_state . selected ( ) {
2335+ if let Some ( & hint_text) = hints. get ( idx) {
2336+ render_scrolling_line (
2337+ hint_text,
2338+ frame,
2339+ scrolling_text_area,
2340+ & mut self . popup_desc_scroll ,
2341+ ) ;
2342+ }
2343+ }
22952344 }
22962345 frame. render_widget (
22972346 Line :: raw ( "Flash Profiles | Ctrl+R: Reload" )
0 commit comments