Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
sm_servo.h
- Committer:
- GaspardD
- Date:
- 2019-10-03
- Revision:
- 9:1b54bac6d9a7
- Parent:
- 8:f23601373e8b
- Child:
- 12:58ad06f9847d
File content as of revision 9:1b54bac6d9a7:
#ifndef H_SM_SERVO #define H_SM_SERVO #include "utils.h" #include "odom.h" #define SERVO_PERIOD_DURATION_MS 20 //20ms is default but 10ms seems ok #define SERVO_PULSE_MIDDLE_US 1500 #define SERVO_PULSE_MAX_US 2000 #define SERVO_PULSE_MIN_US 1050 /* Enums */ typedef enum{ SERVO_INIT, SERVO_COMMAND }E_STATE_SERVO; /* Variables */ /* Functions */ void init_sm_servo(); void update_sm_servo(); void output_sm_servo(); double compute_angle_correction(double consigne); double pwmFromAngle(double angleDeg); double positionOnTrack(); #endif