code cleanup
This commit is contained in:
parent
1de5ff4a4e
commit
da2534531b
1 changed files with 3 additions and 3 deletions
|
@ -89,7 +89,7 @@ int main() {
|
||||||
printf("%d-%02d-%02d %02d:%02d.%02d\n", dt.year, dt.month, dt.day, hour, dt.min, dt.sec);
|
printf("%d-%02d-%02d %02d:%02d.%02d\n", dt.year, dt.month, dt.day, hour, dt.min, dt.sec);
|
||||||
|
|
||||||
// If there was a waste bin pickup found AND we are in the evening (>= 18:00) …
|
// If there was a waste bin pickup found AND we are in the evening (>= 18:00) …
|
||||||
if (it != dates.end() && hour >= 9) {
|
if (it != dates.end() && hour >= 18) {
|
||||||
auto wasteDate = *it;
|
auto wasteDate = *it;
|
||||||
size_t count{0};
|
size_t count{0};
|
||||||
auto currentTime = time_us_64();
|
auto currentTime = time_us_64();
|
||||||
|
@ -116,8 +116,8 @@ int main() {
|
||||||
|
|
||||||
auto timeLeft = timestamp - currentTime;
|
auto timeLeft = timestamp - currentTime;
|
||||||
|
|
||||||
if (timeLeft > 3000000) {
|
if (timeLeft > 3'000'000) {
|
||||||
sleep_us(3000000);
|
sleep_us(3'000'000);
|
||||||
} else {
|
} else {
|
||||||
sleep_us(timeLeft);
|
sleep_us(timeLeft);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue