This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compLIB/server_v2/include/Motors.hpp
2022-05-21 23:31:23 +02:00

26 lines
425 B
C++

#ifndef COMPLIB_SERVER_MOTORS_HPP
#define COMPLIB_SERVER_MOTORS_HPP
#include <cstdint>
class Motors {
public:
enum Mode : uint8_t {
COAST = 0,
FORWARD = 1,
BACKWARD = 2,
BREAK = 3,
SERVO = 4,
NONE = 5
};
static void set_power(uint8_t port, double percent);
static void set_pwm(uint8_t port, uint16_t pwm, Mode mode);
private:
Motors() = default;
};
#endif //COMPLIB_SERVER_MOTORS_HPP