if((batteryCurrent>currentThreshold)&&(batteryVoltage<voltageThreshold)&&!sim_mode)// currentThreshold ensures that this won't happen when running on DC power.
if((batteryCurrent>currentThreshold)&&(batteryVoltage<voltageThreshold)&&!sim_mode)// currentThreshold ensures that this won't happen when running on DC power.
{
{
fprintf(stderr,"Battery voltage too low: %f V - shutting down!\n",batteryVoltage);
fprintf(stderr,"Battery voltage too low: %f V - shutting down!\n",batteryVoltage);