Work on 80-bit protocol

* Fixes issue #11 TX Power is now persisted to NVS
* Increase timing for tilt motors from 7 to 15 beats. #1
* Add time to frame log.
* Allow RX and TX pins to be shared and multiplexed
This commit is contained in:
Robert Strouse 2023-03-29 11:41:11 -07:00
parent ab7cdba519
commit 5f5ac9fa32
9 changed files with 66 additions and 20 deletions

10
Web.cpp
View file

@ -905,7 +905,10 @@ void Web::begin() {
server.send(500, _encoding_json, F("{\"status\":\"ERROR\",\"desc\":\"Shade not found to pair\"}"));
}
else {
shade->sendCommand(somfy_commands::Prog, 7);
if(shade->bitLength == 56)
shade->sendCommand(somfy_commands::Prog, 7);
else
shade->sendCommand(somfy_commands::Prog, 1);
shade->paired = true;
shade->save();
DynamicJsonDocument doc(512);
@ -951,7 +954,10 @@ void Web::begin() {
server.send(500, _encoding_json, F("{\"status\":\"ERROR\",\"desc\":\"Shade not found to unpair\"}"));
}
else {
shade->sendCommand(somfy_commands::Prog, 7);
if(shade->bitLength == 56)
shade->sendCommand(somfy_commands::Prog, 7);
else
shade->sendCommand(somfy_commands::Prog, 1);
shade->paired = false;
shade->save();
DynamicJsonDocument doc(512);