35 #ifndef _DBW_MKZ_CAN_PEDAL_LUT_H 36 #define _DBW_MKZ_CAN_PEDAL_LUT_H 71 for (
unsigned int i = 1; i < size; i++) {
77 if (fabsf(dpedal) > (float)1e-6) {
78 return start + (dinput * dtorque / dpedal);
80 return start + (dtorque / 2);
91 }
else if (torque >=
BRAKE_TABLE[size - 1].torque) {
94 for (
unsigned int i = 1; i < size; i++) {
100 if (fabsf(dtorque) > (float)1e-6) {
101 return start + (dinput * dpedal / dtorque);
103 return start + (dpedal / 2);
120 for (
unsigned int i = 1; i < size; i++) {
126 if (fabsf(dpercent) > (float)1e-6) {
127 return start + (dinput * dpedal / dpercent);
129 return start + (dpedal / 2);
143 for (
unsigned int i = 1; i < size; i++) {
149 if (fabsf(dpedal) > (float) 1e-6) {
150 return start + (dinput * dpercent / dpedal);
152 return start + (dpercent / 2);
162 #endif // _DBW_MKZ_CAN_PEDAL_LUT_H static float brakeTorqueFromPedal(float pedal)
static float brakePedalFromPercent(float percent)
static float throttlePercentFromPedal(float pedal)
static const struct dbw_mkz_can::@16 BRAKE_TABLE[]
static float throttlePedalFromPercent(float percent)
static float brakePedalFromTorque(float torque)
static const struct dbw_mkz_can::@17 THROTTLE_TABLE[]