Jelajahi Sumber

Added temp unit switch in temp printer

Victor 3 tahun lalu
induk
melakukan
2176452755
4 mengubah file dengan 4 tambahan dan 1 penghapusan
  1. TEMPAT SAMPAH
      assets/arrow_up_7x13.png
  2. TEMPAT SAMPAH
      assets/mm_hg_17x15.png
  3. TEMPAT SAMPAH
      assets/temp_F_11x14.png
  4. 4 1
      views/General_view.c

TEMPAT SAMPAH
assets/arrow_up_7x13.png


TEMPAT SAMPAH
assets/mm_hg_17x15.png


TEMPAT SAMPAH
assets/temp_F_11x14.png


+ 4 - 1
views/General_view.c

@@ -19,7 +19,10 @@ static void _draw_temp(Canvas* canvas, float temp, uint8_t pos) {
 
     //Рисование иконки
     canvas_draw_icon(
-        canvas, temp_positions[pos][0] + 3, temp_positions[pos][1] + 3, &I_temp_C_11x14);
+        canvas,
+        temp_positions[pos][0] + 3,
+        temp_positions[pos][1] + 3,
+        (app->settings.unit == CELSIUS ? &I_temp_C_11x14 : &I_temp_F_11x14));
 
     if((int8_t)temp == -128) {
         snprintf(buff, 5, "--");