Skip to content

Commit 3573505

Browse files
jmeg-sfyrestyled-commits
authored andcommitted
WindowCovering: fixes + simplification (#16841)
* DEV: Add ComputePercent100thsStep function to server * DEV: Simplify/Factorize OperationalStatus Scheduling update * Fix: Compilator ask for cast * Fix: Bug with GoTos wrong parameter * DEV: App possibility to SetNull to all Position attributes * DEV: Factorize SchedulePositionSet for Tilt/Lift * FIX: Bug where all attribute weren't updated properly * FIX: Missing prototype updates * DEV: Simplify/Factorize Up and Down for Tilt/Lift * DEV: Add Small comments about NVM * Restyled by clang-format * Fix: Conversion mistake lift tilt Co-authored-by: Restyled.io <[email protected]>
1 parent 08ce548 commit 3573505

File tree

4 files changed

+157
-182
lines changed

4 files changed

+157
-182
lines changed

examples/window-app/common/include/WindowApp.h

+11-7
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,16 @@ class WindowApp
110110
void LiftUpdate(bool newTarget);
111111
void LiftGoToTarget() { LiftUpdate(true); }
112112
void LiftContinueToTarget() { LiftUpdate(false); }
113-
void LiftUp();
114-
void LiftDown();
113+
void LiftStepToward(OperationalState direction);
114+
void LiftSchedulePositionSet(chip::Percent100ths position) { SchedulePositionSet(position, false); }
115115

116116
void TiltUpdate(bool newTarget);
117117
void TiltGoToTarget() { TiltUpdate(true); }
118118
void TiltContinueToTarget() { TiltUpdate(false); }
119-
void TiltUp();
120-
void TiltDown();
119+
void TiltStepToward(OperationalState direction);
120+
void TiltSchedulePositionSet(chip::Percent100ths position) { SchedulePositionSet(position, true); }
121+
122+
void StepToward(OperationalState direction, bool isTilt);
121123

122124
EmberAfWcType CycleType();
123125

@@ -139,6 +141,7 @@ class WindowApp
139141
struct CoverWorkData
140142
{
141143
chip::EndpointId mEndpointId;
144+
bool isTilt;
142145

143146
union
144147
{
@@ -147,9 +150,10 @@ class WindowApp
147150
};
148151
};
149152

150-
static void ScheduleTiltPositionSet(intptr_t arg);
151-
static void ScheduleLiftPositionSet(intptr_t arg);
152-
static void ScheduleOperationalStatusSetWithGlobalUpdate(intptr_t arg);
153+
void SchedulePositionSet(chip::Percent100ths position, bool isTilt);
154+
static void CallbackPositionSet(intptr_t arg);
155+
void ScheduleOperationalStatusSetWithGlobalUpdate(OperationalStatus opStatus);
156+
static void CallbackOperationalStatusSetWithGlobalUpdate(intptr_t arg);
153157
};
154158

155159
static WindowApp & Instance();

0 commit comments

Comments
 (0)