Skip to content

Commit d0782c4

Browse files
author
ikkemaniac
committed
move wizmix out into own header, fails
1 parent abd84b0 commit d0782c4

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

companion/src/wizard/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ project(wizard)
33

44
set(${PROJECT_NAME}_NAMES
55
wizarddataair
6+
wizardwizmix
67
wizarddialog
78
)
89

@@ -11,6 +12,7 @@ AddHeadersSources()
1112
# AUTOMOC does not detect so manually process
1213
set(${PROJECT_NAME}_MOC
1314
wizarddataair.h
15+
wizardwizmix.h
1416
wizarddialog.h
1517
)
1618

companion/src/wizard/wizarddataair.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#pragma once
2323

2424
#include "eeprominterface.h"
25+
#include "wizardwizmix.h"
2526

2627
#include <QtCore>
2728

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright (C) EdgeTX
3+
*
4+
* Based on code named
5+
* opentx - https://github.com/opentx/opentx
6+
* th9x - http://code.google.com/p/th9x
7+
* er9x - http://code.google.com/p/er9x
8+
* gruvin9x - http://code.google.com/p/gruvin9x
9+
*
10+
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11+
*
12+
* This program is free software; you can redistribute it and/or modify
13+
* it under the terms of the GNU General Public License version 2 as
14+
* published by the Free Software Foundation.
15+
*
16+
* This program is distributed in the hope that it will be useful,
17+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19+
* GNU General Public License for more details.
20+
*/
21+
22+
#pragma once
23+
24+
#include "eeprominterface.h"
25+
26+
#include <QtCore>
27+
28+
class WizMix : public QObject
29+
{
30+
Q_OBJECT
31+
32+
public:
33+
bool complete;
34+
char name[MODEL_NAME_LEN + 1];
35+
unsigned int modelId;
36+
const GeneralSettings & settings;
37+
const ModelData & originalModelData;
38+
int vehicle;
39+
MixerChannel channel[WIZ_MAX_CHANNELS];
40+
bool options[AirVehicle::WIZ_MAX_OPTIONS];
41+
42+
WizMix(const GeneralSettings & settings, unsigned int modelId, const ModelData & modelData);
43+
operator ModelData();
44+
45+
private:
46+
WizMix();
47+
void addMix(ModelData & model, int input, int weight, int channel, int & mixerIndex);
48+
void maxMixSwitch(char *name, MixData &mix, int destCh, int sw, int weight);
49+
50+
};

0 commit comments

Comments
 (0)