Some refactoring in the new Wizard
This commit is contained in:
+40
-16
@@ -15,34 +15,58 @@
|
||||
#ifndef WIZARDDATA_H
|
||||
#define WIZARDDATA_H
|
||||
|
||||
#include "eeprominterface.h"
|
||||
|
||||
#define WIZ_MAX_CHANNELS 8
|
||||
|
||||
// TODO use a constant common to the whole companion
|
||||
// TODO when in the wizard use the getCapacity(...) to know how long the name can be
|
||||
#define WIZ_MODEL_NAME_LENGTH 12
|
||||
|
||||
enum Input {NOINPUT, THROTTLE, RUDDER, ELEVATOR, AILERON, FLAP, AIRBREAK};
|
||||
enum Vehicle {NOVEHICLE, PLANE, MULTICOPTER, HELICOPTER };
|
||||
enum Input {
|
||||
NOINPUT,
|
||||
THROTTLE,
|
||||
RUDDER,
|
||||
ELEVATOR,
|
||||
AILERON,
|
||||
FLAP,
|
||||
AIRBREAK
|
||||
};
|
||||
|
||||
enum Vehicle {
|
||||
NOVEHICLE,
|
||||
PLANE,
|
||||
MULTICOPTER,
|
||||
HELICOPTER
|
||||
};
|
||||
|
||||
class Channel
|
||||
{
|
||||
public:
|
||||
int sourceDlg; // Originating dialog, only of interest for producer
|
||||
Input input1;
|
||||
Input input2;
|
||||
int weight1;
|
||||
int weight2;
|
||||
public:
|
||||
int sourceDlg; // Originating dialog, only of interest for producer
|
||||
Input input1;
|
||||
Input input2;
|
||||
int weight1;
|
||||
int weight2;
|
||||
|
||||
Channel();
|
||||
void clear();
|
||||
Channel();
|
||||
void clear();
|
||||
};
|
||||
|
||||
class WizMix
|
||||
{
|
||||
public:
|
||||
bool complete;
|
||||
char name[WIZ_MODEL_NAME_LENGTH + 1];
|
||||
Vehicle vehicle;
|
||||
Channel channel[WIZ_MAX_CHANNELS];
|
||||
public:
|
||||
bool complete;
|
||||
char name[WIZ_MODEL_NAME_LENGTH + 1];
|
||||
unsigned int modelId;
|
||||
Vehicle vehicle;
|
||||
Channel channel[WIZ_MAX_CHANNELS];
|
||||
|
||||
WizMix();
|
||||
explicit WizMix(const unsigned int modelId);
|
||||
operator ModelData();
|
||||
|
||||
private:
|
||||
WizMix();
|
||||
};
|
||||
|
||||
#endif // WIZARDDATA_H
|
||||
|
||||
Reference in New Issue
Block a user