попытки сделать crsf, не взлетела часть с пультом

This commit is contained in:
2025-11-24 16:24:59 +03:00
parent 0f14fd0155
commit 3eaea1b966
20 changed files with 769 additions and 535 deletions

21
lib/port/udp.h Normal file
View File

@@ -0,0 +1,21 @@
#ifndef SDRPI_FPV_CONTROL_GROUND_PORT_UDP_H
#define SDRPI_FPV_CONTROL_GROUND_PORT_UDP_H
#include "port/poller.h"
#include <string>
#include <vector>
#include <cstdint>
#include <span>
namespace drivers {
class UdpDriver : public poller::PollObject {
public:
// port - локальный порт
explicit UdpDriver(uint16_t port);
bool sendTo(std::span<const uint8_t> data, const std::string& addr, uint16_t port);
bool recvPacket(std::vector<uint8_t>& out);
~UdpDriver() override;
};
}
#endif //SDRPI_FPV_CONTROL_GROUND_PORT_UDP_H