Skip to content

Commit e786e8b

Browse files
committed
increase clang column limit
1 parent 331f3a1 commit e786e8b

File tree

14 files changed

+39
-74
lines changed

14 files changed

+39
-74
lines changed

.clang-format

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ BreakConstructorInitializersBeforeComma: false
5858
BreakConstructorInitializers: BeforeColon
5959
BreakAfterJavaFieldAnnotations: false
6060
BreakStringLiterals: true
61-
ColumnLimit: 80
61+
ColumnLimit: 100
6262
CommentPragmas: '^ IWYU pragma:'
6363
CompactNamespaces: false
6464
ConstructorInitializerAllOnOneLineOrOnePerLine: false

examples/MultipleScenes/MultipleScenes.ino

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ void setup() {
3636
animation.onPositionChange(move);
3737

3838
// Add multiple scenes based on PROGMEM data
39-
animation.addScene(SceneA::ANIMATION_DATA, SceneA::LENGTH, SceneA::FPS,
40-
SceneA::FRAMES);
41-
animation.addScene(SceneB::ANIMATION_DATA, SceneB::LENGTH, SceneB::FPS,
42-
SceneB::FRAMES);
39+
animation.addScene(SceneA::ANIMATION_DATA, SceneA::LENGTH, SceneA::FPS, SceneA::FRAMES);
40+
animation.addScene(SceneB::ANIMATION_DATA, SceneB::LENGTH, SceneB::FPS, SceneB::FRAMES);
4341

4442
// Trigger the animation loop mode
4543
animation.loop();

examples/WebSocketLiveMode/WebSocketLiveMode.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ void move(byte servoID, int position) {
3636
BlenderServoAnimation animation;
3737

3838
// Callback function writing live stream data to the animation
39-
void onWebSocketEvent(AsyncWebSocket *server, AsyncWebSocketClient *client,
40-
AwsEventType type, void *arg, uint8_t *data, size_t len) {
39+
void onWebSocketEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type,
40+
void *arg, uint8_t *data, size_t len) {
4141
if (type != WS_EVT_DATA) {
4242
return;
4343
}

src/BlenderServoAnimation.cpp

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

29-
void BlenderServoAnimation::addScene(const byte *data, int size, byte fps,
30-
int frames) {
29+
void BlenderServoAnimation::addScene(const byte *data, int size, byte fps, int frames) {
3130
AnimationData *animationData = new AnimationData(data, size);
3231
Scene *scene = new Scene(&this->servoManager, animationData, fps, frames);
3332
this->registerScene(scene);
@@ -174,8 +173,7 @@ void BlenderServoAnimation::loop() {
174173
}
175174

176175
void BlenderServoAnimation::pause() {
177-
if (!this->scene ||
178-
this->modeIsIn(4, MODE_DEFAULT, MODE_PAUSE, MODE_STOP, MODE_LIVE)) {
176+
if (!this->scene || this->modeIsIn(4, MODE_DEFAULT, MODE_PAUSE, MODE_STOP, MODE_LIVE)) {
179177
return;
180178
}
181179

src/Command.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ byte Command::getServoID() {
2626
}
2727

2828
int Command::getServoPosition() {
29-
return this->values[INDEX_POSITION_BYTE] |
30-
this->values[INDEX_POSITION_SIG_BYTE] << BITS;
29+
return this->values[INDEX_POSITION_BYTE] | this->values[INDEX_POSITION_SIG_BYTE] << BITS;
3130
}
3231

3332
void Command::reset() {

src/Scene.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
using BlenderServoAnimationLibrary::Scene;
77

8-
Scene::Scene(ServoManager *servoManager, AnimationData *data, byte fps,
9-
int frames) {
8+
Scene::Scene(ServoManager *servoManager, AnimationData *data, byte fps, int frames) {
109
this->servoManager = servoManager;
1110
this->data = data;
1211
this->fps = fps;
@@ -68,8 +67,7 @@ unsigned int Scene::getMicrosDiff(unsigned long currentMicros) {
6867
}
6968

7069
bool Scene::isNewFrame(unsigned long currentMicros) {
71-
return this->lastMicros == 0 ||
72-
this->getMicrosDiff(currentMicros) >= this->frameMicros;
70+
return this->lastMicros == 0 || this->getMicrosDiff(currentMicros) >= this->frameMicros;
7371
}
7472

7573
bool Scene::hasFinished() {

src/Servo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ void Servo::move(int position, bool useOffset) {
1515
position += this->offset;
1616
}
1717

18-
if (position == this->currentPosition ||
19-
this->positionExceedsThreshold(position)) {
18+
if (position == this->currentPosition || this->positionExceedsThreshold(position)) {
2019
return;
2120
}
2221

test/animation/test_live/test_live.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,14 @@ 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,
30-
animation.getMode());
29+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
3130
animation.live(mock);
32-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
33-
animation.getMode());
31+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
3432
animation.pause();
3533
animation.playRandom();
36-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
37-
animation.getMode());
34+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
3835
animation.live(mock);
39-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
40-
animation.getMode());
36+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
4137
animation.pause();
4238
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PAUSE, animation.getMode());
4339
animation.live(mock);

test/animation/test_loop/test_loop.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,14 @@ 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,
64-
animation.getMode());
63+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
6564
animation.loop();
66-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
67-
animation.getMode());
65+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
6866
animation.pause();
6967
animation.playRandom();
70-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
71-
animation.getMode());
68+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
7269
animation.loop();
73-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
74-
animation.getMode());
70+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
7571
animation.stop();
7672
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
7773
animation.loop();

test/animation/test_play/test_play.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,14 @@ 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,
61-
animation.getMode());
60+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
6261
animation.play();
63-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE,
64-
animation.getMode());
62+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_SINGLE, animation.getMode());
6563
animation.pause();
6664
animation.playRandom();
67-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
68-
animation.getMode());
65+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
6966
animation.play();
70-
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM,
71-
animation.getMode());
67+
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_PLAY_RANDOM, animation.getMode());
7268
animation.stop();
7369
TEST_ASSERT_EQUAL(BlenderServoAnimation::MODE_STOP, animation.getMode());
7470
animation.play();

0 commit comments

Comments
 (0)