Skip to content

Commit 331f3a1

Browse files
committed
fix linting errors
1 parent e50f830 commit 331f3a1

File tree

10 files changed

+57
-30
lines changed

10 files changed

+57
-30
lines changed

src/BlenderServoAnimation.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ bool BlenderServoAnimation::hasScenes() {
2626
return this->addIndex > 0;
2727
}
2828

29-
void BlenderServoAnimation::addScene(const byte *data, int size, byte fps, int frames) {
29+
void BlenderServoAnimation::addScene(const byte *data, int size, byte fps,
30+
int frames) {
3031
AnimationData *animationData = new AnimationData(data, size);
3132
Scene *scene = new Scene(&this->servoManager, animationData, fps, frames);
3233
this->registerScene(scene);

src/BlenderServoAnimation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
#ifndef BlenderServoAnimation_H
99
#define BlenderServoAnimation_H
1010

11+
using BlenderServoAnimationLibrary::AnimationData;
1112
using BlenderServoAnimationLibrary::Scene;
1213
using BlenderServoAnimationLibrary::ServoManager;
13-
using BlenderServoAnimationLibrary::AnimationData;
1414

1515
class BlenderServoAnimation {
1616

src/ServoManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include "Servo.h"
33
#include <Arduino.h>
44

5-
using BlenderServoAnimationLibrary::ServoManager;
65
using BlenderServoAnimationLibrary::Servo;
6+
using BlenderServoAnimationLibrary::ServoManager;
77

88
ServoManager::~ServoManager() {
99
if (this->servos) {

test/animation/test_live/test_live.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ void test_prevented(void) {
2626
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY, animation.getMode());
2727
animation.pause();
2828
animation.playSingle(0);
29-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
29+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
30+
animation.getMode());
3031
animation.live(mock);
31-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
32+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
33+
animation.getMode());
3234
animation.pause();
3335
animation.playRandom();
34-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
36+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
37+
animation.getMode());
3538
animation.live(mock);
36-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
39+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
40+
animation.getMode());
3741
animation.pause();
3842
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PAUSE, animation.getMode());
3943
animation.live(mock);

test/animation/test_loop/test_loop.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,18 @@ void test_prevented(void) {
6060
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY, animation.getMode());
6161
animation.pause();
6262
animation.playSingle(0);
63-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
63+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
64+
animation.getMode());
6465
animation.loop();
65-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
66+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
67+
animation.getMode());
6668
animation.pause();
6769
animation.playRandom();
68-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
70+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
71+
animation.getMode());
6972
animation.loop();
70-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
73+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
74+
animation.getMode());
7175
animation.stop();
7276
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
7377
animation.loop();

test/animation/test_play/test_play.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,18 @@ void test_prevented(void) {
5757
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_LOOP, animation.getMode());
5858
animation.pause();
5959
animation.playSingle(0);
60-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
60+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
61+
animation.getMode());
6162
animation.play();
62-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
63+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
64+
animation.getMode());
6365
animation.pause();
6466
animation.playRandom();
65-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
67+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
68+
animation.getMode());
6669
animation.play();
67-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
70+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
71+
animation.getMode());
6872
animation.stop();
6973
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
7074
animation.play();

test/animation/test_play_random/test_play_random.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ void test_play_random(void) {
2525

2626
animation.playRandom();
2727

28-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
28+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
29+
animation.getMode());
2930
TEST_ASSERT_NOT_EQUAL(nullptr, animation.getCurrentScene());
3031
TEST_ASSERT_EQUAL(1, animation.getPlayIndex());
3132
TEST_ASSERT_FALSE(animation.scenePlayed(0));
@@ -36,7 +37,8 @@ void test_play_random(void) {
3637
animation.run(i);
3738
}
3839

39-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
40+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
41+
animation.getMode());
4042
TEST_ASSERT_EQUAL(0, animation.getPlayIndex());
4143
TEST_ASSERT_TRUE(animation.scenePlayed(0));
4244
TEST_ASSERT_TRUE(animation.scenePlayed(1));
@@ -46,7 +48,8 @@ void test_play_random(void) {
4648
animation.run(i);
4749
}
4850

49-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
51+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
52+
animation.getMode());
5053
TEST_ASSERT_EQUAL(2, animation.getPlayIndex());
5154
TEST_ASSERT_EQUAL(20, logIndex);
5255
TEST_ASSERT_FALSE(animation.scenePlayed(0));
@@ -78,9 +81,11 @@ void test_prevented(void) {
7881
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY, animation.getMode());
7982
animation.pause();
8083
animation.playSingle(0);
81-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
84+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
85+
animation.getMode());
8286
animation.playRandom();
83-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
87+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
88+
animation.getMode());
8489
animation.stop();
8590
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
8691
animation.playRandom();
@@ -99,11 +104,13 @@ void test_allowed(void) {
99104

100105
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_DEFAULT, animation.getMode());
101106
animation.playRandom();
102-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
107+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
108+
animation.getMode());
103109
animation.pause();
104110
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PAUSE, animation.getMode());
105111
animation.playRandom();
106-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
112+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
113+
animation.getMode());
107114
}
108115

109116
int main(int argc, char **argv) {

test/animation/test_play_single/test_play_single.cpp

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ void test_play_single(void) {
2020

2121
animation.playSingle(2);
2222

23-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
23+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
24+
animation.getMode());
2425
TEST_ASSERT_EQUAL(2, animation.getPlayIndex());
2526

2627
for (long i = 0; i < ANIMATION_MICROS; i += FRAME_MICROS) {
@@ -57,9 +58,11 @@ void test_prevented(void) {
5758
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY, animation.getMode());
5859
animation.pause();
5960
animation.playRandom();
60-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
61+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
62+
animation.getMode());
6163
animation.playSingle(0);
62-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
64+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
65+
animation.getMode());
6366
animation.stop();
6467
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
6568
animation.playSingle(0);
@@ -78,11 +81,13 @@ void test_allowed(void) {
7881

7982
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_DEFAULT, animation.getMode());
8083
animation.playSingle(0);
81-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
84+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
85+
animation.getMode());
8286
animation.pause();
8387
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PAUSE, animation.getMode());
8488
animation.playSingle(0);
85-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
89+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
90+
animation.getMode());
8691
}
8792

8893
void test_prevent_sudden_index_change(void) {

test/animation/test_stop/test_stop.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ void test_allowed(void) {
101101
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
102102
animation.run(10000);
103103
animation.playSingle(0);
104-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
104+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
105+
animation.getMode());
105106
animation.stop();
106107
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
107108
animation.run(10000);
108109
animation.playRandom();
109-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
110+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
111+
animation.getMode());
110112
animation.stop();
111113
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
112114
animation.run(10000);

test/test_scene/test_scene.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#include "Scene.h"
44
#include <unity.h>
55

6-
using BlenderServoAnimationLibrary::ServoManager;
76
using BlenderServoAnimationLibrary::AnimationData;
87
using BlenderServoAnimationLibrary::Scene;
8+
using BlenderServoAnimationLibrary::ServoManager;
99

1010
void setUp(void) {
1111
resetPositionLog();

0 commit comments

Comments
 (0)