Skip to content

Commit 5b55db2

Browse files
committed
run format_code over the code base
1 parent f1e36dd commit 5b55db2

50 files changed

Lines changed: 275 additions & 252 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎examples/StepperDemo/test_seq.h‎

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
#define TEST_STATE_ERROR 0xffff
55
struct test_seq_s {
6-
bool (*test)(FastAccelStepper *stepper, struct test_seq_s *,
7-
uint32_t time_ms);
6+
bool (*test)(FastAccelStepper* stepper, struct test_seq_s*, uint32_t time_ms);
87
uint16_t state;
98
uint32_t u32_1;
109
int32_t s32_1;
@@ -19,71 +18,70 @@ struct test_seq_s {
1918
#endif
2019
extern struct test_seq_def_s {
2120
char code[4];
22-
bool (*test)(FastAccelStepper *stepper, struct test_seq_s *,
23-
uint32_t time_ms);
21+
bool (*test)(FastAccelStepper* stepper, struct test_seq_s*, uint32_t time_ms);
2422
} test_sequence[];
2523

2624
// a test_seq should return true, if finished.
2725

2826
// This sequence turns stepper like a clock's second hand
29-
bool test_seq_01(FastAccelStepper *stepper, struct test_seq_s *seq,
27+
bool test_seq_01(FastAccelStepper* stepper, struct test_seq_s* seq,
3028
uint32_t time_ms);
3129

3230
// Run the stepper towards positive position and back to zero repeatedly
33-
bool test_seq_02(FastAccelStepper *stepper, struct test_seq_s *seq,
31+
bool test_seq_02(FastAccelStepper* stepper, struct test_seq_s* seq,
3432
uint32_t time_ms);
3533

3634
// same like 02, both different speed/acceleration
37-
bool test_seq_03(FastAccelStepper *stepper, struct test_seq_s *seq,
35+
bool test_seq_03(FastAccelStepper* stepper, struct test_seq_s* seq,
3836
uint32_t time_ms);
3937

4038
// same like 02, both different speed/acceleration
41-
bool test_seq_04(FastAccelStepper *stepper, struct test_seq_s *seq,
39+
bool test_seq_04(FastAccelStepper* stepper, struct test_seq_s* seq,
4240
uint32_t time_ms);
4341

4442
// Perform 800 times a single step and then 800 steps back in one command
45-
bool test_seq_05(FastAccelStepper *stepper, struct test_seq_s *seq,
43+
bool test_seq_05(FastAccelStepper* stepper, struct test_seq_s* seq,
4644
uint32_t time_ms);
4745

4846
// Run 32000 steps with speed changes every 100ms in order to reproduce issue
4947
// #24
50-
bool test_seq_06(FastAccelStepper *stepper, struct test_seq_s *seq,
48+
bool test_seq_06(FastAccelStepper* stepper, struct test_seq_s* seq,
5149
uint32_t time_ms);
5250

5351
// measures timing of several moveByAcceleration(). Should stop at position
5452
// zero. (should be started from position 0).
55-
bool test_seq_07(FastAccelStepper *stepper, struct test_seq_s *seq,
53+
bool test_seq_07(FastAccelStepper* stepper, struct test_seq_s* seq,
5654
uint32_t time_ms);
5755

5856
// is an endless running test to check on esp32, if the generated pulses are
5957
// successfully counted by a second pulse counter. The moves should be all
6058
// executed in one second with alternating direction and varying
6159
// speed/acceleration
62-
bool test_seq_08(FastAccelStepper *stepper, struct test_seq_s *seq,
60+
bool test_seq_08(FastAccelStepper* stepper, struct test_seq_s* seq,
6361
uint32_t time_ms);
6462

6563
// is an endless running test with starting a ramp with random
6664
// speed/acceleration/direction, which after 1s is stopped with
6765
// forceStopAndNewPosition(). It contains no internal test criteria, but looking
6866
// at the log, the match of generated and sent pulses can be checked. And the
6967
// needed steps for a forceStopAndNewPosition() can be derived out of this
70-
bool test_seq_09(FastAccelStepper *stepper, struct test_seq_s *seq,
68+
bool test_seq_09(FastAccelStepper* stepper, struct test_seq_s* seq,
7169
uint32_t time_ms);
7270

7371
// runs the stepper forward and every 200 ms changes speed with increasing
7472
// positive speed deltas and then decreasing negative speed deltas.
75-
bool test_seq_10(FastAccelStepper *stepper, struct test_seq_s *seq,
73+
bool test_seq_10(FastAccelStepper* stepper, struct test_seq_s* seq,
7674
uint32_t time_ms);
7775

7876
// runs the stepper to position 1000000 and back to 0. This tests, if
7977
// getCurrentPosition() is counting monotonously up or down respectively.
80-
bool test_seq_11(FastAccelStepper *stepper, struct test_seq_s *seq,
78+
bool test_seq_11(FastAccelStepper* stepper, struct test_seq_s* seq,
8179
uint32_t time_ms);
8280

8381
// test case for one stepper to reproduce issue #103
84-
bool test_seq_12(FastAccelStepper *stepper, struct test_seq_s *seq,
82+
bool test_seq_12(FastAccelStepper* stepper, struct test_seq_s* seq,
8583
uint32_t time_ms);
8684

8785
// test case for one stepper to reproduce issue #113
88-
bool test_seq_13(FastAccelStepper *stepper, struct test_seq_s *seq,
86+
bool test_seq_13(FastAccelStepper* stepper, struct test_seq_s* seq,
8987
uint32_t time_ms);

‎examples/StepperDemo/test_seq_01.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// u32_1 shall be milliseconds from last tick
44

5-
bool test_seq_01(FastAccelStepper *stepper, struct test_seq_s *seq,
5+
bool test_seq_01(FastAccelStepper* stepper, struct test_seq_s* seq,
66
uint32_t time_ms) {
77
switch (seq->state & 15) {
88
case 0: // INIT

‎examples/StepperDemo/test_seq_02.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// u32_1 shall be number of steps
44

5-
bool test_seq_02(FastAccelStepper *stepper, struct test_seq_s *seq,
5+
bool test_seq_02(FastAccelStepper* stepper, struct test_seq_s* seq,
66
uint32_t time_ms) {
77
int32_t steps = seq->u32_1;
88
switch (seq->state) {

‎examples/StepperDemo/test_seq_03.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// u32_1 shall be number of steps
44

5-
bool test_seq_03(FastAccelStepper *stepper, struct test_seq_s *seq,
5+
bool test_seq_03(FastAccelStepper* stepper, struct test_seq_s* seq,
66
uint32_t time_ms) {
77
stepper->setSpeedInUs(40);
88
stepper->setAcceleration(10000);

‎examples/StepperDemo/test_seq_04.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// u32_1 shall be number of steps
44

5-
bool test_seq_04(FastAccelStepper *stepper, struct test_seq_s *seq,
5+
bool test_seq_04(FastAccelStepper* stepper, struct test_seq_s* seq,
66
uint32_t time_ms) {
77
stepper->setSpeedInUs(40);
88
stepper->setAcceleration(100000);

‎examples/StepperDemo/test_seq_05.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Perform 800 times a single step and then 800 steps back in one command.
66

77
#define DT 200
8-
bool test_seq_05(FastAccelStepper *stepper, struct test_seq_s *seq,
8+
bool test_seq_05(FastAccelStepper* stepper, struct test_seq_s* seq,
99
uint32_t time_ms) {
1010
switch (seq->state & 15) {
1111
case 0: // INIT

‎examples/StepperDemo/test_seq_06.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define SPEED_2_US 90
1010
#define SPEED_HOME_US 100
1111

12-
bool test_seq_06(FastAccelStepper *stepper, struct test_seq_s *seq,
12+
bool test_seq_06(FastAccelStepper* stepper, struct test_seq_s* seq,
1313
uint32_t time_ms) {
1414
if (stepper->getPositionAfterCommandsCompleted() > 32000) {
1515
seq->state = TEST_STATE_ERROR;

‎examples/StepperDemo/test_seq_07.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// u32_1 shall be milliseconds from last tick
44
//
5-
bool test_seq_07(FastAccelStepper *stepper, struct test_seq_s *seq,
5+
bool test_seq_07(FastAccelStepper* stepper, struct test_seq_s* seq,
66
uint32_t time_ms) {
77
switch (seq->state) {
88
case 0: // INIT

‎examples/StepperDemo/test_seq_08.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ struct command_s {
99

1010
int16_t old = 0;
1111

12-
bool test_seq_08(FastAccelStepper *stepper, struct test_seq_s *seq,
12+
bool test_seq_08(FastAccelStepper* stepper, struct test_seq_s* seq,
1313
uint32_t time_ms) {
1414
switch (seq->state) {
1515
case 0: // INIT
@@ -88,7 +88,7 @@ bool test_seq_08(FastAccelStepper *stepper, struct test_seq_s *seq,
8888
}
8989

9090
#else
91-
bool test_seq_08(FastAccelStepper *stepper, struct test_seq_s *seq,
91+
bool test_seq_08(FastAccelStepper* stepper, struct test_seq_s* seq,
9292
uint32_t time_ms) {
9393
return true; // finished
9494
}

‎examples/StepperDemo/test_seq_09.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "test_seq.h"
22

3-
bool test_seq_09(FastAccelStepper *stepper, struct test_seq_s *seq,
3+
bool test_seq_09(FastAccelStepper* stepper, struct test_seq_s* seq,
44
uint32_t time_ms) {
55
switch (seq->state) {
66
case 0: // INIT

0 commit comments

Comments
 (0)