File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
examples/Tools/Test_Motor_Angular_Control Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ void test_motor(int const id)
35
35
Serial.println (" OK." );
36
36
delay (1500 );
37
37
38
- for (float target_angle = 0 .0f ; target_angle < 315 . 0f ; target_angle += 1 .0f )
38
+ for (float target_angle = 0 .0f ; target_angle < SmartServoClass::MAX_ANGLE ; target_angle += 1 .0f )
39
39
{
40
40
Braccio.get (id).move ().to (target_angle).in (200ms);
41
41
delay (250 );
Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ class SmartServoClass
74
74
inline int getErrors () const { return _errors; }
75
75
76
76
static const int BROADCAST = 0xFE ;
77
+ static float constexpr MAX_ANGLE = 315 .0f ;
77
78
78
79
private:
79
80
80
- static int constexpr NUM_MOTORS = 6 ;
81
- static int constexpr MAX_TX_PAYLOAD_LEN = (5 *NUM_MOTORS+4 );
82
- static int constexpr MAX_RX_PAYLOAD_LEN = 10 ;
83
- static int constexpr MAX_POSITION = 4000 ;
84
- static float constexpr MAX_ANGLE = 315 .0f ;
81
+ static int constexpr NUM_MOTORS = 6 ;
82
+ static int constexpr MAX_TX_PAYLOAD_LEN = (5 *NUM_MOTORS+4 );
83
+ static int constexpr MAX_RX_PAYLOAD_LEN = 10 ;
84
+ static int constexpr MAX_POSITION = 4000 ;
85
85
86
86
static int constexpr MIN_MOTOR_ID = 1 ;
87
87
static int constexpr MAX_MOTOR_ID = 6 ;
You can’t perform that action at this time.
0 commit comments