mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Switch prog commands sent to a 1 button garage motor.
This commit is contained in:
parent
74ee9f6f25
commit
3ec67cd0ea
3 changed files with 2 additions and 1 deletions
|
|
@ -1965,7 +1965,7 @@ void SomfyShade::sendCommand(somfy_commands cmd, uint8_t repeat) {
|
||||||
this->tiltTarget = this->currentTiltPos;
|
this->tiltTarget = this->currentTiltPos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(this->shadeType == shade_types::garage1 && cmd == somfy_commands::My) {
|
else if(this->shadeType == shade_types::garage1 && cmd == somfy_commands::Prog) {
|
||||||
SomfyRemote::sendCommand(somfy_commands::Toggle, repeat);
|
SomfyRemote::sendCommand(somfy_commands::Toggle, repeat);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Binary file not shown.
1
Web.cpp
1
Web.cpp
|
|
@ -381,6 +381,7 @@ void Web::handleRepeatCommand(WebServer& server) {
|
||||||
server.send(500, _encoding_json, F("{\"status\":\"ERROR\",\"desc\":\"Shade reference could not be found.\"}"));
|
server.send(500, _encoding_json, F("{\"status\":\"ERROR\",\"desc\":\"Shade reference could not be found.\"}"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(shade->shadeType == shade_types::garage1 && command == somfy_commands::Prog) command = somfy_commands::Toggle;
|
||||||
if(!shade->isLastCommand(command)) {
|
if(!shade->isLastCommand(command)) {
|
||||||
// We are going to send this as a new command.
|
// We are going to send this as a new command.
|
||||||
shade->sendCommand(command, repeat >= 0 ? repeat : shade->repeats);
|
shade->sendCommand(command, repeat >= 0 ? repeat : shade->repeats);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue