PFW-1503 Change BABYSTEP_ALLOWED to babystep_allowed
I initially started with a preprocessor macro called BABYSTEP_ALLOWED, but now it is a function. It more common to use lower case for function names
This commit is contained in:
parent
bb614f669d
commit
09d918ce5d
|
|
@ -370,7 +370,7 @@ bool check_fsensor();
|
||||||
//! 2) Not allowed during Homing (printer busy)
|
//! 2) Not allowed during Homing (printer busy)
|
||||||
//! 3) Not allowed during Mesh Bed Leveling (printer busy)
|
//! 3) Not allowed during Mesh Bed Leveling (printer busy)
|
||||||
//! 4) Allowed if there are queued blocks OR there is a print job running
|
//! 4) Allowed if there are queued blocks OR there is a print job running
|
||||||
bool BABYSTEP_ALLOWED();
|
bool babystep_allowed();
|
||||||
|
|
||||||
extern void calculate_extruder_multipliers();
|
extern void calculate_extruder_multipliers();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -545,7 +545,7 @@ bool check_fsensor() {
|
||||||
&& e_active();
|
&& e_active();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool __attribute__((noinline)) BABYSTEP_ALLOWED() {
|
bool __attribute__((noinline)) babystep_allowed() {
|
||||||
return (axis_known_position[Z_AXIS]
|
return (axis_known_position[Z_AXIS]
|
||||||
&& !homing_flag && !mesh_bed_leveling_flag
|
&& !homing_flag && !mesh_bed_leveling_flag
|
||||||
&& ( blocks_queued() || lcd_commands_type == LcdCommands::Layer1Cal || ( !isPrintPaused && (IS_SD_PRINTING || usb_timer.running()) ))
|
&& ( blocks_queued() || lcd_commands_type == LcdCommands::Layer1Cal || ( !isPrintPaused && (IS_SD_PRINTING || usb_timer.running()) ))
|
||||||
|
|
|
||||||
|
|
@ -4628,7 +4628,7 @@ static void lcd_settings_menu()
|
||||||
MENU_ITEM_TOGGLE_P(_T(MSG_RPI_PORT), (selectedSerialPort == 0) ? _T(MSG_OFF) : _T(MSG_ON), lcd_second_serial_set);
|
MENU_ITEM_TOGGLE_P(_T(MSG_RPI_PORT), (selectedSerialPort == 0) ? _T(MSG_OFF) : _T(MSG_ON), lcd_second_serial_set);
|
||||||
#endif //HAS_SECOND_SERIAL
|
#endif //HAS_SECOND_SERIAL
|
||||||
|
|
||||||
if ( BABYSTEP_ALLOWED() )
|
if ( babystep_allowed() )
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);
|
MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);
|
||||||
|
|
||||||
#if (LANG_MODE != 0)
|
#if (LANG_MODE != 0)
|
||||||
|
|
@ -5337,7 +5337,7 @@ static void lcd_main_menu()
|
||||||
MENU_ITEM_FUNCTION_P(PSTR("power panic"), uvlo_);
|
MENU_ITEM_FUNCTION_P(PSTR("power panic"), uvlo_);
|
||||||
#endif //TMC2130_DEBUG
|
#endif //TMC2130_DEBUG
|
||||||
|
|
||||||
if ( BABYSTEP_ALLOWED() ) {
|
if ( babystep_allowed() ) {
|
||||||
MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);//8
|
MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);//8
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -7457,7 +7457,7 @@ void menu_lcd_longpress_func(void)
|
||||||
|
|
||||||
// explicitely listed menus which are allowed to rise the move-z or live-adj-z functions
|
// explicitely listed menus which are allowed to rise the move-z or live-adj-z functions
|
||||||
// The lists are not the same for both functions, so first decide which function is to be performed
|
// The lists are not the same for both functions, so first decide which function is to be performed
|
||||||
if (BABYSTEP_ALLOWED()){ // long press as live-adj-z
|
if (babystep_allowed()){ // long press as live-adj-z
|
||||||
if ( menu_menu == lcd_status_screen // and in listed menus...
|
if ( menu_menu == lcd_status_screen // and in listed menus...
|
||||||
|| menu_menu == lcd_main_menu
|
|| menu_menu == lcd_main_menu
|
||||||
|| menu_menu == lcd_tune_menu
|
|| menu_menu == lcd_tune_menu
|
||||||
|
|
@ -7493,7 +7493,7 @@ void menu_lcd_longpress_func(void)
|
||||||
static inline bool z_menu_expired()
|
static inline bool z_menu_expired()
|
||||||
{
|
{
|
||||||
return (menu_menu == lcd_babystep_z
|
return (menu_menu == lcd_babystep_z
|
||||||
&& (!BABYSTEP_ALLOWED() || (lcd_commands_type == LcdCommands::Idle && lcd_timeoutToStatus.expired(LCD_TIMEOUT_TO_STATUS_BABYSTEP_Z))));
|
&& (!babystep_allowed() || (lcd_commands_type == LcdCommands::Idle && lcd_timeoutToStatus.expired(LCD_TIMEOUT_TO_STATUS_BABYSTEP_Z))));
|
||||||
}
|
}
|
||||||
static inline bool other_menu_expired()
|
static inline bool other_menu_expired()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue