Browse Source

Merge pull request #3036 from wavexx/remove_is_buffer_empty

Remove duplicate function is_buffer_empty()
DRracer 3 years ago
parent
commit
6489c6f17f
3 changed files with 1 additions and 8 deletions
  1. 0 6
      Firmware/cmdqueue.cpp
  2. 0 1
      Firmware/cmdqueue.h
  3. 1 1
      Firmware/ultralcd.cpp

+ 0 - 6
Firmware/cmdqueue.cpp

@@ -371,12 +371,6 @@ void repeatcommand_front()
     cmdbuffer_front_already_processed = true;
 } 
 
-bool is_buffer_empty()
-{
-    if (buflen == 0) return true;
-    else return false;
-}
-
 void proc_commands() {
 	if (buflen)
 	{

+ 0 - 1
Firmware/cmdqueue.h

@@ -69,7 +69,6 @@ extern bool cmd_buffer_empty();
 extern void enquecommand(const char *cmd, bool from_progmem = false);
 extern void enquecommand_front(const char *cmd, bool from_progmem = false);
 extern void repeatcommand_front();
-extern bool is_buffer_empty();
 extern void get_command();
 extern uint16_t cmdqueue_calc_sd_length();
 

+ 1 - 1
Firmware/ultralcd.cpp

@@ -8673,7 +8673,7 @@ static void lcd_connect_printer() {
 
 void lcd_ping() { //chceck if printer is connected to monitoring when in farm mode
 	if (farm_mode) {
-		bool empty = is_buffer_empty();
+		bool empty = cmd_buffer_empty();
 		if ((_millis() - PingTime) * 0.001 > (empty ? PING_TIME : PING_TIME_LONG)) { //if commands buffer is empty use shorter time period
 																							  //if there are comamnds in buffer, some long gcodes can delay execution of ping command
 																							  //therefore longer period is used