Distinguish serial index from mask (#21287)

This commit is contained in:
X-Ryl669
2021-03-09 10:20:37 +01:00
committed by GitHub
parent 2f1fd4bbaa
commit 55c31fbe9a
14 changed files with 135 additions and 101 deletions

View File

@@ -79,13 +79,13 @@ public:
void commit_command(bool skip_ok
#if HAS_MULTI_SERIAL
, serial_index_t serial_ind=-1
, serial_index_t serial_ind = serial_index_t()
#endif
);
bool enqueue(const char* cmd, bool skip_ok = true
#if HAS_MULTI_SERIAL
, serial_index_t serial_ind=-1
, serial_index_t serial_ind = serial_index_t()
#endif
);
@@ -197,7 +197,7 @@ public:
/**
* (Re)Set the current line number for the last received command
*/
static inline void set_current_line_number(long n) { serial_state[ring_buffer.command_port()].last_N = n; }
static inline void set_current_line_number(long n) { serial_state[ring_buffer.command_port().index].last_N = n; }
private: