virtual slider mouse input mode, minor refactoring, minor bug fixes

This commit is contained in:
tmj-fstate
2018-07-11 17:45:50 +02:00
parent 1056f9bb14
commit 12d70fe320
20 changed files with 330 additions and 269 deletions

View File

@@ -208,7 +208,7 @@ void uart_input::poll()
double const position { (float)( ( (uint16_t)buffer[ 8 ] | ( (uint16_t)buffer[ 9 ] << 8 ) ) - conf.mainbrakemin ) / ( conf.mainbrakemax - conf.mainbrakemin ) };
relay.post(
user_command::trainbrakeset,
reinterpret_cast<std::uint64_t const &>( position ),
position,
0,
GLFW_PRESS,
// TODO: pass correct entity id once the missing systems are in place
@@ -219,7 +219,7 @@ void uart_input::poll()
double const position { (float)( ( (uint16_t)buffer[ 10 ] | ( (uint16_t)buffer[ 11 ] << 8 ) ) - conf.localbrakemin ) / ( conf.localbrakemax - conf.localbrakemin ) };
relay.post(
user_command::independentbrakeset,
reinterpret_cast<std::uint64_t const &>( position ),
position,
0,
GLFW_PRESS,
// TODO: pass correct entity id once the missing systems are in place