let's have gcc help us (#278)

Co-authored-by: rusefillc <sdfsdfqsf2334234234>
This commit is contained in:
rusefillc 2023-11-03 23:27:49 -04:00 committed by GitHub
parent 013a016a62
commit 1b1103952f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -189,7 +189,7 @@ INCDIR = $(CONFDIR) \
CWARN = -Wall -Wextra -Wundef -Wstrict-prototypes
# Define C++ warning options here.
CPPWARN = -Wall -Wextra -Wundef
CPPWARN = -Wall -Wextra -Wundef -Werror=switch
#
# Project, target, sources and paths

View File

@ -246,6 +246,7 @@ float HeaterController::GetVoltageForState(float heaterEsr)
// TODO: heater PID should operate on temperature, not ESR
return 7.5f - heaterPid.GetOutput(heater->targetESR, heaterEsr);
case HeaterState::Stopped:
case HeaterState::NoHeaterSupply:
// Something has gone wrong, turn off the heater.
return 0;
}