DriveMaster
Loading...
Searching...
No Matches
DriveMaster.h
Go to the documentation of this file.
1
6#pragma once
7#ifndef DRIVEMASTER_H
8#define DRIVEMASTER_H
9
10#include <Arduino.h>
11
16{
17public:
22 DriveMaster(int pin);
23
29 DriveMaster(int pin, int dir_pin);
30
34 virtual ~DriveMaster();
35
39 virtual void begin();
40
46 virtual void write(uint16_t value, bool telemetery = false);
47
56 virtual void write(int16_t value);
57
62 virtual void sendCommand(uint16_t value);
63
68 virtual void sendValue(uint16_t value);
69
70protected:
71 int _pin;
73};
74#include "dshot.h"
75#include "HBridge.h"
76#endif
Header file for the HBridge class.
Base class for motor control.
Definition DriveMaster.h:16
virtual void sendCommand(uint16_t value)
Send a command to the motor.
Definition DriveMaster.cpp:14
virtual void write(uint16_t value, bool telemetery=false)
Write a command to the motor.
Definition DriveMaster.cpp:11
virtual void sendValue(uint16_t value)
Send a value to the motor.
Definition DriveMaster.cpp:15
virtual void begin()
Initialize the motor control.
Definition DriveMaster.cpp:9
int _pin
Definition DriveMaster.h:71
DriveMaster(int pin)
Construct a new DriveMaster object with only the pin.
Definition DriveMaster.cpp:3
virtual ~DriveMaster()
Destroy the DriveMaster object.
Definition DriveMaster.cpp:7
int _dir_pin
Definition DriveMaster.h:72
Header file for the dshot class.