File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change
1
+ #ifndef FOCDRIVER_H
2
+ #define FOCDRIVER_H
3
+
4
+ class FOCDriver {
5
+ public:
6
+ /* * Initialise hardware */
7
+ virtual void init ();
8
+ /* * Enable hardware */
9
+ virtual void enable ();
10
+ /* * Disable hardware */
11
+ virtual void disable ();
12
+
13
+
14
+ /* * Set the pwm frequency */
15
+ virtual void setPwmFrequency (long frequency);
16
+ };
17
+
18
+ #endif
Original file line number Diff line number Diff line change 3
3
4
4
#include " Arduino.h"
5
5
#include " Sensor.h"
6
- #include " FOCDriver.h"
7
6
8
7
#include " ../hardware_utils.h"
9
8
#include " ../foc_utils.h"
@@ -56,13 +55,6 @@ class FOCMotor
56
55
*/
57
56
void linkSensor (Sensor* sensor);
58
57
59
- /* *
60
- * Function linking a motor and a foc driver
61
- *
62
- * @param driver FOCDriver class implementing all the hardware specific functions necessary PWM setting
63
- */
64
- void linkDriver (FOCDriver* driver);
65
-
66
58
/* *
67
59
* Function initializing FOC algorithm
68
60
* and aligning sensor's and motors' zero position
@@ -195,12 +187,6 @@ class FOCMotor
195
187
* - HallSensor
196
188
*/
197
189
Sensor* sensor;
198
- /* *
199
- * FOCDriver link:
200
- * - 3PWM
201
- * - 6PWM
202
- */
203
- FOCDriver* driver;
204
190
// monitoring functions
205
191
Print* monitor_port; // !< Serial terminal variable if provided
206
192
};
You can’t perform that action at this time.
0 commit comments