From ace8e3771b8801ef9de427db1cdd12f58f53ad02 Mon Sep 17 00:00:00 2001 From: Mingcan Li Date: Sun, 3 Mar 2024 12:07:10 -0600 Subject: [PATCH] Fix motor/motion --- .../Components/Motor_Motion/Motor_Motion.js | 161 ++---------------- 1 file changed, 11 insertions(+), 150 deletions(-) diff --git a/Frontend/src/Components/Motor_Motion/Motor_Motion.js b/Frontend/src/Components/Motor_Motion/Motor_Motion.js index d11dd037..b2aafb88 100644 --- a/Frontend/src/Components/Motor_Motion/Motor_Motion.js +++ b/Frontend/src/Components/Motor_Motion/Motor_Motion.js @@ -45,7 +45,7 @@ export default function Motor_Motion(props) { borderRadius='md' borderColor={borderCol} > - {props.data?.fr_out[0] ? 'F' : 'R'} + {} @@ -64,7 +64,7 @@ export default function Motor_Motion(props) { borderRadius='md' borderColor={borderCol} > - {props.data?.state[0] ?? "?"} + {props.data?.mcc_state[0] ?? "?"} @@ -98,7 +98,7 @@ export default function Motor_Motion(props) {
Accelerator - {props.data?.accelerator[0].toFixed(0) ?? -1.0} {CONSTANTS.accelerator.UNIT} + {props.data?.accelerator_pedal[0].toFixed(0) ?? -1.0} {CONSTANTS.accelerator_pedal.UNIT}
Accelerator Out - {props.data?.accelerator_out[0].toFixed(1) ?? -1.0} {CONSTANTS.accelerator_out.UNIT} + {/*{props.data?.accelerator_out[0].toFixed(1) ?? -1.0} {CONSTANTS.accelerator_out.UNIT}*/}
- {(props.data?.state[0] == 'C') ? : } + {(props.data?.mcc_state[0] === 'C') ? : }
- - - -
- X / Roll -
-
- -
- Y / Pitch -
-
- -
- Z / Yaw -
-
- - -
- Linear Acceleration (m/s^2) -
-
- -
- Angular Rate (deg/s) -
-
- - -
- {props.data?.linear_accel_x[0].toFixed(0) ?? -1.0} -
-
- -
- {props.data?.linear_accel_y[0].toFixed(0) ?? -1.0} -
-
- -
- {props.data?.linear_accel_z[0].toFixed(0) ?? -1.0} -
-
- - -
- {props.data?.angular_rate_roll[0].toFixed(0) ?? -1.0} -
-
- -
- {props.data?.angular_rate_pitch[0].toFixed(0) ?? -1.0} -
-
- -
- {props.data?.angular_rate_yaw[0].toFixed(0) ?? -1.0} -
-
-
- {props.data?.parking_brake[0] ? : } + {props.data?.park_brake[0] ? : }
- {props.data?.brake_status[0] ? : }
- {props.data?.mech_brake_status[0] ? : } + {props.data?.foot_brake[0] ? : }
- {props.data?.horn_status[0] ? : } -
+
- {props.data?.left_turn[0] ? : } + {props.data?.l_turn_led_en[0] ? : }
- {props.data?.right_turn[0] ? : } + {props.data?.r_turn_led_en[0] ? : }
- {props.data?.headlights[0] ? : } + {props.data?.headlights_led_en[0] ? : /*Does this mean the same as headlights on?*/}