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)
3535 Serial.println (" OK." );
3636 delay (1500 );
3737
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 )
3939 {
4040 Braccio.get (id).move ().to (target_angle).in (200ms);
4141 delay (250 );
Original file line number Diff line number Diff line change @@ -74,14 +74,14 @@ class SmartServoClass
7474 inline int getErrors () const { return _errors; }
7575
7676 static const int BROADCAST = 0xFE ;
77+ static float constexpr MAX_ANGLE = 315 .0f ;
7778
7879private:
7980
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 ;
8585
8686 static int constexpr MIN_MOTOR_ID = 1 ;
8787 static int constexpr MAX_MOTOR_ID = 6 ;
You can’t perform that action at this time.
0 commit comments