Skip to content

Commit

Permalink
Limit max motor speed to 20% in reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenmadaffri committed Sep 29, 2023
1 parent e421e3a commit 31439f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Apps/Src/SendTritium.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ static void ReverseDriveHandler(){
UpdateDisplay_SetGear(DISP_REVERSE);
}
velocitySetpoint = -MAX_VELOCITY;
currentSetpoint = percentToFloat(map(accelPedalPercent, ACCEL_PEDAL_THRESHOLD, PEDAL_MAX, CURRENT_SP_MIN, CURRENT_SP_MAX));
currentSetpoint = percentToFloat(map(accelPedalPercent, ACCEL_PEDAL_THRESHOLD, PEDAL_MAX, CURRENT_SP_MIN, CURRENT_SP_MAX * 0.2)); // Limit max motor speed to 20% in reverse
cruiseEnable = false;
onePedalEnable = false;
}
Expand Down Expand Up @@ -626,7 +626,7 @@ static void BrakeDecider(){
void Task_SendTritium(void *p_arg){
OS_ERR err;

// Initialize current state to FORWARD_DRIVE
// Initialize current state to NEUTRAL_DRIVE
state = FSM[NEUTRAL_DRIVE];
prevState = FSM[NEUTRAL_DRIVE];

Expand Down

0 comments on commit 31439f2

Please sign in to comment.