script: simplify service action methods

This commit is contained in:
th33xitus
2021-06-18 18:03:47 +02:00
parent 806c6fd275
commit 40875dfe49
6 changed files with 54 additions and 136 deletions

View File

@@ -286,18 +286,18 @@ select_mcu_id(){
}
flash_mcu(){
klipper_service "stop"
do_action_service "stop" "klipper"
if ! make flash FLASH_DEVICE="${mcu_list[$mcu_index]}" ; then
warn_msg "Flashing failed!"
warn_msg "Please read the console output above!"
else
ok_msg "Flashing successfull!"
fi
klipper_service "start"
do_action_service "start" "klipper"
}
flash_mcu_sd(){
klipper_service "stop"
do_action_service "stop" "klipper"
### write each supported board to the array to make it selectable
board_list=()
@@ -362,7 +362,7 @@ flash_mcu_sd(){
ok_msg "Flashing successfull!"
fi
klipper_service "start"
do_action_service "start" "klipper"
}
build_fw(){