// Comment the following line to disable PID and enable bang-bang.
#define PIDTEMP
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
//#define PID_AUTOTUNE_MENU // Add PID Autotune to the LCD "Temperature" menu to run M303 and apply the result.
//#define PID_DEBUG // Sends debug data to the serial port.
//#define PID_OPENLOOP 1 // Puts PID in open loop. M104/M140 sets the output power from 0 to PID_MAX
//#define SLOW_PWM_HEATERS // PWM with very low frequency (roughly 0.125Hz=8s) and minimum state time of approximately 1s useful for heaters driven by a relay
// If the temperature difference between the target temperature and the actual temperature
// is more then PID_FUNCTIONAL_RANGE then the PID will be shut off and the heater will be set to min/max.
#define PID_FUNCTIONAL_RANGE 10 // degC
...
...
@@ -1092,7 +1093,7 @@
//#define INVERT_CLICK_BUTTON // Option for invert encoder button logic
//#define INVERT_BACK_BUTTON // Option for invert back button logic if avaible
//#define INVERT_ROTARY_SWITCH // Option for invert rotary encoder
//#define INVERT_ROTARY_SWITCH // Option for reverses the encoder direction for navigating LCD menus.
#define ENCODER_RATE_MULTIPLIER // If defined, certain menu edit operations automatically multiply the steps when the encoder is moved quickly
#define ENCODER_10X_STEPS_PER_SEC 75 // If the encoder steps per sec exceeds this value, multiply steps moved x10 to quickly advance the value
#define ENCODER_100X_STEPS_PER_SEC 160 // If the encoder steps per sec exceeds this value, multiply steps moved x100 to really quickly advance the value
menuFunc_tcurrentMenu=lcd_status_screen;/* function pointer to the currently active menu */
menuPositionmenu_history[10];
uint8_tmenu_history_depth=0;
millis_tnext_lcd_update_ms;
uint8_tlcd_status_update_delay;
boolignore_click=false;
boolwait_for_unclick;
uint8_tlcdDrawUpdate=2;/* Set to none-zero when the LCD needs to draw, decreased after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial) */
booldefer_return_to_status=false;
enumLCDViewAction{
LCDVIEW_NONE,
LCDVIEW_REDRAW_NOW,
LCDVIEW_CALL_REDRAW_NEXT,
LCDVIEW_CLEAR_CALL_REDRAW,
LCDVIEW_CALL_NO_REDRAW
};
uint8_tlcdDrawUpdate=LCDVIEW_CLEAR_CALL_REDRAW;// Set when the LCD needs to draw, decrements after every draw. Set to 2 in LCD routines so the LCD gets at least 1 full redraw (first redraw is partial)
//prevMenu and prevEncoderPosition are used to store the previous menu location when editing settings.
* The "menu_edit_type" macro generates the functions needed to edit a numerical value.
*
* For example, menu_edit_type(int, int3, itostr3, 1) expands into these functions:
*
* bool _menu_edit_int3();
* void menu_edit_int3(); // edit int (interactively)
* void menu_edit_callback_int3(); // edit int (interactively) with callback on completion
* static void _menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
* static void menu_action_setting_edit_int3(const char* pstr, int* ptr, int minValue, int maxValue);
* static void menu_action_setting_edit_callback_int3(const char* pstr, int* ptr, int minValue, int maxValue, menuFunc_t callback); // edit int with callback
*
* You can then use one of the menu macros to present the edit interface: