добавил все для наземной станции

This commit is contained in:
2025-11-13 18:20:00 +03:00
commit 6ef59210bb
8 changed files with 376 additions and 0 deletions

29
ground/joystick-reader.h Normal file
View File

@@ -0,0 +1,29 @@
#ifndef SDRPI_FPV_CONTROL_GROUND_JOYSTICK_READER_H
#define SDRPI_FPV_CONTROL_GROUND_JOYSTICK_READER_H
#include <cstdint>
#include <vector>
#include <string>
#ifdef _WIN32
#include <SDL.h>
#else
#include <SDL2/SDL.h>
#endif
class JoystickReader {
public:
JoystickReader(int frequency = 50);
~JoystickReader();
bool initialize();
bool readData(std::vector<uint16_t>& data);
std::string getJoystickName() const;
private:
SDL_Joystick* joystick;
int updateIntervalMs;
std::string joystickName;
};
#endif //SDRPI_FPV_CONTROL_GROUND_JOYSTICK_READER_H