|
|
@@ -260,60 +260,62 @@ static void screen_draw_settings(uint8_t sel)
|
|
|
|
|
|
if (select) {
|
|
|
if (selectedMenuItem->Focus == false)
|
|
|
- draw_diameter(select);
|
|
|
+ draw_diameter(select, true);
|
|
|
else {
|
|
|
if (blink == true) {
|
|
|
- oled_frame(MENU_1_STR_Y, true);
|
|
|
+ draw_diameter(true, false);
|
|
|
blink = false;
|
|
|
}
|
|
|
else {
|
|
|
- draw_diameter(select);
|
|
|
+ draw_diameter(select, true);
|
|
|
blink = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
- draw_diameter(select);
|
|
|
+ draw_diameter(select, true);
|
|
|
|
|
|
|
|
|
select = sel == MCELL_K2 ? true : false;
|
|
|
|
|
|
if (select) {
|
|
|
if (selectedMenuItem->Focus == false)
|
|
|
- draw_gearbox(select);
|
|
|
+ draw_gearbox(select, true);
|
|
|
else {
|
|
|
if (blink == true) {
|
|
|
- oled_frame(MENU_3_STR_Y, true);
|
|
|
+ //oled_frame(MENU_3_STR_Y, true);
|
|
|
+ draw_gearbox(select, false);
|
|
|
blink = false;
|
|
|
}
|
|
|
else {
|
|
|
- draw_gearbox(select);
|
|
|
+ draw_gearbox(select, true);
|
|
|
blink = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
- draw_gearbox(select);
|
|
|
+ draw_gearbox(select, true);
|
|
|
|
|
|
|
|
|
select = sel == MCELL_REV ? true : false;
|
|
|
|
|
|
if (select) {
|
|
|
if (selectedMenuItem->Focus == false)
|
|
|
- draw_revers(select);
|
|
|
+ draw_revers(select, true);
|
|
|
else {
|
|
|
if (blink == true) {
|
|
|
- oled_frame(MENU_5_STR_Y, false);
|
|
|
+ //oled_frame(MENU_5_STR_Y, false);
|
|
|
+ draw_revers(select, false);
|
|
|
blink = false;
|
|
|
}
|
|
|
else {
|
|
|
- draw_revers(select);
|
|
|
+ draw_revers(select, true);
|
|
|
blink = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else
|
|
|
- draw_revers(select);
|
|
|
+ draw_revers(select, true);
|
|
|
|
|
|
|
|
|
select = sel == MCELL_RES ? true : false;
|
|
|
@@ -327,37 +329,46 @@ static void screen_draw_settings(uint8_t sel)
|
|
|
#endif
|
|
|
|
|
|
//
|
|
|
-void draw_diameter(bool frame)
|
|
|
+void draw_diameter(bool frame, bool is_value)
|
|
|
{
|
|
|
memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
Paint_DrawString_EN(4, MENU_1_STR_Y, "Diameter:", &Font16, 0xf, 0x0);
|
|
|
memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
- oled_int_right_alignment_post(settings.factor_1, 11, (char*)"mm", screen_str_buf);
|
|
|
- Paint_DrawString_EN(4, MENU_2_STR_Y, screen_str_buf, &Font16, 0xf, 0x0);
|
|
|
+ if (is_value) {
|
|
|
+ oled_int_right_alignment_post(settings.factor_1, 11, (char*)"mm", screen_str_buf);
|
|
|
+ Paint_DrawString_EN(4, MENU_2_STR_Y, screen_str_buf, &Font16, 0xf, 0x0);
|
|
|
+ }
|
|
|
if (frame)
|
|
|
oled_frame(MENU_1_STR_Y, true);
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-void draw_gearbox(bool frame)
|
|
|
+void draw_gearbox(bool frame, bool is_value)
|
|
|
{
|
|
|
memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
Paint_DrawString_EN(4, MENU_3_STR_Y, "Gearbox:", &Font16, 0xf, 0x0);
|
|
|
memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
- oled_int_right_alignment(settings.factor_2, 11, screen_str_buf);
|
|
|
- Paint_DrawString_EN(4, MENU_4_STR_Y, screen_str_buf, &Font16, 0xf, 0x0);
|
|
|
+ if (is_value) {
|
|
|
+ oled_int_right_alignment(settings.factor_2, 11, screen_str_buf);
|
|
|
+ Paint_DrawString_EN(4, MENU_4_STR_Y, screen_str_buf, &Font16, 0xf, 0x0);
|
|
|
+ }
|
|
|
if (frame)
|
|
|
oled_frame(MENU_3_STR_Y, true);
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-void draw_revers(bool frame)
|
|
|
+void draw_revers(bool frame, bool is_value)
|
|
|
{
|
|
|
memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
- if (settings.revers == true)
|
|
|
- Paint_DrawString_EN(4, MENU_5_STR_Y, "Revers: yes", &Font16, 0xf, 0x0);
|
|
|
- else
|
|
|
- Paint_DrawString_EN(4, MENU_5_STR_Y, "Revers: no", &Font16, 0xf, 0x0);
|
|
|
+ if (is_value) {
|
|
|
+ if (settings.revers == true)
|
|
|
+ Paint_DrawString_EN(4, MENU_5_STR_Y, "Revers: yes", &Font16, 0xf, 0x0);
|
|
|
+ else
|
|
|
+ Paint_DrawString_EN(4, MENU_5_STR_Y, "Revers: no", &Font16, 0xf, 0x0);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ Paint_DrawString_EN(4, MENU_5_STR_Y, "Revers:", &Font16, 0xf, 0x0);
|
|
|
+ }
|
|
|
if (frame)
|
|
|
oled_frame(MENU_5_STR_Y, false);
|
|
|
}
|