mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-12-28 18:30:36 -07:00
🚸 Limited number of DGUS fans
This commit is contained in:
parent
94ca5487ab
commit
4c388d7118
4 changed files with 35 additions and 7 deletions
|
|
@ -406,11 +406,18 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
|||
|
||||
// Fan Data
|
||||
#if HAS_FAN
|
||||
#if HOTENDS <= 4
|
||||
#define FAN_CONTROL HOTENDS
|
||||
#elif FAN_COUNT <= 4
|
||||
#define FAN_CONTROL FAN_COUNT
|
||||
#else
|
||||
#define FAN_CONTROL 4
|
||||
#endif
|
||||
#define FAN_VPHELPER(N) \
|
||||
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], screen.percentageToUint8, screen.sendPercentageToDisplay), \
|
||||
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], screen.handleFanControl, nullptr), \
|
||||
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, screen.sendFanStatusToDisplay),
|
||||
REPEAT(FAN_COUNT, FAN_VPHELPER)
|
||||
REPEAT(FAN_CONTROL, FAN_VPHELPER)
|
||||
#endif
|
||||
|
||||
// Feedrate
|
||||
|
|
|
|||
|
|
@ -399,11 +399,18 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
|||
|
||||
// Fan Data
|
||||
#if HAS_FAN
|
||||
#if HOTENDS <= 2
|
||||
#define FAN_CONTROL HOTENDS
|
||||
#elif FAN_COUNT <= 2
|
||||
#define FAN_CONTROL FAN_COUNT
|
||||
#else
|
||||
#define FAN_CONTROL 2
|
||||
#endif
|
||||
#define FAN_VPHELPER(N) \
|
||||
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], screen.percentageToUint8, screen.sendPercentageToDisplay), \
|
||||
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], screen.handleFanControl, nullptr), \
|
||||
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, screen.sendFanStatusToDisplay),
|
||||
REPEAT(FAN_COUNT, FAN_VPHELPER)
|
||||
REPEAT(FAN_CONTROL, FAN_VPHELPER)
|
||||
#endif
|
||||
|
||||
// Feedrate
|
||||
|
|
|
|||
|
|
@ -602,11 +602,18 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
|||
|
||||
// Fan Data
|
||||
#if HAS_FAN
|
||||
#define FAN_VPHELPER(N) \
|
||||
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], screen.setUint8, screen.sendFanToDisplay), \
|
||||
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], screen.handleFanControl, nullptr), \
|
||||
#if HOTENDS <= 4
|
||||
#define FAN_CONTROL HOTENDS
|
||||
#elif FAN_COUNT <= 4
|
||||
#define FAN_CONTROL FAN_COUNT
|
||||
#else
|
||||
#define FAN_CONTROL 4
|
||||
#endif
|
||||
#define FAN_VPHELPER(N) \
|
||||
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], screen.percentageToUint8, screen.sendFanToDisplay), \
|
||||
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], screen.handleFanControl, nullptr), \
|
||||
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, screen.sendFanStatusToDisplay),
|
||||
REPEAT(FAN_COUNT, FAN_VPHELPER)
|
||||
REPEAT(FAN_CONTROL, FAN_VPHELPER)
|
||||
#endif
|
||||
|
||||
// Feedrate
|
||||
|
|
|
|||
|
|
@ -207,11 +207,18 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
|
|||
|
||||
// Fan Data
|
||||
#if HAS_FAN
|
||||
#if HOTENDS <= 2
|
||||
#define FAN_CONTROL HOTENDS
|
||||
#elif FAN_COUNT <= 2
|
||||
#define FAN_CONTROL FAN_COUNT
|
||||
#else
|
||||
#define FAN_CONTROL 2
|
||||
#endif
|
||||
#define FAN_VPHELPER(N) \
|
||||
VPHELPER(VP_Fan##N##_Percentage, &thermalManager.fan_speed[N], screen.percentageToUint8, screen.sendPercentageToDisplay), \
|
||||
VPHELPER(VP_FAN##N##_CONTROL, &thermalManager.fan_speed[N], screen.handleFanControl, nullptr), \
|
||||
VPHELPER(VP_FAN##N##_STATUS, &thermalManager.fan_speed[N], nullptr, screen.sendFanStatusToDisplay),
|
||||
REPEAT(FAN_COUNT, FAN_VPHELPER)
|
||||
REPEAT(FAN_CONTROL, FAN_VPHELPER)
|
||||
#endif
|
||||
|
||||
// Feedrate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue