Add tomato face: a pomodoro style timer (#61)

This commit is contained in:
Wesley Ellis
2022-04-06 14:33:24 -04:00
committed by GitHub
parent dd3e6c5fc3
commit 1ec1f2e420
7 changed files with 273 additions and 9 deletions

View File

@@ -188,3 +188,11 @@ float watch_utility_thermistor_temperature(uint16_t value, bool highside, float
return reading;
}
uint32_t watch_utility_offset_timestamp(uint32_t now, int8_t hours, int8_t minutes, int8_t seconds) {
uint32_t new = now;
new += hours * 60 * 60;
new += minutes * 60;
new += seconds;
return new;
}

View File

@@ -124,4 +124,12 @@ watch_date_time watch_utility_date_time_convert_zone(watch_date_time date_time,
*/
float watch_utility_thermistor_temperature(uint16_t value, bool highside, float b_coefficient, float nominal_temperature, float nominal_resistance, float series_resistance);
/** @brief Offset a timestamp by a given amount
* @param now Timestamp to offset from
* @param hours Number of hours to offset
* @param minutes Nmber of minutes to offset
* @param seconds Number of secodns to offset
*/
uint32_t watch_utility_offset_timestamp(uint32_t now, int8_t hours, int8_t minutes, int8_t seconds);
#endif