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:
Guðni Már Gilbert 2023-03-12 09:40:04 +00:00
parent bb614f669d
commit 09d918ce5d
3 changed files with 6 additions and 6 deletions

View File

@ -370,7 +370,7 @@ bool check_fsensor();
//! 2) Not allowed during Homing (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
bool BABYSTEP_ALLOWED();
bool babystep_allowed();
extern void calculate_extruder_multipliers();

View File

@ -545,7 +545,7 @@ bool check_fsensor() {
&& e_active();
}
bool __attribute__((noinline)) BABYSTEP_ALLOWED() {
bool __attribute__((noinline)) babystep_allowed() {
return (axis_known_position[Z_AXIS]
&& !homing_flag && !mesh_bed_leveling_flag
&& ( blocks_queued() || lcd_commands_type == LcdCommands::Layer1Cal || ( !isPrintPaused && (IS_SD_PRINTING || usb_timer.running()) ))

View File

@ -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);
#endif //HAS_SECOND_SERIAL
if ( BABYSTEP_ALLOWED() )
if ( babystep_allowed() )
MENU_ITEM_SUBMENU_P(_T(MSG_BABYSTEP_Z), lcd_babystep_z);
#if (LANG_MODE != 0)
@ -5337,7 +5337,7 @@ static void lcd_main_menu()
MENU_ITEM_FUNCTION_P(PSTR("power panic"), uvlo_);
#endif //TMC2130_DEBUG
if ( BABYSTEP_ALLOWED() ) {
if ( babystep_allowed() ) {
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
// 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...
|| menu_menu == lcd_main_menu
|| menu_menu == lcd_tune_menu
@ -7493,7 +7493,7 @@ void menu_lcd_longpress_func(void)
static inline bool z_menu_expired()
{
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()
{