Skip to content
New issue

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

Teknihall: Fix negative temperatures #221

Merged
merged 1 commit into from Dec 11, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/pilight/protocols/433.92/teknihall.c
Expand Up @@ -77,7 +77,7 @@ static void parseCode(void) {

id = binToDecRev(binary, 0, 7);
battery = binary[8];
temperature = binToDecRev(binary, 14, 23);
temperature = binToSignedRev(binary, 14, 23);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not work. As discussed we need to include bit 13: temperature = binToSignedRev(binary, 13, 23);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree, this will not work as intended, needs to be temperature = binToSignedRev(binary, 13, 23);

humidity = binToDecRev(binary, 24, 30);

struct settings_t *tmp = settings;
Expand Down Expand Up @@ -200,7 +200,7 @@ void teknihallInit(void) {
#if defined(MODULE) && !defined(_WIN32)
void compatibility(struct module_t *module) {
module->name = "teknihall";
module->version = "2.3";
module->version = "2.4";
module->reqversion = "6.0";
module->reqcommit = "84";
}
Expand Down