temp.c: remove write-only "temp_flags".

This commit is contained in:
Phil Hord 2016-04-26 19:32:37 -04:00 committed by Markus Hitter
parent 9d53c13ebd
commit 6cf845ecda
1 changed files with 1 additions and 15 deletions

16
temp.c
View File

@ -51,11 +51,6 @@
#include "analog.h" #include "analog.h"
#endif #endif
typedef enum {
PRESENT,
TCOPEN
} temp_flags_enum;
/// holds metadata for each temperature sensor /// holds metadata for each temperature sensor
typedef struct { typedef struct {
temp_type_t temp_type; ///< type of sensor 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 /// this struct holds the runtime sensor data- read temperatures, targets, etc
static struct { static struct {
//temp_flags_enum temp_flags; ///< flags
uint16_t last_read_temp; ///< last received reading uint16_t last_read_temp; ///< last received reading
uint16_t target_temp; ///< manipulate attached heater to attempt to achieve this value 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(); 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) { if ((temp & 0x8002) == 0) {
// Got "device id". // Got "device id".
//temp_sensors_runtime[i].temp_flags |= PRESENT; if ((temp & 4) == 0) {
if (temp & 4) {
// Thermocouple open.
//temp_sensors_runtime[i].temp_flags |= TCOPEN;
}
else {
temp = temp >> 3; temp = temp >> 3;
} }
} }