6 #ifndef ACE_TIME_HW_TEMPERATURE_H
7 #define ACE_TIME_HW_TEMPERATURE_H
11 #include <AceCommon.h>
26 return (int16_t) ((
msb << 8) |
lsb);
37 m = ((uint16_t) temp) >> 8;
38 l = ((uint16_t) temp) & 0xFF;
45 uint8_t frac = (uint16_t) l * 100 / 256;
48 ace_common::printPad2To(printer, frac,
'0');
69 inline bool operator!=(
const HardwareTemperature& a,
70 const HardwareTemperature& b) {
The temperature in Celcius as a signed (8.8) fixed-point integer.
uint8_t msb
Upper byte of signed (8.8) fixed point temperature.
uint8_t lsb
Lower byte of signed (8.8) fixed point temperature.
void printTo(Print &printer) const
Print HardwareTemperature to 'printer'.
int16_t toTemperature256() const
Return temperature in units of 1/256 degrees.