mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-20 04:54:45 -07:00
Add Ability to Display MAC
This commit is contained in:
@@ -29,6 +29,8 @@ bool findmy_state_load(FindMyState* out_state) {
|
||||
if(!flipper_format_read_uint32(file, "transmit_power", &tmp, 1)) break;
|
||||
state.transmit_power = tmp;
|
||||
|
||||
if(!flipper_format_read_bool(file, "show_mac", &state.show_mac, 1)) break;
|
||||
|
||||
if(!flipper_format_read_uint32(file, "tag_type", &tmp, 1)) {
|
||||
// Support migrating from old config
|
||||
tmp = FindMyTypeApple;
|
||||
@@ -53,7 +55,7 @@ bool findmy_state_load(FindMyState* out_state) {
|
||||
state.beacon_active = false;
|
||||
state.broadcast_interval = 5;
|
||||
state.transmit_power = 6;
|
||||
|
||||
state.show_mac = false;
|
||||
state.tag_type = FindMyTypeApple;
|
||||
|
||||
// Set default mac
|
||||
@@ -102,6 +104,7 @@ void findmy_state_apply(FindMyState* state) {
|
||||
furi_check(
|
||||
furi_hal_bt_extra_beacon_set_data(state->data, findmy_state_data_size(state->tag_type)));
|
||||
|
||||
|
||||
if(state->beacon_active) {
|
||||
furi_check(furi_hal_bt_extra_beacon_start());
|
||||
}
|
||||
@@ -135,6 +138,8 @@ void findmy_state_save(FindMyState* state) {
|
||||
tmp = state->tag_type;
|
||||
if(!flipper_format_write_uint32(file, "tag_type", &tmp, 1)) break;
|
||||
|
||||
if(!flipper_format_write_bool(file, "show_mac", &state->show_mac, 1)) break;
|
||||
|
||||
if(!flipper_format_write_hex(file, "mac", state->mac, sizeof(state->mac))) break;
|
||||
|
||||
if(!flipper_format_write_hex(
|
||||
|
||||
Reference in New Issue
Block a user