add comments

This commit is contained in:
Inamr 2024-03-13 13:16:16 +01:00
parent 24190f1f15
commit 4a66e1dcdc
2 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,7 @@ extern "C" {
// Calculates the temperature in celcius
// Returns the thermistor themperature
float calculate_thermistor_temp(float readValue);
// Returns true if temperatur is higher then high_temp int
bool error_message(float thermistor_temp);

View File

@ -26,9 +26,13 @@ float calculate_thermistor_temp(float readValue){
return T_therm;
}
// returns error message
bool error_message(float thermistor_temp){
// Max value
int high_temp = 0;
// Return true if temp is higher then max value
if (thermistor_temp > high_temp){
printf("Error");
return true;
}
else {