diff --git a/prosjekt.X/themistor-temp.h b/prosjekt.X/themistor-temp.h index 65c622c..e440f0c 100644 --- a/prosjekt.X/themistor-temp.h +++ b/prosjekt.X/themistor-temp.h @@ -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); diff --git a/prosjekt.X/thermistor-temp.c b/prosjekt.X/thermistor-temp.c index 47442f5..afba6d5 100644 --- a/prosjekt.X/thermistor-temp.c +++ b/prosjekt.X/thermistor-temp.c @@ -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 {