Remove duplicate function is_buffer_empty()

Use cmd_buffer_empty() instead
This commit is contained in:
Yuri D'Elia 2021-02-19 17:06:00 +01:00
parent adf347fdf1
commit 461d3f6749
3 changed files with 1 additions and 8 deletions

View File

@ -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)
{

View File

@ -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();

View File

@ -8689,7 +8689,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