| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Change the name of the config registration method and pass an explicit
reference to the callback to the new method. This makes the
relationship between mcu registration and build_config() more clear in
the calling code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't pass pin_type to lookup_pin() - instead, if a pin can be
inverted or can have a pullup, then the caller must explicitly specify
that when calling lookup_pin(). This simplifies the code for the
cases where it is not valid to invert or pullup.
Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin()
apply default pullup and invert flags.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Make sure to use is_init=True when sending query_thermocouple -
otherwise, the config CRC is likely to mismatch on every connection.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
All of the Maxim chips support a 4Mhz spi transfer rate, so use that
as a default spi speed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
All of the Maxim chips can use SPI mode 1, so no need to configure it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Raising an error from the background message reception thread isn't
well defined. Instead, on a temperature fault, invoke a printer
shutdown.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Those chips that require an spi init sequence can generate the message
directly in the chip specific class.
Also, don't send an spi init message for chips that are read-only.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
The chip type is now always unique in each class.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
The faults can be checked from the calc_temp() method.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Break the Thermocouple() class into MAX31856(), MAX31855(), and
MAX6675() classes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Use setup_minmax() instead of directly reading the min/max temperature
from the config.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
Signed-off-by: Petri Honkala <cruwaller@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|