Number serial from 1 to match settings

This commit is contained in:
Scott Lahteine
2021-03-10 12:05:05 -06:00
parent 2c62886c71
commit dbd28eecc9
51 changed files with 155 additions and 160 deletions

View File

@ -80,7 +80,7 @@ void lv_serial_capt_hook(void * userPointer, uint8_t c)
void lv_eom_hook(void *)
{
// Message is done, let's remove the hook now
MYSERIAL0.setHook();
MYSERIAL1.setHook();
// We are back from the keyboard, so let's redraw ourselves
draw_return_ui();
}

View File

@ -164,7 +164,7 @@ static void lv_kb_event_cb(lv_obj_t *kb, lv_event_t event) {
case GCodeCommand:
if (!queue.ring_buffer.full(3)) {
// Hook anything that goes to the serial port
MYSERIAL0.setHook(lv_serial_capt_hook, lv_eom_hook, 0);
MYSERIAL1.setHook(lv_serial_capt_hook, lv_eom_hook, 0);
queue.enqueue_one_now(ret_ta_txt);
}
lv_clear_keyboard();

View File

@ -414,8 +414,8 @@ void update_usb_status(const bool forceUpdate) {
// This is mildly different than stock, which
// appears to use the usb discovery status.
// This is more logical.
if (last_usb_connected_status != MYSERIAL0.connected() || forceUpdate) {
last_usb_connected_status = MYSERIAL0.connected();
if (last_usb_connected_status != MYSERIAL1.connected() || forceUpdate) {
last_usb_connected_status = MYSERIAL1.connected();
write_to_lcd_P(last_usb_connected_status ? PSTR("{R:UC}\r\n") : PSTR("{R:UD}\r\n"));
}
}