Skip to content

Commit

Permalink
Added getter for current position of roller shutter
Browse files Browse the repository at this point in the history
  • Loading branch information
klew committed Nov 16, 2020
1 parent a6619e9 commit 0e42480
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/SuplaDevice/src/supla/control/roller_shutter.cpp
Expand Up @@ -506,5 +506,9 @@ void RollerShutter::onSaveState() {
Supla::Storage::WriteState((unsigned char *)&data, sizeof(data));
}

int RollerShutter::getCurrentPosition() {
return currentPosition;
}

}; // namespace Control
}; // namespace Supla
1 change: 1 addition & 0 deletions libraries/SuplaDevice/src/supla/control/roller_shutter.h
Expand Up @@ -48,6 +48,7 @@ class RollerShutter : public Element, public Triggerable {
void moveUp(); // start opening roller shutter regardless of its position (keep motor going up)
void moveDown(); // starts closing roller shutter regardless of its position (keep motor going down)
void setTargetPosition(int newPosition);
int getCurrentPosition();

void configComfortUpValue(uint8_t position);
void configComfortDownValue(uint8_t position);
Expand Down

0 comments on commit 0e42480

Please sign in to comment.