Commit Graph

7 Commits

Author SHA1 Message Date
Kevin O'Connor c52c398ae8 spi_temperature: Eliminate self.chip_type variable
The chip type is now always unique in each class.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 15:00:23 -04:00
Kevin O'Connor f168032901 spi_temperature: Eliminate check_faults() callback
The faults can be checked from the calc_temp() method.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:54:31 -04:00
Kevin O'Connor f20dd0c9be spi_temperature: Break up thermocouple code into individual classes
Break the Thermocouple() class into MAX31856(), MAX31855(), and
MAX6675() classes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:54:31 -04:00
Kevin O'Connor 7510efe827 spi_temperature: Use setup_minmax() to set the temperature range
Use setup_minmax() instead of directly reading the min/max temperature
from the config.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:12:00 -04:00
Kevin O'Connor 270080cd4c spi_temperature: Remove non-spi flags from SensorBase
The SensorBase class is used exclusively for SPI transfers, so no need
to track non-spi settings.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 14:05:35 -04:00
Ricardo Amezquita 756514adef thermocouple: Add support for MAX6675 chip
The MAX6675 chip has a different read sequence than the MAX31855 chip.

Signed-off-by: Ricardo Amézquita <ramezquitao@cihologramas.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 11:16:05 -04:00
Kevin O'Connor eba252d3fd thermocouple: Add initial support for common SPI temperature sensing chips
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2018-07-24 11:16:05 -04:00