* Added Sao Paulo timezone
* Check for target change before movement so the shades to run to my position.
This commit is contained in:
Robert Strouse 2023-05-22 19:09:57 -07:00
parent a5868618c7
commit 5f67b99f88
5 changed files with 21 additions and 17 deletions

View file

@ -254,6 +254,7 @@ bool Network::connectWiFi() {
Serial.print("Set hostname to:");
Serial.println(WiFi.getHostname());
WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE);
WiFi.setSleep(false);
WiFi.mode(WIFI_STA);
delay(100);
WiFi.begin(settings.WIFI.ssid, settings.WIFI.passphrase);

View file

@ -1349,6 +1349,7 @@ void SomfyShade::moveToTarget(float pos, float tilt) {
cmd = somfy_commands::Up;
else if(tilt >= 0 && tilt > this->currentTiltPos)
cmd = somfy_commands::Down;
if(cmd != somfy_commands::My) {
Serial.print("Moving to ");
Serial.print(pos);
Serial.print("% from ");
@ -1362,13 +1363,14 @@ void SomfyShade::moveToTarget(float pos, float tilt) {
Serial.print("% using ");
Serial.println(translateSomfyCommand(cmd));
SomfyRemote::sendCommand(cmd);
this->target = pos;
this->settingPos = true;
this->target = pos;
if(tilt >= 0) {
this->tiltTarget = tilt;
this->settingTiltPos = true;
}
}
}
bool SomfyShade::save() {
if(somfy.useNVS()) {
char shadeKey[15];

Binary file not shown.

Binary file not shown.

View file

@ -430,6 +430,7 @@ class General {
{ city: "America/Miquelon", code: "<-03>3<-02>,M3.2.0,M11.1.0" },
{ city: "America/Noronha", code: "<-02>2" },
{ city: "America/Santiago", code: "<-04>4<-03>,M9.1.6/24,M4.1.6/24" },
{ city: "America/Sao_Paulo", code: "<-03>3" },
{ city: "America/Scoresbysund", code: "<-01>1<+00>,M3.5.0/0,M10.5.0/1" },
{ city: "America/St_Johns", code: "NST3:30NDT,M3.2.0,M11.1.0" },
{ city: "Antarctica/Casey", code: "<+11>-11" },