mirror of
https://github.com/Fishwaldo/open-zwave.git
synced 2025-03-18 21:11:23 +00:00
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.
This commit is contained in:
parent
0cd2338b65
commit
a0c010c280
1 changed files with 2 additions and 3 deletions
|
@ -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<<bit) ) != 0 )
|
||||
{
|
||||
// Add supported setpoint
|
||||
int32 index = (int32)((i-1)<<3) + bit;
|
||||
int32 index = (int32)((i-1)<<3) + bit + m_setPointBase;
|
||||
if( index < ThermostatSetpoint_Count )
|
||||
{
|
||||
node->CreateValueDecimal( ValueID::ValueGenre_User, GetCommandClassId(), _instance, index, c_setpointName[index], "C", false, false, "0.0" );
|
||||
|
|
Loading…
Add table
Reference in a new issue