Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmelis authored Jan 13, 2025
1 parent 33b1655 commit b8af8a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Datapoint/ConversionHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,16 @@ std::size_t decodeSchedule(const uint8_t* data, std::size_t len, char* output, s
unsigned int minutes = (data[i] & 0x07) * 10;
if (hour > 23 || minutes > 59) {
hour = 0;
minutes 0;
minutes = 0;
}
std::size_t result = snprintf(&output[pos], maxLen - result, "%u.02:%u.02", hour, minutes);
int result = snprintf(&output[pos], maxLen - result, "%u.02:%u.02", hour, minutes);
if (result < 0) return 0;
pos += result;
if (i < 7) {
&output[pos++] = ' ';
output[pos++] = ' ';
}
}
return pos;
}

} // end namespace VitoWiFi

0 comments on commit b8af8a0

Please sign in to comment.