Compare commits

...
4 Commits
Author SHA1 Message Date
mbirth cd68cf9f8f Show last intensity setting
FAP: Build for multiple SDK sources / ufbt: Build for release channel (push) Successful in 3m1s
FAP: Build for multiple SDK sources / ufbt: Build for dev channel (push) Successful in 2m58s
Signed-off-by: Markus Birth <markus@birth-online.de>
2026-08-15 01:29:17 +01:00
mbirth 0ce5c46659 Show last brush mode
Signed-off-by: Markus Birth <markus@birth-online.de>
2026-08-15 01:25:34 +01:00
mbirth 9d1faa9a23 Make var const
Signed-off-by: Markus Birth <markus@birth-online.de>
2026-08-15 01:25:28 +01:00
mbirth b7fc06ce5b Fix string lengths to fit one line
Signed-off-by: Markus Birth <markus@birth-online.de>
2026-08-15 01:21:12 +01:00
+40 -5
View File
@@ -44,17 +44,17 @@ void sonicare_scene_read_complete_on_enter(void* context) {
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",
"Prem. Plaque Def., Wt",
"Prem. Plaque Defence, B",
"Premium Gum Care, Wt",
"Premium Gum Care, Bk",
"Premium White, White",
"Premium White, Black",
"Optimal Plaque Defence, W",
"Opt. Plaque Defence, Wt",
"Optimal Gum Care, Wt", // 0x08
"Optimal White, White",
"Optimal White, Black",
"Optimal White (small), W",
"Opt. White (small), Wt",
"InterCare, White",
"InterCare (small), Wt",
"TongueCare+, White",
@@ -68,7 +68,14 @@ void sonicare_scene_read_complete_on_enter(void* context) {
"Gentle Clean, White"
};
int brush_names_max = sizeof(brush_names)/sizeof(brush_names[0]);
const int brush_names_max = sizeof(brush_names)/sizeof(brush_names[0]);
/* DEBUG STRING LENGTHS
for (int i=0; i<brush_names_max; i++) {
furi_string_cat_printf(temp_str, "\e#%s\n", brush_names[i]);
}
*/
if (brush_id < brush_names_max) {
furi_string_cat_printf(temp_str, "\e#%s\n", brush_names[brush_id]);
} else {
@@ -102,6 +109,34 @@ void sonicare_scene_read_complete_on_enter(void* context) {
// TODO: Maybe show "replace soon" marker if 170 brushes or more?
// TODO: Maybe show "replace head" marker if 180 brushes or more?
// Brush Mode
const char* brush_modes[] = {
"Clean",
"White+",
"Gum Health",
"Deep Clean+",
"Sensitive"
};
const uint8_t brush_mode = ul_data->page[0x24].data[3];
if (brush_mode<(sizeof(brush_modes)/sizeof(brush_modes[0]))) {
furi_string_cat_printf(temp_str, "Last mode: %s\n", brush_modes[brush_mode]);
} else {
furi_string_cat_printf(temp_str, "Unknown last mode: 0x%02x", brush_mode);
}
// Brush Intensity
const char* brush_intensities[] = {
"Low",
"Med",
"High"
};
const uint8_t brush_intensity = ul_data->page[0x24].data[2];
if (brush_intensity<(sizeof(brush_intensities)/sizeof(brush_intensities[0]))) {
furi_string_cat_printf(temp_str, "Last intensity: %s\n", brush_intensities[brush_intensity]);
} else {
furi_string_cat_printf(temp_str, "Unknown last intensity: 0x%02x", brush_intensity);
}
furi_string_cat_str(temp_str, "____________________\n");
// UID