16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 01:19:19 +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

31
motiontelemetry.h Normal file
View File

@@ -0,0 +1,31 @@
#pragma once
#include <string>
#include <chrono>
#ifdef _WIN32
#include <winsock2.h>
#endif
class motiontelemetry
{
public:
struct conf_t
{
bool enable;
std::string proto;
std::string address;
std::string port;
float updatetime;
};
private:
int sock;
std::chrono::time_point<std::chrono::high_resolution_clock> last_update;
conf_t conf;
public:
motiontelemetry();
~motiontelemetry();
void update();
};