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