Compare commits
4
Commits
58edc59ae6
...
cd68cf9f8f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd68cf9f8f
|
||
|
|
0ce5c46659
|
||
|
|
9d1faa9a23
|
||
|
|
b7fc06ce5b
|
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user