diff options
author | Manuel <manuel.coenen@gmail.com> | 2019-10-27 11:20:28 +0300 |
---|---|---|
committer | dc42 <dcrocker@eschertech.com> | 2019-10-27 11:20:28 +0300 |
commit | 5f1e5c3e85d61e4e23a84bfeae187c7b5bcddc22 (patch) | |
tree | 5465c20006ab5db77420b56045bd622d5fdec7fe /src/DuetM | |
parent | 5c84485046dc804e5834a401849f614845ea4aeb (diff) |
Restore DHT support (#329)
* Restore DHT support
* Large refactoring
DhtHardwareInterface absorbed into DhtTemperatureSensor
Update task moved into Heat as more general SensorsTask
Removed no longer required MaxSpiTempSensors from Pins
* Fix compile error after upstream merge
* Use explicit type instead of auto when initialized with literal
Always read parent sensor number and refactor basic checks in
AdditionalOutputSensor
Initialize AdditionalOutputSensor on succesful configuration
Introduce sensorsCount and calculate wait time based on that
Add EnsureSensorsTask to class Heat to have the SensorsTask only started
when necessary
* Be a bit more defensive against division-by-zero
* Replace Mutex by TaskCriticalSectionLocker
Diffstat (limited to 'src/DuetM')
-rw-r--r-- | src/DuetM/Pins_DuetM.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/DuetM/Pins_DuetM.h b/src/DuetM/Pins_DuetM.h index fe7e0e21..d7d11bb1 100644 --- a/src/DuetM/Pins_DuetM.h +++ b/src/DuetM/Pins_DuetM.h @@ -33,7 +33,7 @@ constexpr size_t NumFirmwareUpdateModules = 1; // 1 module #define SUPPORT_SCANNER 0 // set zero to disable support for FreeLSS scanners #define SUPPORT_LASER 1 // support laser cutters and engravers using G1 S parameter #define SUPPORT_IOBITS 0 // set to support P parameter in G0/G1 commands -#define SUPPORT_DHT_SENSOR 0 //TEMp! // set nonzero to support DHT temperature/humidity sensors (requires RTOS) +#define SUPPORT_DHT_SENSOR 1 // set nonzero to support DHT temperature/humidity sensors (requires RTOS) #define SUPPORT_WORKPLACE_COORDINATES 1 // set nonzero to support G10 L2 and G53..59 #define SUPPORT_12864_LCD 1 // set nonzero to support 12864 LCD and rotary encoder #define SUPPORT_OBJECT_MODEL 1 @@ -123,11 +123,8 @@ constexpr float EXT_SHC = 0.0; constexpr float DefaultThermistorSeriesR = 2200.0; constexpr float MinVrefLoadR = (DefaultThermistorSeriesR / 4) * 4700.0/((DefaultThermistorSeriesR / 4) + 4700.0); // there are 4 temperature sensing channels and a 4K7 load resistor -// Number of SPI temperature sensors to support -constexpr size_t MaxSpiTempSensors = 2; - // Digital pins the 31855s have their select lines tied to -constexpr Pin SpiTempSensorCsPins[MaxSpiTempSensors] = { PortBPin(14), PortCPin(19) }; // SPI0_CS1, SPI0_CS2 +constexpr Pin SpiTempSensorCsPins[] = { PortBPin(14), PortCPin(19) }; // SPI0_CS1, SPI0_CS2 // Pin that controls the ATX power on/off constexpr Pin ATX_POWER_PIN = PortAPin(0); |