попытки сделать crsf, не взлетела часть с пультом
This commit is contained in:
21
lib/port/udp.h
Normal file
21
lib/port/udp.h
Normal 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
|
||||
Reference in New Issue
Block a user