Fix up Windows Build for TimerThread and Clean up Alarm ValueID's (Issues #1315 and #1395)

This commit is contained in:
Justin Hammond 2018-11-10 00:45:47 +08:00
parent e6b44558cb
commit 41b203abe1
3 changed files with 105 additions and 104 deletions

View file

@ -93,6 +93,7 @@
<ClInclude Include="..\..\..\src\command_classes\ZWavePlusInfo.h" />
<ClInclude Include="..\..\..\src\Defs.h" />
<ClInclude Include="..\..\..\src\DNSThread.h" />
<ClInclude Include="..\..\..\src\TimerThread.h" />
<ClInclude Include="..\..\..\src\Driver.h" />
<ClInclude Include="..\..\..\src\Group.h" />
<ClInclude Include="..\..\..\src\Http.h" />
@ -240,6 +241,7 @@
<ClCompile Include="..\..\..\src\command_classes\WakeUp.cpp" />
<ClCompile Include="..\..\..\src\command_classes\ZWavePlusInfo.cpp" />
<ClCompile Include="..\..\..\src\DNSThread.cpp" />
<ClCompile Include="..\..\..\src\TimerThread.cpp" />
<ClCompile Include="..\..\..\src\Driver.cpp" />
<ClCompile Include="..\..\..\src\Group.cpp" />
<ClCompile Include="..\..\..\src\Http.cpp" />

View file

@ -229,6 +229,7 @@ exit 0</Command>
<ClInclude Include="..\..\..\src\Defs.h" />
<ClInclude Include="..\..\..\src\Driver.h" />
<ClInclude Include="..\..\..\src\DNSThread.h" />
<ClInclude Include="..\..\..\src\TimerThread.h" />
<ClInclude Include="..\..\..\src\Http.h" />
<ClInclude Include="..\..\..\src\Group.h" />
<ClInclude Include="..\..\..\src\Localization.h" />
@ -350,6 +351,7 @@ exit 0</Command>
<ClCompile Include="..\..\..\src\command_classes\ZWavePlusInfo.cpp" />
<ClCompile Include="..\..\..\src\Driver.cpp" />
<ClCompile Include="..\..\..\src\DNSThread.cpp" />
<ClCompile Include="..\..\..\src\TimerThread.cpp" />
<ClCompile Include="..\..\..\src\Http.cpp" />
<ClCompile Include="..\..\..\src\Group.cpp" />
<ClCompile Include="..\..\..\src\Localization.cpp" />

View file

@ -336,7 +336,6 @@ bool Alarm::HandleMsg
if (EventParamLength > 0) {
const std::map<uint32, NotificationCCTypes::NotificationEventParams* > nep = NotificationCCTypes::Get()->GetAlarmNotificationEventParams(NotificationType, NotificationEvent);
if (nep.size() > 0) {
if( Node* node = GetNodeUnsafe() ) {
for (std::map<uint32, NotificationCCTypes::NotificationEventParams* >::const_iterator it = nep.begin(); it != nep.end(); it++) {
switch (it->second->type) {
case NotificationCCTypes::NEPT_Location: {
@ -442,7 +441,6 @@ bool Alarm::HandleMsg
} else {
Log::Write( LogLevel_Warning, GetNodeId(), "Duration Param size was not equal to 3");
}
node->CreateValueInt( ValueID::ValueGenre_User, GetCommandClassId(), _instance, AlarmIndex_Type_Duration, it->second->name, "", true, false, 0, 0);
break;
}
@ -451,7 +449,6 @@ bool Alarm::HandleMsg
}
}
}
}
return true;
}
@ -490,7 +487,7 @@ bool Alarm::HandleMsg
item.m_label = it->second->name;
_items.push_back( item );
}
node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, index, NotificationCCTypes::Get()->GetAlarmType(index), "", false, false, _items.size(), _items, 0, 0 );
node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, index, NotificationCCTypes::Get()->GetAlarmType(index), "", true, false, _items.size(), _items, 0, 0 );
}
ClearStaticRequest( StaticRequest_Values );
}
@ -539,7 +536,7 @@ bool Alarm::HandleMsg
}
if( Node* node = GetNodeUnsafe() )
{
node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, type, NotificationCCTypes::Get()->GetAlarmType(type), "", false, false, _items.size(), _items, 0, 0 );
node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, type, NotificationCCTypes::Get()->GetAlarmType(type), "", true, false, _items.size(), _items, 0, 0 );
}
}
ClearStaticRequest( StaticRequest_Values );
@ -578,7 +575,7 @@ void Alarm::SetupEvents
Paramitem.m_label = ne->name;
_Paramitems.push_back( Paramitem );
}
node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, AlarmIndex_Type_ParamList, it->second->name, "", false, false, _Paramitems.size(), _Paramitems, 0, 0 );
node->CreateValueList( ValueID::ValueGenre_User, GetCommandClassId(), _instance, AlarmIndex_Type_ParamList, it->second->name, "", true, false, _Paramitems.size(), _Paramitems, 0, 0 );
break;
}
case NotificationCCTypes::NEPT_UserCodeReport: {