Skip to content

Commit 2a895ee

Browse files
committed
Fixed Notifications for some general sensors (like sound level)
1 parent e657842 commit 2a895ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

main/mainworker.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9258,7 +9258,7 @@ void MainWorker::decode_General(const int HwdID, const _eHardwareTypes HwdType,
92589258
DevRowIdx=m_sql.UpdateValue(HwdID, ID.c_str(),Unit,devType,subType,SignalLevel,BatteryLevel,pMeter->intval2, procResult.DeviceName);
92599259
if (DevRowIdx == -1)
92609260
return;
9261-
m_notifications.CheckAndHandleNotification(DevRowIdx, procResult.DeviceName,devType, subType, NTYPE_USAGE, (float)pMeter->intval1);
9261+
m_notifications.CheckAndHandleNotification(DevRowIdx, procResult.DeviceName,devType, subType, NTYPE_USAGE, (float)pMeter->intval2);
92629262
}
92639263
else if (subType==sTypeLeafWetness)
92649264
{
@@ -9321,15 +9321,15 @@ void MainWorker::decode_General(const int HwdID, const _eHardwareTypes HwdType,
93219321
DevRowIdx = m_sql.UpdateValue(HwdID, ID.c_str(), Unit, devType, subType, SignalLevel, BatteryLevel, cmnd, szTmp, procResult.DeviceName);
93229322
if (DevRowIdx == -1)
93239323
return;
9324-
m_notifications.CheckAndHandleNotification(DevRowIdx, procResult.DeviceName,devType, subType, NTYPE_RPM, (float)pMeter->intval1);
9324+
m_notifications.CheckAndHandleNotification(DevRowIdx, procResult.DeviceName,devType, subType, NTYPE_RPM, (float)pMeter->intval2);
93259325
}
93269326
else if (subType == sTypeSoundLevel)
93279327
{
93289328
sprintf(szTmp, "%d", pMeter->intval2);
93299329
DevRowIdx = m_sql.UpdateValue(HwdID, ID.c_str(), Unit, devType, subType, SignalLevel, BatteryLevel, cmnd, szTmp, procResult.DeviceName);
93309330
if (DevRowIdx == -1)
93319331
return;
9332-
m_notifications.CheckAndHandleNotification(DevRowIdx, procResult.DeviceName,devType, subType, NTYPE_RPM, (float)pMeter->intval1);
9332+
m_notifications.CheckAndHandleNotification(DevRowIdx, procResult.DeviceName,devType, subType, NTYPE_RPM, (float)pMeter->intval2);
93339333
}
93349334
else if (subType == sTypeZWaveClock)
93359335
{

0 commit comments

Comments
 (0)