16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 17:09:19 +02:00

Merge pull request #1 from maciek001/patch-1

Update uart.cpp
This commit is contained in:
Milek7
2017-09-27 21:14:15 +02:00
committed by GitHub

View File

@@ -126,7 +126,7 @@ void uart_input::poll()
if (conf.trainenable)
t->set_trainbrake((float)(((uint16_t)buffer[8] | ((uint16_t)buffer[9] << 8)) - conf.mainbrakemin) / (conf.mainbrakemax - conf.mainbrakemin));
if (conf.localenable)
t->set_localbrake((float)(((uint16_t)buffer[10] | ((uint16_t)buffer[11] << 8)) - conf.mainbrakemin) / (conf.localbrakemax - conf.localbrakemin));
t->set_localbrake((float)(((uint16_t)buffer[10] | ((uint16_t)buffer[11] << 8)) - conf.localbrakemin) / (conf.localbrakemax - conf.localbrakemin));
old_packet = buffer;
}