Skip to content

Commit

Permalink
ben skill issue - forgot out.brakePressed in eval function with one b…
Browse files Browse the repository at this point in the history
…rake sensor
  • Loading branch information
walkermburns committed Apr 10, 2024
1 parent bfe263a commit 84a65b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/systems/src/PedalsSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ PedalsSystemData_s PedalsSystem::evaluate_pedals(const AnalogConversion_s &accel

out.brakePercent = brake.conversion;
out.brakePercent = remove_deadzone_(out.brakePercent, brakeParams_.deadzone_margin);
out.brakePressed = brake.conversion >= brakeParams_.activation_percentage;

out.regenPercent = std::max(std::min(out.brakePercent / brakeParams_.mechanical_activation_percentage, 1.0f), 0.0f);
out.mechBrakeActive = out.brakePercent > brakeParams_.mechanical_activation_percentage;
Expand Down

0 comments on commit 84a65b0

Please sign in to comment.