Rework library without unix sockets for now
This commit is contained in:
parent
e9ae1a320a
commit
0bef6035ae
30 changed files with 987 additions and 136 deletions
26
server_v2/include/Motors.hpp
Normal file
26
server_v2/include/Motors.hpp
Normal 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
|
Reference in a new issue