@@ -35,8 +35,8 @@ DiffChassis::DiffChassis(std::initializer_list<int8_t> left_motors,
35
35
36
36
this ->slew_step = slew_step > 0 ? slew_step : 200 ;
37
37
this ->brakeMode = brakeMode;
38
- this ->left_motors ->set_brake_mode (this ->brakeMode );
39
- this ->right_motors ->set_brake_mode (this ->brakeMode );
38
+ this ->left_motors ->set_brake_mode_all (this ->brakeMode );
39
+ this ->right_motors ->set_brake_mode_all (this ->brakeMode );
40
40
this ->prev_voltages = {0 , 0 };
41
41
}
42
42
@@ -55,8 +55,8 @@ void DiffChassis::arcade(double forward_speed, double turn_speed) {
55
55
56
56
void DiffChassis::set_brake_mode (pros::motor_brake_mode_e mode) {
57
57
this ->brakeMode = mode;
58
- this ->left_motors ->set_brake_mode (mode);
59
- this ->right_motors ->set_brake_mode (mode);
58
+ this ->left_motors ->set_brake_mode_all (mode);
59
+ this ->right_motors ->set_brake_mode_all (mode);
60
60
}
61
61
62
62
// Evoke the chassis to move according to how it was set up using the
@@ -114,7 +114,7 @@ bool DiffChassis::execute(DiffChassisCommand cmd, double max) {
114
114
[this , max](diff_commands::Swing& v) {
115
115
double v_max = std::max (fabs (v.left ), fabs (v.right ));
116
116
if (v.right == 0 ) {
117
- this ->right_motors ->set_brake_mode (pros::MotorBrake::hold);
117
+ this ->right_motors ->set_brake_mode_all (pros::MotorBrake::hold);
118
118
this ->right_motors ->brake ();
119
119
if (v_max > max) {
120
120
v.left = v.left * max / v_max;
@@ -124,7 +124,7 @@ bool DiffChassis::execute(DiffChassisCommand cmd, double max) {
124
124
this ->prev_voltages = {v.left , 0.0 };
125
125
126
126
} else if (v.left == 0 ) {
127
- this ->left_motors ->set_brake_mode (pros::MotorBrake::hold);
127
+ this ->left_motors ->set_brake_mode_all (pros::MotorBrake::hold);
128
128
this ->left_motors ->brake ();
129
129
if (v_max > max) {
130
130
v.right = v.right * max / v_max;
0 commit comments