瀏覽代碼

Suppression of the leading zero in the time display.

Vladimir N. Shilov 2 年之前
父節點
當前提交
5d9789bd65
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      Src/clock.c

+ 5 - 1
Src/clock.c

@@ -230,7 +230,11 @@ void showTime(void) {
   }
 
   tube4_t buf;
-  buf.s8.tA = Clock.Hr >> 4;
+  if ((Clock.Hr & 0xf0) == 0) {
+    buf.s8.tA = TUBE_BLANK;
+  } else {
+    buf.s8.tA = Clock.Hr >> 4;
+  }
   buf.s8.tB = Clock.Hr & 0xf;
   buf.s8.tD = Clock.Min >> 4;
   buf.s8.tE = Clock.Min & 0xf;