Skip to content

WindowCovering: fixes + simplification #16841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions examples/window-app/common/include/WindowApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ class WindowApp
void LiftUpdate(bool newTarget);
void LiftGoToTarget() { LiftUpdate(true); }
void LiftContinueToTarget() { LiftUpdate(false); }
void LiftUp();
void LiftDown();
void LiftStepToward(OperationalState direction);
void LiftSchedulePositionSet(chip::Percent100ths position) { SchedulePositionSet(position, false); }

void TiltUpdate(bool newTarget);
void TiltGoToTarget() { TiltUpdate(true); }
void TiltContinueToTarget() { TiltUpdate(false); }
void TiltUp();
void TiltDown();
void TiltStepToward(OperationalState direction);
void TiltSchedulePositionSet(chip::Percent100ths position) { SchedulePositionSet(position, true); }

void StepToward(OperationalState direction, bool isTilt);

EmberAfWcType CycleType();

Expand All @@ -139,6 +141,7 @@ class WindowApp
struct CoverWorkData
{
chip::EndpointId mEndpointId;
bool isTilt;

union
{
Expand All @@ -147,9 +150,10 @@ class WindowApp
};
};

static void ScheduleTiltPositionSet(intptr_t arg);
static void ScheduleLiftPositionSet(intptr_t arg);
static void ScheduleOperationalStatusSetWithGlobalUpdate(intptr_t arg);
void SchedulePositionSet(chip::Percent100ths position, bool isTilt);
static void CallbackPositionSet(intptr_t arg);
void ScheduleOperationalStatusSetWithGlobalUpdate(OperationalStatus opStatus);
static void CallbackOperationalStatusSetWithGlobalUpdate(intptr_t arg);
};

static WindowApp & Instance();
Expand Down
Loading