Skip to content

Commit

Permalink
last minute
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucien950 committed Jan 7, 2025
1 parent 537410e commit 0f47b10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .idea/runConfigurations/Quadruna_BMS_Debug.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Quadruna_VC_Debug.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions firmware/quadruna/VC/src/io/io_efuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ bool io_efuse_isChannelEnabled(const EfuseChannel channel)
float io_efuse_getChannelCurrent(const EfuseChannel channel)
{
assert(channel < NUM_EFUSE_CHANNELS);

return hw_adc_getVoltage(configs[channel].cur_sns_adc_channel) * ADC_VOLTAGE_TO_CURRENT_A;
const AdcChannel *a = configs[channel].cur_sns_adc_channel;
if (a == NULL)
return 0;
return hw_adc_getVoltage(a) * ADC_VOLTAGE_TO_CURRENT_A;
}

void io_efuse_standbyReset(EfuseChannel channel)
Expand Down

0 comments on commit 0f47b10

Please sign in to comment.