diff --git a/ConfigSettings.h b/ConfigSettings.h index 5913c22..64e909d 100644 --- a/ConfigSettings.h +++ b/ConfigSettings.h @@ -3,7 +3,7 @@ #ifndef configsettings_h #define configsettings_h -#define FW_VERSION "v2.2.1" +#define FW_VERSION "v2.2.2b" enum DeviceStatus { DS_OK = 0, DS_ERROR = 1, diff --git a/Somfy.cpp b/Somfy.cpp index 1ecba4a..87eca83 100644 --- a/Somfy.cpp +++ b/Somfy.cpp @@ -937,7 +937,7 @@ void SomfyShade::checkMovement() { bool tilt_first = this->tiltType == tilt_types::integrated && ((this->direction == -1 && this->currentTiltPos != 0.0f) || (this->direction == 1 && this->currentTiltPos != 100.0f)); this->p_tiltDirection(this->currentTiltPos == this->tiltTarget ? 0 : this->currentTiltPos > this->tiltTarget ? -1 : 1); - if(tilt_first) { this->p_tiltDirection(this->direction); } + if(tilt_first) this->p_tiltDirection(this->direction); else if(this->direction != 0) this->p_tiltDirection(0); uint8_t currPos = floor(this->currentPos); uint8_t currTiltPos = floor(this->currentTiltPos); @@ -1128,11 +1128,11 @@ void SomfyShade::checkMovement() { if(this->settingTiltPos) { if(this->tiltType == tilt_types::integrated) { // If this is an integrated tilt mechanism the we will simply let it finish. If it is not then we will stop it. - if(this->tiltTarget != 100.0 || this->currentPos != 100.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats); + if(this->tiltTarget != 100.0f || this->currentTiltPos != 100.0f) SomfyRemote::sendCommand(somfy_commands::My, this->repeats); } else { - // This is a tilt motor so let it complete if it is going to 0. - if(this->tiltTarget != 100.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats); + // This is a tilt motor so let it complete if it is going to 100. + if(this->tiltTarget != 100.0f) SomfyRemote::sendCommand(somfy_commands::My, this->repeats); } } this->p_tiltDirection(0); @@ -1177,7 +1177,7 @@ void SomfyShade::checkMovement() { if(this->settingTiltPos) { if(this->tiltType == tilt_types::integrated) { // If this is an integrated tilt mechanism the we will simply let it finish. If it is not then we will stop it. - if(this->tiltTarget != 0.0 || this->currentPos != 0.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats); + if(this->tiltTarget != 0.0 || this->currentTiltPos != 0.0) SomfyRemote::sendCommand(somfy_commands::My, this->repeats); } else { // This is a tilt motor so let it complete if it is going to 0. diff --git a/SomfyController.ino.esp32.bin b/SomfyController.ino.esp32.bin index 943d545..8662c14 100644 Binary files a/SomfyController.ino.esp32.bin and b/SomfyController.ino.esp32.bin differ diff --git a/SomfyController.littlefs.bin b/SomfyController.littlefs.bin index a9875f5..e301958 100644 Binary files a/SomfyController.littlefs.bin and b/SomfyController.littlefs.bin differ diff --git a/data/appversion b/data/appversion index fae692e..7e541ae 100644 --- a/data/appversion +++ b/data/appversion @@ -1 +1 @@ -2.2.1 \ No newline at end of file +2.2.2 \ No newline at end of file diff --git a/data/index.html b/data/index.html index baf8e7e..17689c5 100644 --- a/data/index.html +++ b/data/index.html @@ -3,11 +3,11 @@ - - - + + + - +
diff --git a/data/index.js b/data/index.js index a745c92..186d0b7 100644 --- a/data/index.js +++ b/data/index.js @@ -1252,7 +1252,7 @@ var security = new Security(); class General { initialized = false; - appVersion = 'v2.2.1'; + appVersion = 'v2.2.2b'; reloadApp = false; init() { if (this.initialized) return;