hab mal schnell beim HB-UNI-Sensor1 geschaut, da ist es auch so. Und Minus funktioniert.jp112sdl hat geschrieben: ↑15.02.2021, 20:13Ich hab das ursprünglich vor Jahren mal von hier:
https://github.com/pa-pa/AskSinPP/blob/ ... ther.h#L17
Und mit Homematic funktioniert das auch (aktuell bei Temperaturen bis -20°C)
k.A. wo das herkommt, auf den ersten Blick sah es für mich so aus als ob das Vorzeichen-Bit durch das Batt-Low Flag ersetzt wird
Code: Alles auswählen
uint8_t t1 = (temp >> 8) & 0x7f;
uint8_t t2 = temp & 0xff;
if( batlow == true ) {
t1 |= 0x80; // set bat low bit
}
Edit: "size="1.7" im xml für Temp., also das oberste Bit wird nicht fürs Vorzeichen hergenommen (sondern eben für low bat)