|
|
@@ -13,8 +13,10 @@
|
|
|
|
|
|
extern "C" {
|
|
|
#include "GFX_SSD1327.h"
|
|
|
+#include "GUI_Paint.h"
|
|
|
#include "fonts_old.h"
|
|
|
#include "message.h"
|
|
|
+#include "fonts.h"
|
|
|
}
|
|
|
|
|
|
|
|
|
@@ -93,7 +95,8 @@ void draw_main(uint8_t sel)
|
|
|
update_flag = true;
|
|
|
|
|
|
#ifdef SCREEN_MENU
|
|
|
- screen_draw_main(sel);
|
|
|
+ //screen_draw_main(sel);
|
|
|
+ screen_draw_settings(sel);
|
|
|
#endif
|
|
|
|
|
|
#ifdef KEYBOARD_MENU
|
|
|
@@ -175,16 +178,26 @@ static void screen_draw_main(uint8_t sel)
|
|
|
|
|
|
oled_clear(BLACK);
|
|
|
|
|
|
+ // Скругленная рамка и логотип
|
|
|
+ GFX_DrawRoundRectangle(0, 0, 127, 127, 5, 15);
|
|
|
+ Paint_DrawString_EN(45, 120, "Fly Electronics", &Font8, 0xf, 0x0);
|
|
|
+
|
|
|
+ // Total
|
|
|
+ memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
+ sprintf(screen_str_buf, "%d", total);
|
|
|
+ Paint_DrawString_EN(10, 52, screen_str_buf, &Font24, 0xf, 0x0);
|
|
|
+
|
|
|
+
|
|
|
+ //Paint_DrawString_EN(10, 52, "0.0", &Font24, 0xf, 0x0);
|
|
|
+
|
|
|
+#if 0
|
|
|
// Основнаая рамка
|
|
|
GFX_DrawRectangle(1, 1, 126, 125, 15);
|
|
|
|
|
|
// Дефолтный шрифт
|
|
|
GFX_SetFont(font_8x5);
|
|
|
GFX_SetFontSize(4);
|
|
|
-
|
|
|
- GFX_DrawString(8, 64, (char*)"12345", 15, 0);
|
|
|
-
|
|
|
-#if 0
|
|
|
+
|
|
|
memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
sprintf(screen_str_buf, "F: %u", raw_forw_turns);
|
|
|
GFX_DrawString(8, 20, (char*)screen_str_buf, 15, 0);
|
|
|
@@ -217,6 +230,27 @@ static void screen_draw_settings(uint8_t sel)
|
|
|
|
|
|
oled_clear(BLACK);
|
|
|
|
|
|
+ //GFX_DrawRoundRectangle(0, 0, 127, 127, 5, 15);
|
|
|
+ //Paint_DrawString_EN(45, 120, "Fly Electronics", &Font8, 0xf, 0x0);
|
|
|
+
|
|
|
+ select = sel == MCELL_K1 ? true : false;
|
|
|
+ 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);
|
|
|
+ sprintf(screen_str_buf, "%u", settings.factor_1);
|
|
|
+ Paint_DrawString_EN(50, MENU_2_STR_Y, screen_str_buf, &Font16, 0xf, 0x0);
|
|
|
+ //if (select)
|
|
|
+ oled_double_frame(0);
|
|
|
+
|
|
|
+ memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
+ Paint_DrawString_EN(4, MENU_3_STR_Y + MENU_OFF_BETWEEN_DOUBLE_STR, "Diameter:", &Font16, 0xf, 0x0);
|
|
|
+ memset(screen_str_buf, 0, SCREEN_BUF_LEN);
|
|
|
+ sprintf(screen_str_buf, "%u", settings.factor_1);
|
|
|
+ Paint_DrawString_EN(50, MENU_4_STR_Y + MENU_OFF_BETWEEN_DOUBLE_STR, screen_str_buf, &Font16, 0xf, 0x0);
|
|
|
+
|
|
|
+ oled_display();
|
|
|
+
|
|
|
+#if 0
|
|
|
// Рамка
|
|
|
GFX_DrawRoundRectangle(1, 1, 126, 125, 3, 15);
|
|
|
|
|
|
@@ -272,6 +306,7 @@ static void screen_draw_settings(uint8_t sel)
|
|
|
oled_draw_string_frame(4);
|
|
|
|
|
|
oled_display();
|
|
|
+#endif
|
|
|
}
|
|
|
#endif
|
|
|
// -------------------------------------------------------------------------- //
|