cleanup
This commit is contained in:
parent
61592f9bfa
commit
fe04b9f467
|
|
@ -356,7 +356,4 @@ void temp_compensation_start();
|
|||
void wait_for_heater(long codenum);
|
||||
void serialecho_temperatures();
|
||||
void proc_commands();
|
||||
bool check_commands();
|
||||
bool search_end_command();
|
||||
void empty_buffer();
|
||||
void show_buffer();
|
||||
bool check_commands();
|
||||
|
|
@ -1406,33 +1406,20 @@ void proc_commands() {
|
|||
}
|
||||
|
||||
bool check_commands() {
|
||||
bool ret = false;
|
||||
bool end_command_found = false;
|
||||
|
||||
if (buflen)
|
||||
{
|
||||
//SERIAL_ECHOLNPGM("search_end ");
|
||||
ret = search_end_command();
|
||||
if ((code_seen("M84")) || (code_seen("M 84"))) end_command_found = true;
|
||||
if (!cmdbuffer_front_already_processed)
|
||||
cmdqueue_pop_front();
|
||||
cmdbuffer_front_already_processed = false;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void show_buffer() {
|
||||
SERIAL_ECHOPGM("bufindr:");
|
||||
MYSERIAL.println(bufindr);
|
||||
SERIAL_ECHOPGM("bufindw:");
|
||||
MYSERIAL.println(bufindw);
|
||||
}
|
||||
|
||||
void empty_buffer() {
|
||||
bufindr = bufindw;
|
||||
return end_command_found;
|
||||
}
|
||||
|
||||
void get_command()
|
||||
{
|
||||
//show_buffer();
|
||||
// Test and reserve space for the new command string.
|
||||
if (!cmdqueue_could_enqueue_back(MAX_CMD_SIZE - 1))
|
||||
return;
|
||||
|
|
@ -2103,15 +2090,6 @@ void ramming() {
|
|||
}
|
||||
*/
|
||||
|
||||
bool search_end_command()
|
||||
{
|
||||
//SERIAL_ECHOLNPGM("E");
|
||||
bool return_value = false;
|
||||
if (code_seen("M84")) return_value = true;
|
||||
return return_value;
|
||||
|
||||
}
|
||||
|
||||
void process_commands()
|
||||
{
|
||||
#ifdef FILAMENT_RUNOUT_SUPPORT
|
||||
|
|
|
|||
|
|
@ -4965,37 +4965,19 @@ static void menu_action_function(menuFunc_t data) {
|
|||
(*data)();
|
||||
}
|
||||
|
||||
/*check_file() {
|
||||
|
||||
}*/
|
||||
|
||||
static bool check_file(const char* filename) {
|
||||
bool result = false;
|
||||
card.openFile(filename, true);
|
||||
card.getFileSize();
|
||||
//SERIAL_ECHOPGM("Filesize my:");
|
||||
//MYSERIAL.println(card.public_fileSize);
|
||||
card.setIndex((card.public_fileSize) - 10000);
|
||||
//SERIAL_ECHOPGM("Position:");
|
||||
//MYSERIAL.println(card.sdpos);
|
||||
if (card.public_fileSize > END_FILE_SECTION) {
|
||||
card.setIndex((card.public_fileSize) - END_FILE_SECTION);
|
||||
}
|
||||
|
||||
while (!card.eof() && !result) {
|
||||
//show_buffer();
|
||||
|
||||
// SERIAL_ECHOPGM("Position prior:");
|
||||
// MYSERIAL.println(card.sdpos);
|
||||
card.sdprinting = true;
|
||||
get_command();
|
||||
//result = search_end_command();
|
||||
result = check_commands();
|
||||
|
||||
|
||||
/* SERIAL_ECHOPGM("Position after:");
|
||||
MYSERIAL.println(card.sdpos);
|
||||
SERIAL_ECHOPGM("Command find:");
|
||||
MYSERIAL.println(int(result));*/
|
||||
}
|
||||
//empty_buffer();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue