17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 13:19:20 +02:00

hardware protocol v2: configuration, wiring and debug panel

Adds the WITH_HARDWARE_PROTOCOL_V2 build option and the eu07.ini entries
which configure it: uart2 declares a serial link and may be repeated for
several controllers, the remaining uart2* entries tune frame size,
heartbeat, rate limits and logging. UART v1 is untouched and both may be
active at the same time on different ports.

The driver mode starts the manager when at least one link is configured
and pumps it from the input polling loop, and the debug panel gains a
Hardware Protocol v2 section reporting link and session condition,
packet rates, round trip time, protocol and transport error counters and
whatever diagnostics the device itself reports, with switches for
protocol and frame logging.
This commit is contained in:
2026-09-05 20:35:04 +00:00
parent 4e3afdd2a6
commit 91be90548f
11 changed files with 269 additions and 9 deletions

View File

@@ -55,6 +55,13 @@ void driver_mode::drivermode_input::poll()
uart->poll();
}
#endif
#ifdef WITH_HARDWARE_PROTOCOL_V2
if (hardware != nullptr)
{
// exchanges frames already gathered by the hardware worker thread, never touches the port itself
hardware->update();
}
#endif
#ifdef WITH_ZMQ
if (zmq != nullptr)
{
@@ -86,6 +93,12 @@ bool driver_mode::drivermode_input::init()
uart->init();
}
#endif
#ifdef WITH_HARDWARE_PROTOCOL_V2
if (true == Global.hardware_conf.enable)
{
hardware = std::make_unique<hardware::hardware_manager>(Global.hardware_conf);
}
#endif
#ifdef WITH_ZMQ
if (!Global.zmq_address.empty())
{