我在 Marlin_main.cpp 中找到了 pause_print() 函数,但是当我搜索其余文件时,我找不到调用此函数的文件。我希望在控制 LCD 菜单的文件中找到它,但它只存在于 main.c 文件中。
当我从 LCD 选择菜单选项时,哪个文件有函数调用?
为什么 pause_print() 没有作为函数调用出现在别处?
我在 Marlin_main.cpp 中找到了 pause_print() 函数,但是当我搜索其余文件时,我找不到调用此函数的文件。我希望在控制 LCD 菜单的文件中找到它,但它只存在于 main.c 文件中。
当我从 LCD 选择菜单选项时,哪个文件有函数调用?
为什么 pause_print() 没有作为函数调用出现在别处?
我可以ADVANCED_PAUSE_FEATURE
在M600 中找到定义configuration_adv.h
和调用Conditionals_post.h
,三次输入Marlin.h
,根据需要引用 M600Marlin_Main.ccp
并提到 2 次。
在Marlin_Main.ccp
还声明函数pause_print
的行6482至6571.它的开始和结束是这些:
static bool pause_print(const float &retract, const point_t &park_point, const float &unload_length = 0,
const int8_t max_beep_count = 0, const bool show_lcd = false
) {
if (move_away_flag) return false; // already paused
#ifdef ACTION_ON_PAUSE
SERIAL_ECHOLNPGM("//action:" ACTION_ON_PAUSE);
#endif
[...]
HOTEND_LOOP()
thermalManager.start_heater_idle_timer(e, nozzle_timeout);
return true;
}
此函数确实定义了暂停状态,并且ADVANCED_PAUSE_FEATURE
在某些情况下依赖于。但什么叫它?很简单,两个调用都在Marlin_Main.ccp
定义它的同一个调用中。调用位于用于更换灯丝的函数中: