Add Bed PID edit/autotune menu items (#18250)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
67305f7976
commit
b1609e82a0
|
@ -271,9 +271,9 @@ void menu_cancelobject();
|
||||||
|
|
||||||
#if ENABLED(PID_EDIT_MENU)
|
#if ENABLED(PID_EDIT_MENU)
|
||||||
#define __PID_BASE_MENU_ITEMS(N) \
|
#define __PID_BASE_MENU_ITEMS(N) \
|
||||||
raw_Ki = unscalePID_i(PID_PARAM(Ki, N)); \
|
raw_Ki = unscalePID_i(TERN(PID_BED_MENU_SECTION, thermalManager.temp_bed.pid.Ki, PID_PARAM(Ki, N))); \
|
||||||
raw_Kd = unscalePID_d(PID_PARAM(Kd, N)); \
|
raw_Kd = unscalePID_d(TERN(PID_BED_MENU_SECTION, thermalManager.temp_bed.pid.Kd, PID_PARAM(Kd, N))); \
|
||||||
EDIT_ITEM_N(float52sign, N, MSG_PID_P_E, &PID_PARAM(Kp, N), 1, 9990); \
|
EDIT_ITEM_N(float52sign, N, MSG_PID_P_E, &TERN(PID_BED_MENU_SECTION, thermalManager.temp_bed.pid.Kp, PID_PARAM(Kp, N)), 1, 9990); \
|
||||||
EDIT_ITEM_N(float52sign, N, MSG_PID_I_E, &raw_Ki, 0.01f, 9990, []{ copy_and_scalePID_i(N); }); \
|
EDIT_ITEM_N(float52sign, N, MSG_PID_I_E, &raw_Ki, 0.01f, 9990, []{ copy_and_scalePID_i(N); }); \
|
||||||
EDIT_ITEM_N(float52sign, N, MSG_PID_D_E, &raw_Kd, 1, 9990, []{ copy_and_scalePID_d(N); })
|
EDIT_ITEM_N(float52sign, N, MSG_PID_D_E, &raw_Kd, 1, 9990, []{ copy_and_scalePID_d(N); })
|
||||||
|
|
||||||
|
@ -312,6 +312,20 @@ void menu_cancelobject();
|
||||||
REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS)
|
REPEAT_S(1, HOTENDS, PID_EDIT_MENU_ITEMS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(PIDTEMPBED)
|
||||||
|
#if ENABLED(PID_EDIT_MENU)
|
||||||
|
#define PID_BED_MENU_SECTION
|
||||||
|
__PID_BASE_MENU_ITEMS(-1);
|
||||||
|
#undef PID_BED_MENU_SECTION
|
||||||
|
#endif
|
||||||
|
#if ENABLED(PID_AUTOTUNE_MENU)
|
||||||
|
#ifndef BED_OVERSHOOT
|
||||||
|
#define BED_OVERSHOOT 5
|
||||||
|
#endif
|
||||||
|
EDIT_ITEM_FAST_N(int3, -1, MSG_PID_AUTOTUNE_E, &autotune_temp_bed, 70, BED_MAXTEMP - BED_OVERSHOOT, []{ _lcd_autotune(-1); });
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
END_MENU();
|
END_MENU();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue