Added thread safety to USB TX, servo control thread, primitive ADC thread, python test codes
This commit is contained in:
@@ -2,12 +2,26 @@
|
||||
#define SERVO_H
|
||||
|
||||
|
||||
|
||||
#define NUM_SERVO_CHANNELS 18
|
||||
#define SERVO_CENTER_PULSE 1500
|
||||
#define SERVO_MIN_PULSE 750
|
||||
#define SERVO_MAX_PULSE 2500
|
||||
#define SERVO_HALF_PULSE_RANGE 875
|
||||
#define SERVO_MAX_ANGLE 2.3561944902f
|
||||
#define SERVO_MIN_ANGLE -2.3561944902f
|
||||
#define SERVO_ANGLE_PULSE_MULTIPLIER 371.3615338798826f
|
||||
|
||||
|
||||
struct servo_t {
|
||||
float current_position;
|
||||
float set_position;
|
||||
};
|
||||
|
||||
|
||||
int servo_init();
|
||||
void servo_set_angle(int channel, float angle);
|
||||
void servo_set_all_angles(float angles[NUM_SERVO_CHANNELS]);
|
||||
int servo_set(int channel, float angle);
|
||||
|
||||
|
||||
#endif // SERVO_H
|
||||
Reference in New Issue
Block a user