Rework library without unix sockets for now

This commit is contained in:
Konstantin Lampalzer 2022-05-21 23:29:55 +02:00
parent e9ae1a320a
commit 0bef6035ae
30 changed files with 987 additions and 136 deletions

View file

@ -0,0 +1,26 @@
#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