File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ namespace ratgdo {
3030 bool save_to_flash = true ;
3131 switch (state) {
3232 case DoorState::OPEN:
33- this ->position = COVER_OPEN;
3433 this ->current_operation = COVER_OPERATION_IDLE;
34+ this ->position = position;
3535 break ;
3636 case DoorState::CLOSED:
3737 this ->position = COVER_CLOSED;
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ namespace ratgdo {
183183 this ->cancel_position_sync_callbacks ();
184184 cancel_timeout (" door_query_state" );
185185 } else if (door_state == DoorState::OPEN) {
186- this ->door_position = 1.0 ;
186+ this ->door_position_update () ;
187187 this ->cancel_position_sync_callbacks ();
188188 } else if (door_state == DoorState::CLOSED) {
189189 this ->door_position = 0.0 ;
@@ -626,6 +626,9 @@ namespace ratgdo {
626626 this ->door_action (delta > 0 ? DoorAction::OPEN : DoorAction::CLOSE);
627627 set_timeout (" move_to_position" , operation_time, [=] {
628628 this ->door_action (DoorAction::STOP);
629+ this ->received (DoorState::OPEN);
630+ this ->door_position_update ();
631+ this ->cancel_position_sync_callbacks ();
629632 });
630633 }
631634
You can’t perform that action at this time.
0 commit comments