本文整理汇总了C++中enquecommand_P函数的典型用法代码示例。如果您正苦于以下问题:C++ enquecommand_P函数的具体用法?C++ enquecommand_P怎么用?C++ enquecommand_P使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了enquecommand_P函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lcd_sdcard_stop
static void lcd_sdcard_stop()
{
card.sdprinting = false;
card.closefile();
quickStop();
if(SD_FINISHED_STEPPERRELEASE)
{
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
}
示例2: menu_action_sdfile
static void menu_action_sdfile(const char* filename, char* longFilename)
{
char cmd[30];
char* c;
sprintf_P(cmd, PSTR("M23 %s"), filename);
for(c = &cmd[4]; *c; c++)
*c = tolower(*c);
enquecommand(cmd);
enquecommand_P(PSTR("M24"));
lcd_return_to_status();
}
示例3: lcd_sdcard_stop
static void lcd_sdcard_stop()
{
card.sdprinting = false;
card.closefile();
quickStop();
if(SD_FINISHED_STEPPERRELEASE)
{
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
cancel_heatup = true;
}
示例4: st_synchronize
void CardReader::printingHasFinished()
{
st_synchronize();
quickStop();
sdprinting = false;
if(SD_FINISHED_STEPPERRELEASE)
{
//finishAndDisableSteppers();
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
}
示例5: initsd
void CardReader::checkautostart(bool force)
{
if(!force)
{
if(!autostart_stilltocheck)
return;
if(autostart_atmillis<millis())
return;
}
autostart_stilltocheck=false;
if(!cardOK)
{
initsd();
if(!cardOK) //fail
return;
}
char autoname[30];
sprintf_P(autoname, PSTR("auto%i.g"), lastnr);
for(int8_t i=0;i<(int8_t)strlen(autoname);i++)
autoname[i]=tolower(autoname[i]);
dir_t p;
root.rewind();
bool found=false;
while (root.readDir(p, NULL) > 0)
{
for(int8_t i=0;i<(int8_t)strlen((char*)p.name);i++)
p.name[i]=tolower(p.name[i]);
//Serial.print((char*)p.name);
//Serial.print(" ");
//Serial.println(autoname);
if(p.name[9]!='~') //skip safety copies
if(strncmp((char*)p.name,autoname,5)==0)
{
char cmd[30];
sprintf_P(cmd, PSTR("M23 %s"), autoname);
enquecommand(cmd);
enquecommand_P(PSTR("M24"));
found=true;
}
}
if(!found)
lastnr=-1;
else
lastnr++;
clearError();
}
示例6: lcd_sdcard_stop
static void lcd_sdcard_stop()
{
card.sdprinting = false;
card.closefile();
quickStop();
if(SD_FINISHED_STEPPERRELEASE)
{
if (current_position[Z_AXIS] < Z_MAX_POS - 191)
{
enquecommand_P(PSTR(SD_FINISHED_MOVEEXTRUDERAWAY1));
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
else
{
enquecommand_P(PSTR(SD_FINISHED_MOVEEXTRUDERAWAY0));
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
}
disable_heater();
autotempShutdown();
lcd_setstatus(MSG_PRINT_ABORTED);
}
示例7: lcd_sdcard_stop
static void lcd_sdcard_stop()
{
card.sdprinting = false;
card.closefile();
quickStop();
if(SD_FINISHED_STEPPERRELEASE)
{
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
cancel_heatup = true;
lcd_setstatus(MSG_PRINT_ABORTED);
}
示例8: lcd_menu_change_material_remove_wait_user_ready
static void lcd_menu_change_material_remove_wait_user_ready()
{
run_history = true;
current_position[E_AXIS] = 0;
plan_set_e_position(current_position[E_AXIS]);
lcd_change_to_menu(lcd_menu_change_material_insert_wait_user, MAIN_MENU_ITEM_POS(0));
char buffer[32];
memset (buffer,0,sizeof(buffer));
enquecommand_P(PSTR("G28 X0 Y0"));
sprintf_P(buffer, PSTR("G1 F%i X%i Y%i"), int(homing_feedrate[0]), int (X_MAX_LENGTH/2), 10);
enquecommand(buffer);
LED_GLOW();
}
示例9: lcd_menu_material_main
static void lcd_menu_material_main()
{
lcd_tripple_menu(PSTR("CHANGE"), PSTR("SETTINGS"), PSTR("RETURN"));
if (lcd_lib_button_pressed)
{
if (IS_SELECTED_MAIN(0) && !is_command_queued())
{
minProgress = 0;
char buffer[32];
enquecommand_P(PSTR("G28 X0 Y0"));
sprintf_P(buffer, PSTR("G1 F%i X%i Y%i"), int(homing_feedrate[0]), X_MAX_LENGTH/2, 10);
enquecommand(buffer);
lcd_change_to_menu_change_material(lcd_menu_material_main_return);
}
else if (IS_SELECTED_MAIN(1))
lcd_change_to_menu(lcd_menu_material_select, SCROLL_MENU_ITEM_POS(0));
else if (IS_SELECTED_MAIN(2))
lcd_change_to_menu(lcd_menu_main);
}
lcd_lib_update_screen();
}
示例10: st_synchronize
void CardReader::printingHasFinished()
{
st_synchronize();
if(file_subcall_ctr>0) //heading up to a parent file that called current as a procedure.
{
file.close();
file_subcall_ctr--;
openFile(filenames[file_subcall_ctr],true,true);
setIndex(filespos[file_subcall_ctr]);
startFileprint();
}
else
{
quickStop();
file.close();
sdprinting = false;
if(SD_FINISHED_STEPPERRELEASE)
{
//finishAndDisableSteppers();
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
}
}
示例11: process
//.........这里部分代码省略.........
{
int16_t t;
t=atoi((const char*)buff_value+2);
if (t<0 || t>280) return;
if (buff_value[1] == '0')
{
setTargetHotend(t,0);
}
else
{
setTargetHotend(t,1);
}
}
else if (buff_value[0]=='S')
{
int16_t t;
uint8_t i;
t=atoi((const char*)buff_value+1);
if (t<1) t=1;
else if (t>50) t=50;
feedmultiply=t*10;
}
break;
case 'P':
uint8_t i;
if (buff_value[0]=='H')
{
enquecommand_P(PSTR("G28"));
}
else if (buff_value[0]=='C')
{
//host::startOnboardBuild(utility::TOOLHEAD_CALIBRATE);
}
else if (buff_value[0]=='X')
{
extern bool cancel_heatup;
writeString((char *)"{SYS:CANCELING}");
//card.pauseSDPrint();
//disable_heater();
card.sdprinting = false;
card.closefile();
quickStop();
if(SD_FINISHED_STEPPERRELEASE)
{
enquecommand_P(PSTR(SD_FINISHED_RELEASECOMMAND));
}
autotempShutdown();
cancel_heatup = true;
writeString((char *)"{SYS:STARTED}");
writeString((char *)"{U:RG1R180180120P0L1S0D0O1E1H0C0X1Y1Z1A2B2N3M0}");
}
else if (buff_value[0]=='P')
{
writeString((char *)"{SYS:PAUSE}");
card.pauseSDPrint();
writeString((char *)"{SYS:PAUSED}");
}
else if (buff_value[0]=='R')
{
示例12: cancelMaterialInsert
static void cancelMaterialInsert()
{
digipot_current(2, motor_current_setting[2]);//Set E motor power to default.
doCooldown();
enquecommand_P(PSTR("G28 X0 Y0"));
}
示例13: lcd_menu_material_main_return
static void lcd_menu_material_main_return()
{
doCooldown();
enquecommand_P(PSTR("G28 X0 Y0"));
currentMenu = lcd_menu_material_main;
}
示例14: parkHeadForHeating
static void parkHeadForHeating()
{
lcd_material_reset_defaults();
enquecommand_P(PSTR("G1 F12000 X110 Y10"));
enquecommand_P(PSTR("M84"));//Disable motor power.
}
示例15: laser_test_fire
static void laser_test_fire(uint8_t power, uint8_t dwell) {
enquecommand_P(PSTR("M80")); // Enable laser accessories since we don't know if its been done (and there's no penalty for doing it again).
laser_fire(power);
delay(dwell);
laser_extinguish();
}