-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pedal to torque #254
base: develop
Are you sure you want to change the base?
Pedal to torque #254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just a few changes
Core/Src/pedals.c
Outdated
@@ -371,8 +390,12 @@ void handle_endurance(dti_t *mc, float mph, float accel_val, float brake_val) | |||
if (brake_val > 650 && (mph * 1.609) > 5) { | |||
brake_pedal_regen(brake_val); | |||
} else { | |||
// accelerating, limit torque | |||
// accelerating, limit torque | |||
#ifndef POWER_REGRESSION_PEDAL_TORQUE_TRANSFER |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want this for brake regen, just for linear accel -> torque
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this lgtm. @jr1221 can we get your review on this?
@@ -27,7 +27,7 @@ | |||
0x496 /* Throttle signal, Brake signal, IO, Drive enable */ | |||
|
|||
#define TIRE_DIAMETER 16 /* inches */ | |||
#define GEAR_RATIO 47 / 13.0 /* unitless */ | |||
#define GEAR_RATIO 35 / 13.0 /* unitless */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where did you find this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I messaged Abby directly
Changes
_New pedal to torque transfer curve as shown below. Between 0 and 20% pedal throttle the applied throttle is about halved, then afterwards it slowly approaches a 1:1 applied vs outputted throttle.
Test Cases
To Do
Closes #248