[FL-1905] Fix power off notification (#748)
* view dispatcher: add set view front API * power: add power off notification * Gui: rename ViewPort `send_to` API. * Makefile: add blackmagick support Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -3,8 +3,13 @@
|
||||
#include "furi-hal-power.h"
|
||||
#include "furi-hal-boot.h"
|
||||
|
||||
void power_off() {
|
||||
void power_off(Power* power) {
|
||||
furi_hal_power_off();
|
||||
// Notify user if USB is plugged
|
||||
view_dispatcher_send_to_front(power->view_dispatcher);
|
||||
view_dispatcher_switch_to_view(power->view_dispatcher, PowerViewPopup);
|
||||
osDelay(10);
|
||||
furi_crash("Disconnect USB for safe shutdown");
|
||||
}
|
||||
|
||||
void power_reboot(PowerBootMode mode) {
|
||||
|
Reference in New Issue
Block a user