From 6cf845ecdab269351cefaaef8f0e94676fee40f3 Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Tue, 26 Apr 2016 19:32:37 -0400 Subject: [PATCH] temp.c: remove write-only "temp_flags". --- temp.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/temp.c b/temp.c index 6886b01..b48b2e1 100644 --- a/temp.c +++ b/temp.c @@ -51,11 +51,6 @@ #include "analog.h" #endif -typedef enum { - PRESENT, - TCOPEN -} temp_flags_enum; - /// holds metadata for each temperature sensor typedef struct { temp_type_t temp_type; ///< type of sensor @@ -79,8 +74,6 @@ static const temp_sensor_definition_t temp_sensors[NUM_TEMP_SENSORS] = /// this struct holds the runtime sensor data- read temperatures, targets, etc static struct { - //temp_flags_enum temp_flags; ///< flags - uint16_t last_read_temp; ///< last received reading uint16_t target_temp; ///< manipulate attached heater to attempt to achieve this value @@ -273,16 +266,9 @@ static uint16_t temp_read_max6675(temp_sensor_t i) { spi_deselect_max6675(); - // FIXME: No one ever reads temp_flags. It should be removed. - //temp_sensors_runtime[i].temp_flags = 0; if ((temp & 0x8002) == 0) { // Got "device id". - //temp_sensors_runtime[i].temp_flags |= PRESENT; - if (temp & 4) { - // Thermocouple open. - //temp_sensors_runtime[i].temp_flags |= TCOPEN; - } - else { + if ((temp & 4) == 0) { temp = temp >> 3; } }