mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2025-12-13 11:02:12 +01:00
Coding for sun and wind flag processing v1.7.0
* Added MQTT control for sunFlag and tiltTarget. * Move my position if it is set per sun sensor instructions. * Add sun/wind states to persistence. * Bump restore file version
This commit is contained in:
parent
883dd63d3f
commit
2ecc0de36e
8 changed files with 21 additions and 8 deletions
|
|
@ -630,7 +630,7 @@ void SomfyShade::checkMovement() {
|
|||
&& this->sunStart
|
||||
&& (curTime - this->sunStart) >= SOMFY_SUN_TIMEOUT)
|
||||
{
|
||||
this->target = 100.0f;
|
||||
this->target = this->myPos >= 0 ? this->myPos : 100.0f;
|
||||
this->sunDone = true;
|
||||
|
||||
Serial.printf("[%u] Sun -> done\r\n", this->shadeId);
|
||||
|
|
@ -1240,7 +1240,7 @@ void SomfyShade::processFrame(somfy_frame_t &frame, bool internal) {
|
|||
const bool isSunny = this->flags & static_cast<uint8_t>(somfy_flags_t::Sunny);
|
||||
|
||||
if (isSunny && this->sunDone)
|
||||
this->target = 100.0f;
|
||||
this->target = this->myPos >= 0 ? this->myPos : 100.0f;
|
||||
else if (!isSunny && this->noSunDone)
|
||||
this->target = 0.0f;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue