Skip to content

Commit

Permalink
update max torque for 208!!! yay
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbrook committed May 31, 2024
1 parent 0fe15fb commit 37ddede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions include/parameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#define D_KI 0.3
#define D_KD 0.5
#define D_OUTPUT_MIN 0.0 // Minimum output of the PID controller
#define D_OUTPUT_MAX 2400 // Max output of the PID controller
#define D_OUTPUT_MAX 1600 // Max output of the PID controller
#define BANGBANG_RANGE 1000.0
#define PID_TIMESTEP 100.0
#define PID_MODE false //enable cruise control
Expand Down Expand Up @@ -64,9 +64,9 @@ const double FILTERING_ALPHA_10HZ = 2 * 3.14 * cutoff_10hz / (1 + 2 * 3.14 * cut
// Note that the variable max_torque is uin8_t
// So it will overflow past a value of 255
const uint8_t TORQUE_1 = 10; // 1st Torque setting
const uint8_t TORQUE_2 = 120; //2nd torque setting
const uint8_t TORQUE_3 = 180; //3rd torque setting
const uint8_t TORQUE_4 = 240; //4th torque setting
const uint8_t TORQUE_2 = 54; //2nd torque setting
const uint8_t TORQUE_3 = 110; //3rd torque setting
const uint8_t TORQUE_4 = 160; //4th torque setting
// List of torque modes (Nm)
const int torque_mode_list[]={TORQUE_1,TORQUE_2,TORQUE_3,TORQUE_4};

Expand Down
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ void setup()

mcu_status.set_inverter_powered(true); // note VCU does not control inverter power on rev3
mcu_status.set_torque_mode(1); // TODO torque modes should be an enum
mcu_status.set_max_torque(TORQUE_1); // TORQUE_1=60nm, 2=120nm, 3=180nm, 4=240nm
mcu_status.set_max_torque(TORQUE_1); // TORQUE_1=10nm, 2=54nm, 3=180nm, 4=240nm
state_machine.init_state_machine(mcu_status);
}

Expand Down

0 comments on commit 37ddede

Please sign in to comment.