Compare commits

...
2 Commits
Author SHA1 Message Date
mbirth 8cd7da7949 Show brush type instead of "NTAG213" header
FAP: Build for multiple SDK sources / ufbt: Build for release channel (push) Successful in 3m12s
FAP: Build for multiple SDK sources / ufbt: Build for dev channel (push) Successful in 3m15s
Signed-off-by: Markus Birth <markus@birth-online.de>
2026-08-15 01:05:07 +01:00
mbirth 4a65c603c8 Copy mode and intensity settings before reset
Signed-off-by: Markus Birth <markus@birth-online.de>
2026-08-15 00:44:05 +01:00
2 changed files with 41 additions and 3 deletions
+35 -3
View File
@@ -34,15 +34,47 @@ void sonicare_scene_read_complete_on_enter(void* context) {
widget_reset(widget);
const NfcDevice* nfc_device = app->nfc_device;
FURI_LOG_D("sonicare_scene_read_complete", "Pulling Mifare Ultralight data from NFC device");
const MfUltralightData* ul_data = app->nfc_data;
FURI_LOG_D("sonicare_scene_read_complete", "Alloc'ing temp_str for output");
FuriString* temp_str = furi_string_alloc();
furi_string_cat_printf(temp_str, "\e#%s\n", nfc_device_get_name(nfc_device, NfcDeviceNameTypeFull));
// Brush type and colour
const uint8_t brush_id = ul_data->page[0x1f].data[2];
const char* brush_names[] = {
"Unknown brush: 0x00",
"Prem. Plaque Defence, Wt",
"Prem. Plaque Defence, Bk",
"Premium Gum Care, Wt",
"Premium Gum Care, Bk",
"Premium White, White",
"Premium White, Black",
"Optimal Plaque Defence, W",
"Optimal Gum Care, Wt", // 0x08
"Optimal White, White",
"Optimal White, Black",
"Optimal White (small), W",
"InterCare, White",
"InterCare (small), Wt",
"TongueCare+, White",
"TongueCare+, Black",
"A3 Prem. All-in-One, Wt", // 0x10
"A3 Prem. All-in-One, Bk",
"SimplyClean, White",
"ProResults, White",
"Sensitive, White",
"Sensitive, Black",
"Gentle Clean, White"
};
int brush_names_max = sizeof(brush_names)/sizeof(brush_names[0]);
if (brush_id < brush_names_max) {
furi_string_cat_printf(temp_str, "\e#%s\n", brush_names[brush_id]);
} else {
furi_string_cat_printf(temp_str, "\e#Unknown brush: 0x%02x\n", brush_id);
}
// UID
furi_string_cat_str(temp_str, "UID:");
format_bytes(temp_str, ul_data->iso14443_3a_data->uid, ul_data->iso14443_3a_data->uid_len);
+6
View File
@@ -39,10 +39,16 @@ static NfcCommand sonicare_scene_reset_poller_callback(NfcGenericEvent event, vo
} else if(ev->type == MfUltralightPollerEventTypeAuthSuccess) {
FURI_LOG_I("sonicare_scene_reset", "Auth success, writing page 0x24");
const MfUltralightData* ul_data = app->nfc_data;
MfUltralightPoller* poller = (MfUltralightPoller*)event.instance;
// Official reset: write page 0x24 = {00 00 02 00}
MfUltralightPage page = {.data = {0x00, 0x00, 0x02, 0x00}};
// copy mode and intensity settings
page.data[2] = ul_data->page[SONICARE_PAGE_USAGE].data[2];
page.data[3] = ul_data->page[SONICARE_PAGE_USAGE].data[3];
MfUltralightError err =
mf_ultralight_poller_write_page(poller, SONICARE_PAGE_USAGE, &page);