Skip to content

Commit

Permalink
🔀 Merge branch 'hugo/feature/Upgrade-stop-funcs-in-led-animations' in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
ladislas committed Mar 16, 2022
2 parents 039a453 + 5fce534 commit 378acab
Show file tree
Hide file tree
Showing 49 changed files with 315 additions and 255 deletions.
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/AfraidBlue.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 +
// | | | | | | | |
// | |\ | |\ | |-----------|\ | -- Blue
// | /| \ | /| \ | /| | \ |
Expand Down Expand Up @@ -41,15 +41,15 @@ class AfraidBlue : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();
void stage6();
void stage7();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/AfraidRed.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 +
// | | | | | | | |
// | |\ | |\ | |-----------|\ | -- Red
// | /| \ | /| \ | /| | \ |
Expand Down Expand Up @@ -41,15 +41,15 @@ class AfraidRed : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();
void stage6();
void stage7();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
51 changes: 25 additions & 26 deletions libs/LedKit/include/internal/Angry.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,29 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 +
// | | | | | | | | | | | |
// | | | | | | | | | | | |
// | || | || | || | || | |-----------| |
// | /|\ | || | /|\ | /|\ | /| | |
// | || | | / || | || | | || | | || || |
// | / | \ | | |\ | / | \ | / | \ | / | |\ |
// | | | | | / | | | | | | | | | | | | | | | |
// | / | | | | | | | / | \ | / | \ | / | | \ |
// | | | \ | | | \ | | | | | | | | | | | | | |
// | / | | |/ | || / | \ | / | \ | / | | \ |
// | | | \ || | \| | | || | | || | | | | |
// | / | || | |/ | \|/ | \|/ | | \ |
// | | | || | || | || | || | | | |
// | / | | | | | | | | | | \ |
// | | | | | | | | | | | | | |
// | / | | | | | | | | | | \ |
// | | | | | | | | | | | | | |
// | / | | | | | | | | | | \ |
// | | | | | | | | | | | | ||
// |/ | | | | | | | | | | \|
// || | | | | | | | | | | |
// | | | | | | | | | | | |
// | |
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 +
// | | | | | | | |
// | | | | | | | |
// | || | || | |-----------| | --- Red
// | /|\ | || | /| | |
// | || | | / || | || || |
// | / | \ | | |\ | / | |\ |
// | | | | | / | | | | | | | |
// | / | | | | | | | / | | \ |
// | | | \ | | | \ | | | | | |
// | / | | |/ | || / | | \ |
// | | | \ || | \| | | | | |
// | / | || | |/ | | \ |
// | | | || | || | | | |
// | / | | | | | | \ |
// | | | | | | | | | |
// | / | | | | | | \ |
// | | | | | | | | | |
// | / | | | | | | \ |
// | | | | | | | | ||
// |/ | | | | | | \|
// || | | | | | | | --- Black
// | | | | | | | |

#pragma once

Expand All @@ -48,8 +47,9 @@ class Angry : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
Expand All @@ -58,7 +58,6 @@ class Angry : public interface::LEDAnimation
void stage6();
void stage7();
void stage8();
void stage9();

void increaseBrightness(float treshold);
void decreaseBrightness(float treshold);
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/AngryShort.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + Stage 2 + Stage 3 + Stage 4+ Stage 5 + Stage 6 +
// + Stage 0 + Stage 1 + Stage 2 + Stage 3+ Stage 4 + Stage 5 +
// | | | | | | |
// | |\ | -| | -| | --- Red
// | /| \ | / |\ | / |\ |
Expand Down Expand Up @@ -48,14 +48,14 @@ class AngryShort : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();
void stage6();

void increaseBrightness(float treshold);
void decreaseBrightness(float treshold);
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/Bubbles.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + Stage 2 +
// + Stage 0 + Stage 1 +
// | | |
// | | ----- |
// | |----- ----- |
Expand Down Expand Up @@ -44,11 +44,11 @@ class Bubbles : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;
uint8_t _bubble_number = 0;

void stage0();
void stage1();
void stage2();

void increaseBrightnessAtIndex(uint8_t index, float position);
void decreaseBrightnessAtIndex(uint8_t index, float position);
Expand Down
4 changes: 2 additions & 2 deletions libs/LedKit/include/internal/Disgusted.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ class Disgusted : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();

void turnLedBlack();
};
Expand Down
2 changes: 1 addition & 1 deletion libs/LedKit/include/internal/Fire.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Fire : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;
uint8_t _wave_tail_index = 0;

void stageWaves();
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/Happy.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + Stage 2 + Stage 3 +
// + Stage 0 + Stage 1 + Stage 2 +
// | | | |
// | | | |
// | | | |
Expand Down Expand Up @@ -48,13 +48,13 @@ class Happy : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();

void turnLedBlack();
};
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/LoadingGreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 +
// | | | | | | | | | | | | |
// | |\ | |\ | |\ | |\ | |\ | |\ | --- Green
// | /| \ | /| \ | /| \ | /| \ | /| \ | /| \ |
Expand Down Expand Up @@ -40,8 +40,9 @@ class LoadingGreen : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
Expand All @@ -53,7 +54,6 @@ class LoadingGreen : public interface::LEDAnimation
void stage9();
void stage10();
void stage11();
void stage12();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/LoadingOrange.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 +
// | | | | | | | | |
// | |\ | |\ | |\ | |\ | -- Orange
// | /| \ | /| \ | /| \ | /| \ |
Expand Down Expand Up @@ -41,16 +41,16 @@ class LoadingOrange : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();
void stage6();
void stage7();
void stage8();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/LoadingRed.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 +
// | | | | | | | | |
// | |\ | |\ | |\ | |\ | -- Red
// | /| \ | /| \ | /| \ | /| \ |
Expand Down Expand Up @@ -41,16 +41,16 @@ class LoadingRed : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();
void stage6();
void stage7();
void stage8();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/LoadingYellow.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 +
// | | | | | | | | | | |
// | |\ | |\ | |\ | |\ | |\ | --- Yellow
// | /| \ | /| \ | /| \ | /| \ | /| \ |
Expand Down Expand Up @@ -40,8 +40,9 @@ class LoadingYellow : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
Expand All @@ -51,7 +52,6 @@ class LoadingYellow : public interface::LEDAnimation
void stage7();
void stage8();
void stage9();
void stage10();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
2 changes: 1 addition & 1 deletion libs/LedKit/include/internal/Rainbow.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Rainbow : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;
uint8_t _rainbow_tail_index = 0;

void stagesRainbow();
Expand Down
6 changes: 3 additions & 3 deletions libs/LedKit/include/internal/Sad.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright 2022 APF France handicap
// SPDX-License-Identifier: Apache-2.0

// + Stage 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 +
// + Stage 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 +
// | | | | | | | | |
// | |\ | |\ | |\ | |\ | -- Blue
// | /| \ | /| \ | /| \ | /| \ |
Expand Down Expand Up @@ -41,16 +41,16 @@ class Sad : public interface::LEDAnimation
interface::LED &_ears;
interface::LED &_belt;
uint8_t _step = 0;
uint8_t _stage = 1;
uint8_t _stage = 0;

void stage0();
void stage1();
void stage2();
void stage3();
void stage4();
void stage5();
void stage6();
void stage7();
void stage8();

void increaseBrightness();
void decreaseBrightness(float treshold);
Expand Down
Loading

0 comments on commit 378acab

Please sign in to comment.