From a0c010c28020f91c18acd1394f10ae3229dd025c Mon Sep 17 00:00:00 2001 From: "glsatz@gmail.com" Date: Sat, 17 Dec 2011 07:25:05 +0000 Subject: [PATCH] Fix ThermostatSetpoint base offset. Some thermstats assume the setpoints start counting from index 0 and others index 1 so XML configuration is needed to show the difference. --- cpp/src/command_classes/ThermostatSetpoint.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cpp/src/command_classes/ThermostatSetpoint.cpp b/cpp/src/command_classes/ThermostatSetpoint.cpp index 0fc1d55e..22e51f87 100644 --- a/cpp/src/command_classes/ThermostatSetpoint.cpp +++ b/cpp/src/command_classes/ThermostatSetpoint.cpp @@ -257,13 +257,12 @@ bool ThermostatSetpoint::HandleMsg // Parse the data for the supported setpoints for( uint32 i=1; i<_length-1; ++i ) { - int32 bit = m_setPointBase; - for( ; bit<8; ++bit ) + for( int32 bit=0; bit<8; ++bit ) { if( ( _data[i] & (1<CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, index, c_setpointName[index], "C", false, false, "0.0" );