|
| 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