Skip to content

Commit

Permalink
Fix battery
Browse files Browse the repository at this point in the history
  • Loading branch information
MCLiii committed Mar 1, 2024
1 parent 2d5e8a9 commit 1969bd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Frontend/src/Components/BatteryPack/BatteryPack.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ export default function BatteryPack(props) {
const headerBg = getColor("header", colorMode);
const borderColor = getColor("border", colorMode);

const fanEnableText = ((props.data?.fan_enable[0] ?? -1.0) === -1.0) ? 'N/A' : (props.data.fan_enable[0] ? 'EN' : 'DIS');
const fanEnableColor = (props.data?.fan_enable[0] ?? false) ? getColor("greenBg", colorMode) : getColor("redBg", colorMode);
const fanEnableTextColor = (props.data?.fan_enable[0] ?? false) ? getColor("txtGreenBg", colorMode) : getColor("txtRedBg", colorMode);
const fanEnableText = ((props.data?.fan_speed[0] ?? -1.0) === -1.0) ? 'N/A' : (props.data.fan_speed[0] ? 'EN' : 'DIS');
const fanEnableColor = (props.data?.fan_speed[0] ?? false) ? getColor("greenBg", colorMode) : getColor("redBg", colorMode);
const fanEnableTextColor = (props.data?.fan_speed[0] ?? false) ? getColor("txtGreenBg", colorMode) : getColor("txtRedBg", colorMode);

const chargeEnableText = ((props.data?.charge_enable[0] ?? -1.0) === -1.0) ? 'N/A' : (props.data.charge_enable[0] ? 'High' : 'Low');
const chargeEnableColor = ((props.data?.charge_enable[0] ?? -1.0) == CONSTANTS.charge_enable.MAX) ? getColor("greenBg", colorMode) : getColor("redBg", colorMode);
Expand Down

0 comments on commit 1969bd5

Please sign in to comment.