mirror of
https://github.com/azaion/autopilot.git
synced 2026-04-22 12:56:33 +00:00
Refactored a8 codes and added remote testing app a8_remote.
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <QByteArray>
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include "defines.hpp"
|
||||
|
||||
struct Command
|
||||
{
|
||||
COMMAND_ID id;
|
||||
QByteArray command;
|
||||
QString description;
|
||||
};
|
||||
|
||||
class SerialCommand {
|
||||
public:
|
||||
SerialCommand();
|
||||
void printCommands(void);
|
||||
QByteArray getCommandForUI(COMMAND_ID commandId);
|
||||
QByteArray getCommandForInternal(COMMAND_ID commandId);
|
||||
uint8_t getCommandCount();
|
||||
|
||||
private:
|
||||
void setExtraValues(COMMAND_ID commandId);
|
||||
QByteArray createByteArray(const std::initializer_list<int> &bytes);
|
||||
int16_t getCommandIndex(COMMAND_ID commandId);
|
||||
std::vector<Command> mSerialCommands;
|
||||
};
|
||||
Reference in New Issue
Block a user