Skip to content

Commit

Permalink
project.black: fix local temp readings
Browse files Browse the repository at this point in the history
Signed-off-by: wlkmanist <vlad.king5555@mail.ru>
  • Loading branch information
wlkmanist committed Mar 6, 2024
1 parent 4d349c2 commit f3010b2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ public override void Update()
{
setRegPage(1);

byte temp = (byte)(readRegByte(REG_TZ_LOCAL) - _tempOffset);
byte temp = (byte)(readRegByte(REG_TZ_LOCAL));

if (temp != 0xFF && temp != 0x00)
{
_temperatureLocal.Value = temp + _temperatureLocal.Parameters[0].Value; // temp with offset parameter
_temperatureLocal.Value = temp - _tempOffset + _temperatureLocal.Parameters[0].Value; // temp with offset parameter
ActivateSensor(_temperatureLocal);
}
else
Expand Down

0 comments on commit f3010b2

Please sign in to comment.