Skip to content

Commit ca5d9e3

Browse files
committed
FEAT addded the defualts file
1 parent 452aeef commit ca5d9e3

File tree

5 files changed

+40
-40
lines changed

5 files changed

+40
-40
lines changed
29.6 KB
Binary file not shown.

arduino_foc_minimal_encoder/BLDCMotor.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,7 @@
44
#include "Arduino.h"
55
#include "FOCutils.h"
66
#include "Sensor.h"
7-
8-
// default configuration values
9-
// power supply voltage
10-
#define DEF_POWER_SUPPLY 12.0
11-
// velocity PI controller params
12-
#define DEF_PI_VEL_P 0.5
13-
#define DEF_PI_VEL_I 10
14-
#define DEF_PI_VEL_U_RAMP 300
15-
// angle P params
16-
#define DEF_P_ANGLE_P 20
17-
// angle velocity limit default
18-
#define DEF_P_ANGLE_VEL_LIM 20
19-
// index search velocity
20-
#define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
21-
// velocity PI controller params for index search
22-
#define DEF_PI_VEL_INDEX_P 1
23-
#define DEF_PI_VEL_INDEX_I 10
24-
#define DEF_PI_VEL_INDEX_U_RAMP 100
25-
// velocity filter time constant
26-
#define DEF_VEL_FILTER_Tf 0.005
7+
#include "default.h
278
289
// controller type configuration enum
2910
enum ControlType{
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// default configuration values
2+
// power supply voltage
3+
#define DEF_POWER_SUPPLY 12.0
4+
// velocity PI controller params
5+
#define DEF_PI_VEL_P 0.5
6+
#define DEF_PI_VEL_I 10
7+
#define DEF_PI_VEL_U_RAMP 300
8+
// angle P params
9+
#define DEF_P_ANGLE_P 20
10+
// angle velocity limit default
11+
#define DEF_P_ANGLE_VEL_LIM 20
12+
// index search velocity
13+
#define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
14+
// velocity PI controller params for index search
15+
#define DEF_PI_VEL_INDEX_P 1
16+
#define DEF_PI_VEL_INDEX_I 10
17+
#define DEF_PI_VEL_INDEX_U_RAMP 100
18+
// velocity filter time constant
19+
#define DEF_VEL_FILTER_Tf 0.005

arduino_foc_minimal_magnetic/BLDCMotor.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,7 @@
44
#include "Arduino.h"
55
#include "FOCutils.h"
66
#include "Sensor.h"
7-
8-
// default configuration values
9-
// power supply voltage
10-
#define DEF_POWER_SUPPLY 12.0
11-
// velocity PI controller params
12-
#define DEF_PI_VEL_P 0.5
13-
#define DEF_PI_VEL_I 10
14-
#define DEF_PI_VEL_U_RAMP 300
15-
// angle P params
16-
#define DEF_P_ANGLE_P 20
17-
// angle velocity limit default
18-
#define DEF_P_ANGLE_VEL_LIM 20
19-
// index search velocity
20-
#define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
21-
// velocity PI controller params for index search
22-
#define DEF_PI_VEL_INDEX_P 1
23-
#define DEF_PI_VEL_INDEX_I 10
24-
#define DEF_PI_VEL_INDEX_U_RAMP 100
25-
// velocity filter time constant
26-
#define DEF_VEL_FILTER_Tf 0.005
7+
#include "defaults.h"
278

289
// controller type configuration enum
2910
enum ControlType{
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// default configuration values
2+
// power supply voltage
3+
#define DEF_POWER_SUPPLY 12.0
4+
// velocity PI controller params
5+
#define DEF_PI_VEL_P 0.5
6+
#define DEF_PI_VEL_I 10
7+
#define DEF_PI_VEL_U_RAMP 300
8+
// angle P params
9+
#define DEF_P_ANGLE_P 20
10+
// angle velocity limit default
11+
#define DEF_P_ANGLE_VEL_LIM 20
12+
// index search velocity
13+
#define DEF_INDEX_SEARCH_TARGET_VELOCITY 1
14+
// velocity PI controller params for index search
15+
#define DEF_PI_VEL_INDEX_P 1
16+
#define DEF_PI_VEL_INDEX_I 10
17+
#define DEF_PI_VEL_INDEX_U_RAMP 100
18+
// velocity filter time constant
19+
#define DEF_VEL_FILTER_Tf 0.005

0 commit comments

Comments
 (0)