Quellcode durchsuchen

Translate to Ukranian.

Vladimir N. Shilov vor 1 Jahr
Ursprung
Commit
447388ad20
1 geänderte Dateien mit 53 neuen und 52 gelöschten Zeilen
  1. 53 52
      lib/stab/stab.c

+ 53 - 52
lib/stab/stab.c

@@ -763,45 +763,45 @@ static void ADC_cb(ADCDriver *adcp) {
  */
 static void RefreshMenu (void) {
   ST7735_FillScreen(ST7735_BLACK);
-  ST7735_WriteString(0, 60, "Ст Принять и записать", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-  ST7735_WriteString(0, 70, "Рз Принять без записи", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-  ST7735_WriteString(X_position(1, 0, 7), 30, "Управление:", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-  ST7735_WriteString(0, 40, "P- Выбор", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+  ST7735_WriteString(0, 70, "Ст Прийняти та запис.", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+  ST7735_WriteString(0, 80, "Рз Прийняти без запису", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+  ST7735_WriteString(X_centred(11), 40, "Управління:", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+  ST7735_WriteString(0, 50, "P- Вибір", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #ifdef INTERFACE_ALT
 
 #else
-  ST7735_WriteString(0, 0, "Выберите", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+  ST7735_WriteString(0, 0, "Оберіть", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
   //
   switch (cnt_dspMenu) { //Проверяем режимы меню
     case 2:  { //Если мы в начальном меню, то...
  #ifdef INTERFACE_ALT
       chsnprintf(buf, 24, "%3u V", U_LINE);
-      ST7735_WriteString(X_position(16, 0, 7), 0, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-      ST7735_WriteString(0, 10, "Рном=         Вт", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(X_position(16, 0, 7), 0, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+      ST7735_WriteString(0, 10, "Рном=         Вт", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
  #else
-      ST7735_WriteString(X_position(8, 0, 7), 0, "/введите Рном", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(X_position(8, 0, 7), 0, "/введіть Рном", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
       chsnprintf(buf, 24, "Рном=      Вт, (%3u V)", U_LINE);
-      ST7735_WriteString(0, 10, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(0, 10, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
  #endif
-      ST7735_WriteString(0, 20, "==Мощность нагрузки==", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-      ST7735_WriteString(X_position(8, 0, 7), 40, "/уменьшение", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-      ST7735_WriteString(0, 50, "P+ Увеличение", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(0, 20, "Потужність навантаж.", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+      ST7735_WriteString(X_position(8, 0, 7), 50, "/зменшення", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+      ST7735_WriteString(0, 60, "P+ Збільшення", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
       break;
     }
 
     case 1:  { //Если мы в меню выбора уставки, то...
  #ifdef INTERFACE_ALT
-      ST7735_WriteString(0, 10, "Руст=         Вт", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(0, 10, "Руст=         Вт", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #else
-      ST7735_WriteString(X_position(9, 0, 7), 0, "уставку", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-      ST7735_WriteString(0, 10, "Руст=      Вт", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(X_position(9, 0, 7), 0, "уставку", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+      ST7735_WriteString(0, 10, "Руст=      Вт", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
-      ST7735_WriteString(0, 20, "=======Уставка=======", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-      ST7735_WriteString(0, 50, "P+ Выбор", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+      ST7735_WriteString(0, 20, "=======Уставка=======", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+      ST7735_WriteString(0, 60, "P+ Вибір", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #ifdef USE_EEPROM
       if (!fl.writable) {  // Если уставки не пишутся в EEPROM, то...
-        ST7735_WriteString(0, 60, "Ст Принять без записи", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+        ST7735_WriteString(0, 70, "Ст Прийняти без запису", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
       }
 #endif
       break;
@@ -854,12 +854,13 @@ void Stab_Init(void) {
 
   //ST7735_Init(); // done in main()
   ST7735_FillScreen(ST7735_BLACK);
-  ST7735_WriteString(X_centred(21), 5, "Стабилизатор мощности", LiberM_7x10, ST7735_YELLOW, ST7735_BLACK);
-  ST7735_WriteString(X_centred(4), 15, "ТЭНа", LiberM_7x10, ST7735_YELLOW, ST7735_BLACK);
+  ST7735_WriteString(X_centred(12), 1, "Стабілізатор", LiberM_7x10, ST7735_YELLOW, ST7735_BLACK);
+  ST7735_WriteString(X_centred(10), 10, "потужності", LiberM_7x10, ST7735_YELLOW, ST7735_BLACK);
+  ST7735_WriteString(X_centred(4), 20, "ТЕНа", LiberM_7x10, ST7735_YELLOW, ST7735_BLACK);
 #ifdef INTERFACE_ALT
-  ST7735_WriteString(X_centred(12), 50, "STAB-AVR", Font_11x18, ST7735_BLUE, ST7735_BLACK);
+  ST7735_WriteString(X_centred(12), 50, "STAB-AVR", Font_11x18, ST7735_GREEN, ST7735_BLACK);
 #else
-  ST7735_WriteString(X_centred(8), 50, "STAB-AVR", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+  ST7735_WriteString(X_centred(8), 50, "STAB-AVR", LiberM_7x10, ST7735_GREEN, ST7735_BLACK);
 #endif
   ST7735_WriteString(X_centred(VERSION_LEN), 70, VERSION, LiberM_7x10, ST7735_RED, ST7735_BLACK);
   ST7735_WriteString(X_centred(10), 100, "JohnJohnov", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
@@ -952,17 +953,17 @@ void Stab_WorkCycle(void) {
         if (!Pnom || Pnom > 9999) {
           Pnomold = Pnom;
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(3, 0, 11), 0, "****", Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(3, 0, 11), 0, "****", Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(6, 0, 7), 10, "****", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(6, 0, 7), 10, "****", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
         } else if ((Pnomold != Pnom) || fl.dspRefresh) {
           Pnomold = Pnom;
           chsnprintf(buf, 24, "%u", Pnom);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(6, Pnom, 11), 0, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(6, Pnom, 11), 0, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(9, Pnom, 7), 10, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(9, Pnom, 7), 10, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
         }
         fl.dspRefresh = 0;
@@ -975,15 +976,15 @@ void Stab_WorkCycle(void) {
           uint16_t p = calc_proportion(PDMold, Pnom, CICLE); // Считаем уставку с округлением
           chsnprintf(buf, 24, "%u", p);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(6, p, 11), 0, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(6, p, 11), 0, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(9, p, 7), 10, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(9, p, 7), 10, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
 #ifdef USE_EEPROM
           if (PDMset[1][cnt_PDMcount]) { // Если значение записано в EEPROM
-            ST7735_WriteString(X_position(20, 0, 7), 1, "R", LiberM_7x10, ST7735_BLUE, ST7735_BLACK); // поставим значок
+            ST7735_WriteString(X_position(20, 0, 7), 1, "R", LiberM_7x10, ST7735_SILVER, ST7735_BLACK); // поставим значок
           } else {
-            ST7735_WriteString(X_position(20, 0, 7), 10, " ", LiberM_7x10, ST7735_BLUE, ST7735_BLACK); // а если не записано - уберем
+            ST7735_WriteString(X_position(20, 0, 7), 10, " ", LiberM_7x10, ST7735_SILVER, ST7735_BLACK); // а если не записано - уберем
           }
 #endif
         }
@@ -1012,14 +1013,14 @@ void Stab_WorkCycle(void) {
         if (fl.dspRefresh) {  //Обновляем дисплей
           ST7735_FillScreen(ST7735_BLACK);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(8, 0, 7), str_ust, "Вт       ,  %", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(8, 0, 7), str_ust, "Вт       ,  %", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(0, str_ust, "Руст      Вт;    ,  %", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(0, str_ust, "Руст      Вт;    ,  %", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
-          ST7735_WriteString(0, str_Ureal, "Напр.сети        ,  В", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-          chsnprintf(buf, 24, "Ном. мощность %u Вт", Pnom);
-          ST7735_WriteString(0, str_Pnom, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-          //ST7735_WriteString(X_position(0, 0, 7), str_Relay, "Реле ", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(0, str_Ureal, "Напруга мережі    ,  В", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+          chsnprintf(buf, 24, "Ном. потужність %u Вт", Pnom);
+          ST7735_WriteString(0, str_Pnom, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+          //ST7735_WriteString(X_position(0, 0, 7), str_Relay, "Реле ", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
         }
 
         static uint16_t U_real_old = 0;
@@ -1027,9 +1028,9 @@ void Stab_WorkCycle(void) {
           U_real_old = U_real;
           chsnprintf(buf, 24, "%u", U_real_old);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(7, U_real_old, 11) + 5, str_Ureal_big, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(7, U_real_old, 11) + 5, str_Ureal_big, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(16, U_real_old, 7), str_Ureal, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(16, U_real_old, 7), str_Ureal, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
         }
         static uint8_t U_real_dec_old = 0;
@@ -1037,9 +1038,9 @@ void Stab_WorkCycle(void) {
           U_real_dec_old = U_real_dec;
           chsnprintf(buf, 24, "%u", U_real_dec);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(9, 0, 11), str_Ureal_big, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(9, 0, 11), str_Ureal_big, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(18, 0, 7), str_Ureal_big, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(18, 0, 7), str_Ureal_big, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #endif
         }
 
@@ -1048,9 +1049,9 @@ void Stab_WorkCycle(void) {
           Pust_old = Pust;
           chsnprintf(buf, 24, "%u", Pust_old);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(3,Pust_old,11), str_ust_big, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(3,Pust_old,11), str_ust_big, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(8,Pust_old,7), str_ust, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(8,Pust_old,7), str_ust, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
         }
 
@@ -1063,16 +1064,16 @@ void Stab_WorkCycle(void) {
           uint8_t percent_dec = x % 10; // посчитаем десятые процента
           chsnprintf(buf, 24, "%u.%u", percent, percent_dec);
 #ifdef INTERFACE_ALT
-          ST7735_WriteString(X_position(7,100,11) + 5, str_ust_big, buf, Font_11x18, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(7,100,11) + 5, str_ust_big, buf, Font_11x18, ST7735_SILVER, ST7735_BLACK);
 #else
-          ST7735_WriteString(X_position(13, 0, 7), str_ust, buf, LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(X_position(13, 0, 7), str_ust, buf, LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
 #endif
         }
 
         if (fl.Udown || fl.NotZero) {
-          ST7735_WriteString(0, str_Ustat, "-----Авария сети-----", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(0, str_Ustat, "---- Аварія мережі ---", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
         } else if (fl.Ulow) {
-          ST7735_WriteString(0, str_Ustat, "--Недост.напр. сети--", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(0, str_Ustat, "- Недост.напр. мережі -", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
         } else {
           menu_print_minus(str_Ustat);
         }
@@ -1081,9 +1082,9 @@ void Stab_WorkCycle(void) {
           static uint8_t count_1 = 0;
           uint8_t x1 = 5 - count_1;
           uint8_t x2 = 20 - x1;
-          ST7735_WriteString(0, str_Razgon, "------<Разгон!>------", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-          ST7735_WriteString(X_position(x1, 0, 7), str_Razgon, "<", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
-          ST7735_WriteString(X_position(x2, 0, 7), str_Razgon, ">", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+          ST7735_WriteString(0, str_Razgon, "------ <Разгон!> ------", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+          ST7735_WriteString(X_position(x1, 0, 7), str_Razgon, "<", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
+          ST7735_WriteString(X_position(x2, 0, 7), str_Razgon, ">", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
           if (++count_1 > 5) count_1 = 0;
         } else {
           menu_print_minus(str_Razgon);
@@ -1092,7 +1093,7 @@ void Stab_WorkCycle(void) {
         {
           static uint8_t trigger = 1;
           if (trigger && fl.stab_off) {
-            ST7735_WriteString(0, str_Relay, "!!АВАРИЙНЫЙ ОСТАНОВ!!", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+            ST7735_WriteString(0, str_Relay, "!! АВАРІЙНА ЗУПИНКА !!", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
             trigger = 0;
           } else {
             menu_print_minus(str_Relay);
@@ -1101,9 +1102,9 @@ void Stab_WorkCycle(void) {
         }
 
         //if (fl.TRelay) {
-        //  ST7735_WriteString(X_position(5, 0, 7), str_Relay, "включено", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+        //  ST7735_WriteString(X_position(5, 0, 7), str_Relay, "включено", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
         //} else {
-        //  ST7735_WriteString(X_position(5, 0, 7), str_Relay, "        ", LiberM_7x10, ST7735_BLUE, ST7735_BLACK);
+        //  ST7735_WriteString(X_position(5, 0, 7), str_Relay, "        ", LiberM_7x10, ST7735_SILVER, ST7735_BLACK);
         //}
         fl.dspRefresh = 0;
       }