Add support for BQ heated bed kit with Hephestos 2

This commit is contained in:
João Brázio 2017-07-06 18:10:06 +01:00 committed by Scott Lahteine
parent ce834bb78e
commit 2065591daf
8 changed files with 116 additions and 71 deletions

View file

@ -369,20 +369,24 @@ FORCE_INLINE void _draw_centered_temp(const int16_t temp, const uint8_t x, const
}
FORCE_INLINE void _draw_heater_status(const uint8_t x, const int8_t heater, const bool blink) {
#if !HEATER_IDLE_HANDLER
UNUSED(blink);
#endif
#if HAS_TEMP_BED
bool isBed = heater < 0;
const bool isBed = heater < 0;
#else
const bool isBed = false;
constexpr bool isBed = false;
#endif
if (PAGE_UNDER(7)) {
#if HEATER_IDLE_HANDLER
const bool is_idle = (!isBed ? thermalManager.is_heater_idle(heater) :
#if HAS_TEMP_BED
thermalManager.is_bed_idle()
#else
false
#endif
#if HAS_TEMP_BED
thermalManager.is_bed_idle()
#else
false
#endif
);
if (blink || !is_idle)
@ -852,12 +856,15 @@ static void lcd_implementation_status_screen() {
#define DEFINE_LCD_IMPLEMENTATION_DRAWMENU_SETTING_EDIT_TYPE(_type, _name, _strFunc) \
inline void lcd_implementation_drawmenu_setting_edit_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
UNUSED(pstr2); \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_callback_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type * const data, ...) { \
UNUSED(pstr2); \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _strFunc(*(data))); \
} \
inline void lcd_implementation_drawmenu_setting_edit_accessor_ ## _name (const bool sel, const uint8_t row, const char* pstr, const char* pstr2, _type (*pget)(), void (*pset)(_type), ...) { \
UNUSED(pstr2); UNUSED(pset); \
lcd_implementation_drawmenu_setting_edit_generic(sel, row, pstr, _strFunc(pget())); \
} \
typedef void _name##_void