35 #ifndef _DBW_FCA_CAN_PEDAL_LUT_H 36 #define _DBW_FCA_CAN_PEDAL_LUT_H 72 for (
unsigned int i = 1; i < size; i++) {
78 if (fabsf(dpedal) > (float)1e-6) {
79 return start + (dinput * dtorque / dpedal);
81 return start + (dtorque / 2);
92 }
else if (torque >=
BRAKE_TABLE[size - 1].torque) {
95 for (
unsigned int i = 1; i < size; i++) {
101 if (fabsf(dtorque) > (float)1e-6) {
102 return start + (dinput * dpedal / dtorque);
104 return start + (dpedal / 2);
122 for (
unsigned int i = 1; i < size; i++) {
128 if (fabsf(dpercent) > (float)1e-6) {
129 return start + (dinput * dpedal / dpercent);
131 return start + (dpedal / 2);
146 for (
unsigned int i = 1; i < size; i++) {
152 if (fabsf(dpedal) > (float) 1e-6) {
153 return start + (dinput * dpercent / dpedal);
155 return start + (dpercent / 2);
165 #endif // _DBW_FCA_CAN_PEDAL_LUT_H
static float brakePedalFromPercent(float percent)
static const struct dbw_fca_can::@17 THROTTLE_TABLE[]
static float brakeTorqueFromPedal(float pedal)
static float brakePedalFromTorque(float torque)
static const struct dbw_fca_can::@16 BRAKE_TABLE[]
static float throttlePedalFromPercent(float percent)
static float throttlePercentFromPedal(float pedal)