Restores bt mac @ and adv name before quitting bad usb app

This commit is contained in:
yocvito
2023-02-01 12:01:55 +01:00
parent bf07d1d927
commit e4c642b72c
3 changed files with 28 additions and 6 deletions

View File

@@ -35,6 +35,15 @@ typedef enum BadUsbCustomEvent {
BadUsbCustomEventErrorBack
} BadUsbCustomEvent;
typedef struct {
uint8_t mac[BAD_USB_MAC_ADDRESS_LEN];
char name[BAD_USB_ADV_NAME_MAX_LEN + 1];
// number of bt keys before starting the app (all keys added in
// the bt keys file then will be removed)
uint16_t n_keys;
} BadUsbBtConfig;
struct BadUsbApp {
Gui* gui;
ViewDispatcher* view_dispatcher;
@@ -50,6 +59,7 @@ struct BadUsbApp {
ByteInput* byte_input;
uint8_t mac[BAD_USB_MAC_ADDRESS_LEN];
char name[BAD_USB_ADV_NAME_MAX_LEN + 1];
BadUsbBtConfig bt_old_config;
BadUsbAppError error;
FuriString* file_path;