mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-09-01 11:39:18 +02:00
Add independent dynamic brake support (eg. Vectron) to UART controllers
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