17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 12:09:19 +02:00
Files
maszyna/utilities/motiontelemetry.cppm
maj00r b8f040e6fd propagate template headers transitively, import Console where used
AnimModel.cpp reaches cParser through the simulation core, not a direct
import, so the previous pass missed it; the propagation now follows the
whole import closure. Train.cpp, drivermode.cpp and Globals.cpp call
Console:: inside _WIN32 guards without importing eu07.console - invisible
on Linux, where those blocks are skipped.
2026-09-10 01:41:24 +02:00

53 lines
824 B
C++

module;
#include <array>
#include <cstddef>
#include <deque>
#include <limits>
#include <mutex>
#include <ostream>
#include <sstream>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
#include <string>
#include <chrono>
export module eu07.utilities.motiontelemetry;
import eu07.glm;
export {
class motiontelemetry
{
public:
struct conf_t
{
bool enable;
std::string proto;
std::string address;
std::string port;
float updatetime;
bool includegravity;
bool fwdposbased;
bool latposbased;
float axlebumpscale;
};
private:
int sock;
std::chrono::time_point<std::chrono::high_resolution_clock> last_update;
conf_t conf;
glm::dvec3 last_pos;
glm::dvec3 last_vel;
double last_yaw;
public:
motiontelemetry();
~motiontelemetry();
void update();
};
} // export