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

hardware protocol v2.1: device log, diagnostic routines, manual links

Three additions, all driven from the simulator debug panel.

DEVICE_LOG lets a controller send text lines; they reach the simulator log
and a per connection view in the panel which keeps the last 64 of them.

Diagnostic routines: a controller lists the procedures it offers, the
operator picks one from a drop down and starts it, and the controller
reports progress and the result. While a routine runs the controller can
ask the simulator to show a message box with its own text and buttons and
gets back which one was pressed, which is what a valve or gauge
calibration needs. The message box appears whether the debug panel is
open or not.

Links can now be disconnected and reconnected by hand: disconnecting
closes the serial port so the controller can be reprogrammed, and the
session is rebuilt from scratch on reconnect. Ports which appear while
the simulation runs can be picked from a refreshed list, given a baud
rate and added as a new controller, so the manager now starts even with
no uart2 entries in eu07.ini.
This commit is contained in:
2026-09-06 11:29:26 +00:00
parent da962cd91b
commit eed44dc858
10 changed files with 777 additions and 40 deletions

View File

@@ -94,10 +94,8 @@ bool driver_mode::drivermode_input::init()
}
#endif
#ifdef WITH_HARDWARE_PROTOCOL_V2
if (true == Global.hardware_conf.enable)
{
hardware = std::make_unique<hardware::hardware_manager>(Global.hardware_conf);
}
// started even with no links configured, so that a controller can be added from the debug panel
hardware = std::make_unique<hardware::hardware_manager>(Global.hardware_conf);
#endif
#ifdef WITH_ZMQ
if (!Global.zmq_address.empty())