new throttle bar :P
Diff: Dashboard.cpp
- Revision:
- 4:f6aa318ecda0
- Parent:
- 3:4039e27bbdd9
- Child:
- 5:3047f8d8321b
--- a/Dashboard.cpp Mon May 22 18:39:58 2017 +0000 +++ b/Dashboard.cpp Tue May 23 12:00:46 2017 +0000 @@ -364,7 +364,7 @@ writeLetter(3, 'n', 60, 5); } -void Dashboard::showBatteryPercentageLeft(int battery_percentage_left) +void Dashboard::showBatteryPercentageLeft(unsigned char battery_percentage_left) { if (battery_percentage_left > 99) battery_percentage_left = 100; else if (battery_percentage_left < 0) battery_percentage_left = 0; @@ -442,11 +442,11 @@ } } -void Dashboard::displayTime() -{ +void Dashboard::displayTime(long long int timems) +{ long long int time = timems/1000; //int seconds = (int) (time(NULL) % 60); - int minutes = (int) ((time(NULL) / 60) % 60); - int hours = (int) ((time(NULL) / (60*60)) % 24); + int minutes = (int) ((time / 60) % 60); + int hours = (int) ((time / (60*60)) % 24 + 2); drawBitmap(2, hours / 10 % 10, 65, 39, 4, 7); drawBitmap(2, hours % 10, 65, 35, 4, 7);