SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
BLDCDriver.h
Go to the documentation of this file.
1#ifndef BLDCDRIVER_H
2#define BLDCDRIVER_H
3
4#include "Arduino.h"
5#include "FOCDriver.h"
6
7class BLDCDriver: public FOCDriver{
8 public:
9
10 float dc_a; //!< currently set duty cycle on phaseA
11 float dc_b; //!< currently set duty cycle on phaseB
12 float dc_c; //!< currently set duty cycle on phaseC
13
14 /**
15 * Set phase voltages to the hardware
16 *
17 * @param Ua - phase A voltage
18 * @param Ub - phase B voltage
19 * @param Uc - phase C voltage
20 */
21 virtual void setPwm(float Ua, float Ub, float Uc) = 0;
22
23 /**
24 * Set phase state, enable/disable
25 *
26 * @param sc - phase A state : active / disabled ( high impedance )
27 * @param sb - phase B state : active / disabled ( high impedance )
28 * @param sa - phase C state : active / disabled ( high impedance )
29 */
30 virtual void setPhaseState(PhaseState sa, PhaseState sb, PhaseState sc) = 0;
31
32 /** driver type getter function */
33 virtual DriverType type() override { return DriverType::BLDC; };
34};
35
36#endif
DriverType
Definition FOCDriver.h:15
@ BLDC
Definition FOCDriver.h:17
PhaseState
Definition FOCDriver.h:7
virtual DriverType type() override
Definition BLDCDriver.h:33
float dc_a
currently set duty cycle on phaseA
Definition BLDCDriver.h:10
float dc_b
currently set duty cycle on phaseB
Definition BLDCDriver.h:11
virtual void setPhaseState(PhaseState sa, PhaseState sb, PhaseState sc)=0
virtual void setPwm(float Ua, float Ub, float Uc)=0
float dc_c
currently set duty cycle on phaseC
Definition BLDCDriver.h:12