show 0 in number function

This commit is contained in:
klemek
2021-08-26 14:29:58 +02:00
parent 504fe4f873
commit 7c5dbbf6be
+2 -2
View File
@@ -48,10 +48,10 @@ void WatchyTetris::drawWatchFace()
void WatchyTetris::drawNumber(uint32_t x, uint32_t y, uint32_t v)
{
for(int8_t i = 0; i < 8; i++){
display.drawBitmap(x - i * 10, y, tetris_small_nums[v % 10], 8, 8, GxEPD_BLACK);
v /= 10;
if (v == 0) {
break;
}
display.drawBitmap(x - i * 10, y, tetris_small_nums[v % 10], 8, 8, GxEPD_BLACK);
v /= 10;
}
}