16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 12:29:18 +02:00

motion telemetry preparations

This commit is contained in:
milek7
2018-01-15 13:44:27 +01:00
parent 4d2d777737
commit 943eabf8a1
8 changed files with 126 additions and 2 deletions

View File

@@ -166,6 +166,7 @@ double Global::fTimeSpeed = 1.0; // przyspieszenie czasu, zmienna do testów
bool Global::bHideConsole = false; // hunter-271211: ukrywanie konsoli
Global::uart_conf_t Global::uart_conf;
motiontelemetry::conf_t Global::motiontelemetry_conf;
//randomizacja
std::mt19937 Global::random_engine = std::mt19937(std::time(NULL));
@@ -777,6 +778,15 @@ void Global::ConfigParse(cParser &Parser)
Parser.getTokens(1);
Parser >> Global::uart_conf.debug;
}
else if (token == "motiontelemetry")
{
Parser.getTokens(4);
Global::motiontelemetry_conf.enable = true;
Parser >> Global::motiontelemetry_conf.proto;
Parser >> Global::motiontelemetry_conf.address;
Parser >> Global::motiontelemetry_conf.port;
Parser >> Global::motiontelemetry_conf.updatetime;
}
} while ((token != "") && (token != "endconfig")); //(!Parser->EndOfFile)
// na koniec trochę zależności
if (!bLoadTraction) // wczytywanie drutów i słupów