Skip to content

Commit 8998b1d

Browse files
committed
FEAT refactured examples to account for changes in limits
1 parent 0d83541 commit 8998b1d

File tree

15 files changed

+27
-27
lines changed

15 files changed

+27
-27
lines changed

examples/hardware_specific_examples/Bluepill_examples/encoder/bluepill_position_control/bluepill_position_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void setup() {
4545
motor.PI_velocity.P = 0.2;
4646
motor.PI_velocity.I = 20;
4747
// default voltage_power_supply
48-
motor.PI_velocity.voltage_limit = 6;
48+
motor.voltage_limit = 6;
4949
// jerk control using voltage voltage ramp
5050
// default value is 300 volts per sec ~ 0.3V per millisecond
5151
motor.PI_velocity.voltage_ramp = 1000;
@@ -56,7 +56,7 @@ void setup() {
5656
// angle P controller
5757
motor.P_angle.P = 20;
5858
// maximal velocity of the position control
59-
motor.P_angle.velocity_limit = 4;
59+
motor.velocity_limit = 4;
6060

6161

6262
// use monitoring with serial

examples/hardware_specific_examples/Bluepill_examples/magnetic_sensor/bluepill_position_control/bluepill_position_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void setup() {
4646
motor.PI_velocity.P = 0.2;
4747
motor.PI_velocity.I = 20;
4848
// maximal voltage to be set to the motor
49-
motor.PI_velocity.voltage_limit = 6;
49+
motor.voltage_limit = 6;
5050

5151
// velocity low pass filtering time constant
5252
// the lower the less filtered
@@ -55,7 +55,7 @@ void setup() {
5555
// angle P controller
5656
motor.P_angle.P = 20;
5757
// maximal velocity of the position control
58-
motor.P_angle.velocity_limit = 40;
58+
motor.velocity_limit = 40;
5959

6060
// use monitoring with serial
6161
Serial.begin(115200);

examples/hardware_specific_examples/DRV8305_driver/motor_full_control_serial_examples/encoder/full_control_serial/full_control_serial.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ void setup() {
6767
motor.PI_velocity.P = 0.2;
6868
motor.PI_velocity.I = 20;
6969
// default voltage_power_supply
70-
motor.PI_velocity.voltage_limit = 12;
70+
motor.voltage_limit = 12;
7171

7272
// velocity low pass filtering time constant
7373
motor.LPF_velocity.Tf = 0.01;
7474

7575
// angle loop controller
7676
motor.P_angle.P = 20;
7777
// angle loop velocity limit
78-
motor.P_angle.velocity_limit = 50;
78+
motor.velocity_limit = 50;
7979

8080
// use monitoring with serial for motor init
8181
// monitoring port

examples/hardware_specific_examples/ESP32/encoder/esp32_position_control/esp32_position_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void setup() {
4141
motor.PI_velocity.P = 0.2;
4242
motor.PI_velocity.I = 20;
4343
// default voltage_power_supply
44-
motor.PI_velocity.voltage_limit = 6;
44+
motor.voltage_limit = 6;
4545
// jerk control using voltage voltage ramp
4646
// default value is 300 volts per sec ~ 0.3V per millisecond
4747
motor.PI_velocity.voltage_ramp = 1000;
@@ -52,7 +52,7 @@ void setup() {
5252
// angle P controller
5353
motor.P_angle.P = 20;
5454
// maximal velocity of the position control
55-
motor.P_angle.velocity_limit = 4;
55+
motor.velocity_limit = 4;
5656

5757

5858
// use monitoring with serial

examples/hardware_specific_examples/ESP32/magnetic_sensor/esp32_position_control/esp32_position_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void setup() {
4545
motor.PI_velocity.P = 0.2;
4646
motor.PI_velocity.I = 20;
4747
// maximal voltage to be set to the motor
48-
motor.PI_velocity.voltage_limit = 6;
48+
motor.voltage_limit = 6;
4949

5050
// velocity low pass filtering time constant
5151
// the lower the less filtered
@@ -54,7 +54,7 @@ void setup() {
5454
// angle P controller
5555
motor.P_angle.P = 20;
5656
// maximal velocity of the position control
57-
motor.P_angle.velocity_limit = 40;
57+
motor.velocity_limit = 40;
5858

5959
// use monitoring with serial
6060
Serial.begin(115200);

examples/hardware_specific_examples/HMBGC_example/position_control/position_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void setup() {
5959
motor.PI_velocity.P = 0.2;
6060
motor.PI_velocity.I = 20;
6161
// default voltage_power_supply
62-
motor.PI_velocity.voltage_limit = 6;
62+
motor.voltage_limit = 6;
6363
// jerk control using voltage voltage ramp
6464
// default value is 300 volts per sec ~ 0.3V per millisecond
6565
motor.PI_velocity.voltage_ramp = 1000;
@@ -70,7 +70,7 @@ void setup() {
7070
// angle P controller
7171
motor.P_angle.P = 20;
7272
// maximal velocity of the position control
73-
motor.P_angle.velocity_limit = 4;
73+
motor.velocity_limit = 4;
7474

7575

7676
// use monitoring with serial

examples/motion_control/position_motion_control/encoder/angle_control/angle_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void setup() {
7070
motor.PI_velocity.P = 0.2;
7171
motor.PI_velocity.I = 20;
7272
// default voltage_power_supply
73-
motor.PI_velocity.voltage_limit = 6;
73+
motor.voltage_limit = 6;
7474
// jerk control using voltage voltage ramp
7575
// default value is 300 volts per sec ~ 0.3V per millisecond
7676
motor.PI_velocity.voltage_ramp = 1000;
@@ -81,7 +81,7 @@ void setup() {
8181
// angle P controller
8282
motor.P_angle.P = 20;
8383
// maximal velocity of the position control
84-
motor.P_angle.velocity_limit = 4;
84+
motor.velocity_limit = 4;
8585

8686

8787
// use monitoring with serial

examples/motion_control/position_motion_control/hall_sensor/angle_control/angle_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void setup() {
6363
motor.PI_velocity.P = 0.2;
6464
motor.PI_velocity.I = 2;
6565
// default voltage_power_supply
66-
motor.PI_velocity.voltage_limit = 6;
66+
motor.voltage_limit = 6;
6767
// jerk control using voltage voltage ramp
6868
// default value is 300 volts per sec ~ 0.3V per millisecond
6969
motor.PI_velocity.voltage_ramp = 1000;
@@ -74,7 +74,7 @@ void setup() {
7474
// angle P controller
7575
motor.P_angle.P = 20;
7676
// maximal velocity of the position control
77-
motor.P_angle.velocity_limit = 4;
77+
motor.velocity_limit = 4;
7878

7979

8080
// use monitoring with serial

examples/motion_control/position_motion_control/magnetic_sensor/angle_control/angle_control.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void setup() {
4343
motor.PI_velocity.P = 0.2;
4444
motor.PI_velocity.I = 20;
4545
// maximal voltage to be set to the motor
46-
motor.PI_velocity.voltage_limit = 6;
46+
motor.voltage_limit = 6;
4747

4848
// velocity low pass filtering time constant
4949
// the lower the less filtered
@@ -52,7 +52,7 @@ void setup() {
5252
// angle P controller
5353
motor.P_angle.P = 20;
5454
// maximal velocity of the position control
55-
motor.P_angle.velocity_limit = 20;
55+
motor.velocity_limit = 20;
5656

5757
// use monitoring with serial
5858
Serial.begin(115200);

examples/motion_control/velocity_motion_control/encoder/velocity_control/velocity_control.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void setup() {
7171
motor.PI_velocity.P = 0.2;
7272
motor.PI_velocity.I = 20;
7373
// default voltage_power_supply
74-
motor.PI_velocity.voltage_limit = 6;
74+
motor.voltage_limit = 6;
7575
// jerk control using voltage voltage ramp
7676
// default value is 300 volts per sec ~ 0.3V per millisecond
7777
motor.PI_velocity.voltage_ramp = 1000;

0 commit comments

Comments
 (0)