mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 02:29:17 +02:00
motion telemetry preparations
This commit is contained in:
31
motiontelemetry.h
Normal file
31
motiontelemetry.h
Normal 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();
|
||||
};
|
||||
Reference in New Issue
Block a user