Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
#pragma once
#include "Model.h"
#include "Utils/Timer.h"
namespace Espfc::Connect {
enum VtxDeviceType
{
VTXDEV_UNSUPPORTED = 0, // reserved for MSP
VTXDEV_RTC6705 = 1,
// 2 reserved
VTXDEV_SMARTAUDIO = 3,
VTXDEV_TRAMP = 4,
VTXDEV_MSP = 5,
VTXDEV_UNKNOWN = 0xFF,
};
enum State
{
INACTIVE,
INIT,
SET_POWER,
SET_CHANNEL,
IDLE,
};
class Vtx
{
public:
Vtx(Model& model): _serial(nullptr), _model(model) {}
int begin(Stream::ReadWritable* serial);
int update();
int setChannel();
int setPower();
Connect::VtxDeviceType type;
private:
Stream::ReadWritable* _serial;
Model& _model;
State _state = State::INACTIVE;
bool _armed = false;
Utils::Timer _timer;
};
} // namespace Espfc::Connect
66c1bda98This file is pinned to the selected release. Download the original to open it in your design tool.