|
|
@ -5,18 +5,18 @@ |
|
|
|
#include "driver/ledc.h" |
|
|
|
#include "semaphore.h" |
|
|
|
|
|
|
|
static constexpr uint16_t MIN_PULSE_MS = 544; // the shortest pulse sent to a servo
|
|
|
|
static constexpr uint16_t MAX_PULSE_MS = 2400; // the longest pulse sent to a servo
|
|
|
|
static constexpr uint16_t DEFAULT_PULSE_MS = 1500; // default pulse width
|
|
|
|
static constexpr uint16_t PROGMEM MIN_PULSE_MS = 544; // the shortest pulse sent to a servo
|
|
|
|
static constexpr uint16_t PROGMEM MAX_PULSE_MS = 2400; // the longest pulse sent to a servo
|
|
|
|
static constexpr uint16_t PROGMEM DEFAULT_PULSE_MS = 1500; // default pulse width
|
|
|
|
|
|
|
|
static constexpr int TIMER_WIDTH = LEDC_TIMER_15_BIT; |
|
|
|
static constexpr uint16_t MIN_PULSE_WIDTH = (1 << TIMER_WIDTH) * MIN_PULSE_MS / 20000; // the shortest pulse sent to a servo
|
|
|
|
static constexpr uint16_t MAX_PULSE_WIDTH = (1 << TIMER_WIDTH) * MAX_PULSE_MS / 20000; // the longest pulse sent to a servo
|
|
|
|
static constexpr uint16_t DEFAULT_PULSE_WIDTH = (1 << TIMER_WIDTH) * DEFAULT_PULSE_MS / 20000; // default pulse width
|
|
|
|
static constexpr int PROGMEM TIMER_WIDTH = LEDC_TIMER_15_BIT; |
|
|
|
static constexpr uint16_t PROGMEM MIN_PULSE_WIDTH = (1 << TIMER_WIDTH) * MIN_PULSE_MS / 20000; // the shortest pulse sent to a servo
|
|
|
|
static constexpr uint16_t PROGMEM MAX_PULSE_WIDTH = (1 << TIMER_WIDTH) * MAX_PULSE_MS / 20000; // the longest pulse sent to a servo
|
|
|
|
static constexpr uint16_t PROGMEM DEFAULT_PULSE_WIDTH = (1 << TIMER_WIDTH) * DEFAULT_PULSE_MS / 20000; // default pulse width
|
|
|
|
|
|
|
|
static constexpr uint8_t LEDC_NUM_CHANNELS = 8; // default pulse width
|
|
|
|
static constexpr uint8_t PROGMEM LEDC_NUM_CHANNELS = 8; // default pulse width
|
|
|
|
|
|
|
|
static constexpr TickType_t TIMEOUT = portMAX_DELAY; |
|
|
|
static constexpr TickType_t PROGMEM TIMEOUT = portMAX_DELAY; |
|
|
|
|
|
|
|
class Pusher { |
|
|
|
public: |
|
|
|