Add CreatorPro / Makerbot / QIDI / etc and Mightboard RevE support (#12855)

- Fix a bug in MAXxxxx thermocouple temp reporting.
- Add support for 3-wire HD44780.
- Add support for PCA9533 RGB driver.
- Add configuration examples for FlashForge CreatorPro.
This commit is contained in:
mikeshub
2019-01-14 14:29:55 -06:00
committed by Scott Lahteine
parent 3644c940bf
commit 7fde8d9d1e
96 changed files with 5113 additions and 136 deletions

View File

@ -1739,6 +1739,9 @@ void Temperature::disable_all_heaters() {
) {
#if COUNT_6675 == 1
constexpr uint8_t hindex = 0;
#else
// Needed to return the correct temp when this is called too soon
static uint16_t max6675_temp_previous[COUNT_6675] = { 0 };
#endif
#define MAX6675_HEAT_INTERVAL 250UL
@ -1758,7 +1761,15 @@ void Temperature::disable_all_heaters() {
// Return last-read value between readings
static millis_t next_max6675_ms[COUNT_6675] = { 0 };
millis_t ms = millis();
if (PENDING(ms, next_max6675_ms[hindex])) return int(max6675_temp);
if (PENDING(ms, next_max6675_ms[hindex]))
return int(
#if COUNT_6675 == 1
max6675_temp
#else
max6675_temp_previous[hindex] // Need to return the correct previous value
#endif
);
next_max6675_ms[hindex] = ms + MAX6675_HEAT_INTERVAL;
//
@ -1824,10 +1835,14 @@ void Temperature::disable_all_heaters() {
}
else
max6675_temp >>= MAX6675_DISCARD_BITS;
#if ENABLED(MAX6675_IS_MAX31855)
// Support negative temperature
if (max6675_temp & 0x00002000) max6675_temp |= 0xFFFFC000;
#endif
#if ENABLED(MAX6675_IS_MAX31855)
if (max6675_temp & 0x00002000) max6675_temp |= 0xFFFFC000; // Support negative temperature
#endif
#if COUNT_6675 > 1
max6675_temp_previous[hindex] = max6675_temp;
#endif
return int(max6675_temp);
}