script: refactoring of the flash routine

script: uart devices can be detected/selected now

script: first implementation of a little help page
This commit is contained in:
th33xitus
2021-09-12 16:14:00 +02:00
parent 9463b719e4
commit fb4367bb41
4 changed files with 296 additions and 263 deletions

View File

@@ -13,8 +13,8 @@ advanced_ui(){
echo -e "| | System: | "
echo -e "| Firmware: | 8) [Change hostname] | "
echo -e "| 3) [Build only] | | "
echo -e "| 4) [Build + Flash] | Extensions: | "
echo -e "| 5) [Build + SD Flash] | 9) [Shell Command] | "
echo -e "| 4) [Flash only] | Extensions: | "
echo -e "| 5) [Build + Flash] | 9) [Shell Command] | "
echo -e "| 6) [Get MCU ID] | | "
echo -e "| | CustomPiOS: | "
echo -e "| | 10) [Migration Helper] | "
@@ -41,25 +41,16 @@ advanced_menu(){
3)
do_action "build_fw" "advanced_ui";;
4)
clear && print_header
flash_routine
if [ $FLASH_FIRMWARE = "true" ]; then
status_msg "Please wait..." && sleep 3 && build_fw
select_mcu_id
fi
print_msg && clear_msg
advanced_ui;;
do_action "select_flash_method" "advanced_ui";;
5)
clear && print_header
flash_routine_sd
if [ $FLASH_FW_SD = "true" ]; then
status_msg "Please wait..." && sleep 3 && build_fw
select_mcu_id
fi
status_msg "Please wait..."
build_fw
select_flash_method
print_msg && clear_msg
advanced_ui;;
6)
do_action "get_mcu_id" "advanced_ui";;
do_action "select_mcu_connection" "advanced_ui";;
7)
do_action "ms_theme_menu";;
8)

View File

@@ -1,6 +1,6 @@
#ui total width = 57 chars
top_border(){
echo -e "/=======================================================\ "
echo -e "/=======================================================\\"
}
bottom_border(){
@@ -8,7 +8,7 @@ bottom_border(){
}
blank_line(){
echo -e "| | "
echo -e "| |"
}
hr(){
@@ -17,13 +17,19 @@ hr(){
quit_footer(){
hr
echo -e "| ${red}Q) Quit${default} | "
echo -e "| ${red}Q) Quit${default} |"
bottom_border
}
back_footer(){
hr
echo -e "| ${green}B) Back${default} | "
echo -e "| ${green}B) « Back${default} |"
bottom_border
}
back_help_footer(){
hr
echo -e "| ${green}B) « Back${default} | ${yellow}H) Help [?]${default} |"
bottom_border
}