Merge pull request #3036 from wavexx/remove_is_buffer_empty

Remove duplicate function is_buffer_empty()
This commit is contained in:
DRracer 2021-03-05 08:28:40 +01:00 committed by GitHub
commit 6489c6f17f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

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