mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 07:39:19 +02:00
(uart, driveruipanels) add possibility to change uart baud rate in debug panel
This commit is contained in:
@@ -34,6 +34,10 @@ http://mozilla.org/MPL/2.0/.
|
||||
#define DRIVER_HINT_CONTENT
|
||||
#include "driverhints.h"
|
||||
|
||||
#ifdef WITH_UART
|
||||
#include "uart.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
drivingaid_panel::update() {
|
||||
|
||||
@@ -548,7 +552,9 @@ debug_panel::update() {
|
||||
m_powergridlines.clear();
|
||||
m_cameralines.clear();
|
||||
m_rendererlines.clear();
|
||||
#ifdef WITH_UART
|
||||
m_uartlines.clear();
|
||||
#endif
|
||||
|
||||
update_section_vehicle( m_vehiclelines );
|
||||
update_section_engine( m_enginelines );
|
||||
@@ -559,7 +565,9 @@ debug_panel::update() {
|
||||
update_section_powergrid( m_powergridlines );
|
||||
update_section_camera( m_cameralines );
|
||||
update_section_renderer( m_rendererlines );
|
||||
#ifdef WITH_UART
|
||||
update_section_uart(m_uartlines);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -621,6 +629,7 @@ debug_panel::render() {
|
||||
avlports[i] = (char *) Application.uart_status.available_ports[i].c_str();
|
||||
}
|
||||
ImGui::Combo("Port", &Application.uart_status.selected_port_index, avlports, ports_num);
|
||||
ImGui::Combo("Baud", &Application.uart_status.selected_baud_index, uart_baudrates_list, uart_baudrates_list_num);
|
||||
}
|
||||
ImGui::Checkbox("Enabled", &Application.uart_status.enabled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user