We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I had to changed the type conversion for negative values from the unsigned type BYTE to CHAR to allow the sign (of the float) to traverse to valueHB.
void OpenthermData::f88(float value) { if (value >= 0) { valueHB = (byte) value;
float fraction = (value - valueHB); valueLB = fraction * 256.0;
} else { //valueHB = (byte)(value - 1); valueHB = (char) (value -1) ; float fraction = (value - valueHB - 1); Serial.print("Fraction == ");Serial.println(fraction); valueLB = fraction * 256.0; } }
Thanks for the lib, it's great fun to be able to read and set a Chronotherm IV thermostat.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I had to changed the type conversion for negative values from the unsigned type BYTE to CHAR to allow the sign (of the float) to traverse to valueHB.
void OpenthermData::f88(float value) {
if (value >= 0) {
valueHB = (byte) value;
}
else {
//valueHB = (byte)(value - 1);
valueHB = (char) (value -1) ;
float fraction = (value - valueHB - 1);
Serial.print("Fraction == ");Serial.println(fraction);
valueLB = fraction * 256.0;
}
}
Thanks for the lib, it's great fun to be able to read and set a Chronotherm IV thermostat.
The text was updated successfully, but these errors were encountered: