mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 04:29:18 +02:00
Merge branch 'master' into refactor/split-oncommands-train
Brings the branch up to date after ~6 weeks of drift (51 commits).
The only real conflict was vehicle/Train.cpp, deleted here and modified
on master by 763a76d4, which added a dynamicbrake_pos entry to
GetTrainState. That line is re-applied in its new home,
vehicle/train/TrainState.cpp; the file deletion is kept.
utilities/uart.cpp and vehicle/Driver.cpp merged cleanly: master edited
function bodies, this branch only rewrote the Train.h include paths.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -506,6 +506,19 @@ void uart_input::poll()
|
||||
0
|
||||
);
|
||||
}
|
||||
if (true == conf.dynamicenable)
|
||||
{
|
||||
// dynamic brake 8 bit
|
||||
double const position{(float)(buffer[13] - conf.dynamicbrakemin) / (conf.dynamicbrakemax - conf.dynamicbrakemin)};
|
||||
|
||||
relay.post(
|
||||
user_command::dynamicbrakecontrollerset,
|
||||
position,
|
||||
0,
|
||||
GLFW_PRESS,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
old_packet = buffer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user