Skip to content

Commit

Permalink
Update can_processor.cpp
Browse files Browse the repository at this point in the history
Revert changes made in previous release and assign datatype short.
  • Loading branch information
Neuroquila-n8fall committed Dec 21, 2022
1 parent 060a829 commit 6c76eba
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/can_processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,8 @@ void processCan()
// Value: (Data[0] & Data[1]) / 100.0
if (Message.id == configuration.CanAddresses.Heating.OutsideTemperature)
{
int rawTemp;
// Concat payload and divide the resulting INT by 100
for (int i = 0; i < sizeof(Message.data); i++)
{
rawTemp <<= 8;
rawTemp |= Message.data[i];
}
short rawTemp = (Message.data[0] << 8) + Message.data[1];
temp = rawTemp / 100.0;

// Temperature Delta is too high
Expand Down

0 comments on commit 6c76eba

Please sign in to comment.