mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 22:16:33 +00:00
41 lines
996 B
C++
41 lines
996 B
C++
#pragma once
|
|
|
|
#include "serialCommand.hpp"
|
|
#include "serialPort.hpp"
|
|
#include <cstdint>
|
|
|
|
class Config
|
|
{
|
|
public:
|
|
static void setInitalValues(SerialPort *serial, SerialCommand *command);
|
|
static void updateState(void);
|
|
|
|
static SerialPort *getSerial();
|
|
static SerialCommand *getCommand(void);
|
|
static uint16_t getResolutionWidth(void);
|
|
static uint16_t getResolutionHeight(void);
|
|
static float getMaxZoom(void);
|
|
|
|
static float getCurrentYaw(void);
|
|
static float getCurrentPitch(void);
|
|
static float getCurrentRoll(void);
|
|
static float getCurrentZoom(void);
|
|
|
|
private:
|
|
static void sanityCheck(void);
|
|
|
|
static SerialPort *mSerial;
|
|
static SerialCommand *mCommand;
|
|
|
|
// Get these only once
|
|
static uint16_t mResolutionX;
|
|
static uint16_t mResolutionY;
|
|
static float mMaxZoom;
|
|
|
|
// Update these before every command
|
|
static float mCurrentYaw;
|
|
static float mCurrentPitch;
|
|
static float mCurrentRoll;
|
|
static float mCurrentZoom;
|
|
};
|