Skip to content

Commit 8df262c

Browse files
committed
Changed: Not sending actual motion sensors off command, only updating internally
1 parent bfe805c commit 8df262c

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

History.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ Version 2.0.xxxx (xxxx 2015)
115115
- Implemented: OTGW, support for GPIO A/B switches(Thanks to Rob K)
116116
- Implemented: 'Nest Thermostat' hardware support
117117
- Changed: Setpoint Up/Down rounds up to 0.5 degrees
118+
- Changed: Not sending actual motion sensors off command, only updating internally
118119

119120
Version 2.0.2284 (February 22th 2015)
120121
- Fixed: Firefox, RGBW/Setpoint popup

main/mainworker.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9091,8 +9091,11 @@ bool MainWorker::SwitchLightInt(const std::vector<std::string> &sd, std::string
90919091
}
90929092
else
90939093
{
9094-
if (!WriteToHardware(HardwareID, (const char*)&lcmd, sizeof(lcmd.LIGHTING2)))
9095-
return false;
9094+
if (switchtype != STYPE_Motion) //dont send actual motion off command
9095+
{
9096+
if (!WriteToHardware(HardwareID, (const char*)&lcmd, sizeof(lcmd.LIGHTING2)))
9097+
return false;
9098+
}
90969099
}
90979100

90989101
if (!IsTesting) {
@@ -9662,8 +9665,11 @@ bool MainWorker::SwitchLightInt(const std::vector<std::string> &sd, std::string
96629665
level = (level > 99) ? 99 : level;
96639666
gswitch.level = (unsigned char)level;
96649667
gswitch.rssi = 7;
9665-
if (!WriteToHardware(HardwareID, (const char*)&gswitch, sizeof(_tGeneralSwitch)))
9666-
return false;
9668+
if (switchtype != STYPE_Motion) //dont send actual motion off command
9669+
{
9670+
if (!WriteToHardware(HardwareID, (const char*)&gswitch, sizeof(_tGeneralSwitch)))
9671+
return false;
9672+
}
96679673
if (!IsTesting) {
96689674
//send to internal for now (later we use the ACK)
96699675
DecodeRXMessage(m_hardwaredevices[hindex], (const unsigned char *)&gswitch);

0 commit comments

Comments
 (0)