You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
555 B

3 years ago
3 years ago
3 years ago
  1. #include "motor_drive.h"
  2. #include "esp_log.h"
  3. #define MOTOR_DRIVE "MOTOR_DRIVE"
  4. void motor_drive_uart_init() {}
  5. void motor_drive_turn(int direction, int speed_level, double position) {
  6. if ((direction > 2) || (direction < 0)) {
  7. ESP_LOGW(MOTOR_DRIVE, "Direction out of range");
  8. }
  9. if ((speed_level > 9) || (speed_level < 0)) {
  10. ESP_LOGW(MOTOR_DRIVE, "Speed level out of range");
  11. }
  12. if ((position > 360) || (position <= 0)) {
  13. ESP_LOGW(MOTOR_DRIVE, "Position out of range");
  14. }
  15. }
  16. double motor_drive_read_encoder() { return 0.0; }