Merge branch 'next' of https://github.com/opentx/opentx into bsongis/vario_improvements
Conflicts: radio/src/audio_arm.cpp
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "er9xeeprom.h"
|
||||
#include "er9xsimulator.h"
|
||||
#include "file.h"
|
||||
#include "appdata.h"
|
||||
|
||||
#define FILE_TYP_GENERAL 1
|
||||
#define FILE_TYP_MODEL 2
|
||||
@@ -44,8 +45,7 @@ const char * Er9xInterface::getName()
|
||||
|
||||
const int Er9xInterface::getEEpromSize()
|
||||
{
|
||||
QSettings settings;
|
||||
QString avrMCU = settings.value("mcu", QString("m64")).toString();
|
||||
QString avrMCU = g.mcu();
|
||||
if (avrMCU==QString("m128")) {
|
||||
return 2*EESIZE_STOCK;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "gruvin9xinterface.h"
|
||||
#include "gruvin9xeeprom.h"
|
||||
#include "file.h"
|
||||
#include "appdata.h"
|
||||
|
||||
#define FILE_TYP_GENERAL 1
|
||||
#define FILE_TYP_MODEL 2
|
||||
@@ -47,8 +48,7 @@ const char * Gruvin9xInterface::getName()
|
||||
const int Gruvin9xInterface::getEEpromSize()
|
||||
{
|
||||
if (board == BOARD_STOCK) {
|
||||
QSettings settings;
|
||||
QString avrMCU = settings.value("mcu", QString("m64")).toString();
|
||||
QString avrMCU = g.mcu();
|
||||
if (avrMCU==QString("m128")) {
|
||||
return EESIZE_STOCK*2;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "opentxSky9xsimulator.h"
|
||||
#include "opentxinterface.h"
|
||||
#include "appdata.h"
|
||||
|
||||
#define SIMU
|
||||
#define SIMU_EXCEPTIONS
|
||||
@@ -135,8 +136,7 @@ using namespace Open9xSky9x;
|
||||
Open9xSky9xSimulator::Open9xSky9xSimulator(OpenTxInterface * open9xInterface):
|
||||
open9xInterface(open9xInterface)
|
||||
{
|
||||
QSettings settings;
|
||||
QString path=settings.value("sdPath", ".").toString()+"/";
|
||||
QString path=g.profile[g.id()].sdPath()+"/";
|
||||
int i=0;
|
||||
for (i=0; i< std::min(path.length(),1022); i++) {
|
||||
simuSdDirectory[i]=path.at(i).toAscii();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "opentxTaranisSimulator.h"
|
||||
#include "opentxinterface.h"
|
||||
#include "appdata.h"
|
||||
|
||||
#define SIMU
|
||||
#define SIMU_EXCEPTIONS
|
||||
@@ -181,8 +182,7 @@ OpentxTaranisSimulator::OpentxTaranisSimulator(OpenTxInterface * open9xInterface
|
||||
open9xInterface(open9xInterface)
|
||||
{
|
||||
taranisSimulatorBoard = GetEepromInterface()->getBoard();
|
||||
QSettings settings;
|
||||
QString path=settings.value("sdPath", ".").toString()+"/";
|
||||
QString path=g.profile[g.id()].sdPath()+"/";
|
||||
int i=0;
|
||||
for (i=0; i< std::min(path.length(),1022); i++) {
|
||||
simuSdDirectory[i]=path.at(i).toAscii();
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16)
|
||||
#define MAX_EXPOS(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 64 : 32) : (IS_DBLRAM(board, version) ? 16 : 14))
|
||||
#define MAX_CUSTOM_SWITCHES(board, version) (IS_ARM(board) ? 32 : (IS_DBLEEPROM(board, version) ? 15 : 12))
|
||||
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? 32 : (IS_DBLEEPROM(board, version) ? 24 : 16))
|
||||
#define MAX_CUSTOM_FUNCTIONS(board, version) (IS_ARM(board) ? (version >= 216 ? 64 : 32) : (IS_DBLEEPROM(board, version) ? 24 : 16))
|
||||
#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : O9X_MAX_CURVES)
|
||||
#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5)
|
||||
|
||||
@@ -164,7 +164,7 @@ class SourcesConversionTable: public ConversionTable {
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
for (int i=0; i<32; i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i), val++);
|
||||
for (int i=0; i<3; i++) {
|
||||
for (int i=0; i<7; i++) {
|
||||
for (int j=0; j<6; j++) {
|
||||
addConversion(RawSource(SOURCE_TYPE_LUA_INPUT, i*16+j), val++);
|
||||
}
|
||||
@@ -896,7 +896,12 @@ class ExpoField: public TransformedField {
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
expo.weight = smallGvarToC9x(_weight);
|
||||
if (IS_TARANIS(board) && version < 216) {
|
||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||
}
|
||||
|
||||
expo.weight = smallGvarToC9x(_weight);
|
||||
|
||||
if (!IS_TARANIS(board) || version < 216) {
|
||||
if (!_curveMode)
|
||||
expo.curve = CurveReference(CurveReference::CURVE_REF_EXPO, smallGvarToC9x(_curveParam));
|
||||
@@ -1424,7 +1429,9 @@ class ArmCustomFunctionField: public TransformedField {
|
||||
internalField.Append(new SwitchField<8>(fn.swtch, board, version));
|
||||
internalField.Append(new ConversionField< UnsignedField<8> >((unsigned int &)fn.func, &functionsConversionTable, "Function", ::QObject::tr("OpenTX on this board doesn't accept this function")));
|
||||
|
||||
if (IS_TARANIS(board))
|
||||
if (IS_TARANIS(board) && version >= 216)
|
||||
internalField.Append(new CharField<8>(_param, false));
|
||||
else if (IS_TARANIS(board))
|
||||
internalField.Append(new CharField<10>(_param, false));
|
||||
else
|
||||
internalField.Append(new CharField<6>(_param, false));
|
||||
@@ -2203,7 +2210,7 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
}
|
||||
|
||||
if (IS_TARANIS(board) && version >= 216) {
|
||||
for (int i=0; i<3; i++) {
|
||||
for (int i=0; i<7; i++) {
|
||||
ScriptData & script = modelData.scriptData[i];
|
||||
internalField.Append(new ZCharField<10>(script.filename));
|
||||
internalField.Append(new ZCharField<10>(script.name));
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "opentxSky9xsimulator.h"
|
||||
#include "opentxTaranisSimulator.h"
|
||||
#include "file.h"
|
||||
#include "appdata.h"
|
||||
|
||||
#define FILE_TYP_GENERAL 1
|
||||
#define FILE_TYP_MODEL 2
|
||||
@@ -516,7 +517,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
return (IS_TARANIS(board) ? 22 : 9);
|
||||
case CustomFunctions:
|
||||
if (IS_ARM(board))
|
||||
return 32;
|
||||
return 64;
|
||||
else if (board==BOARD_GRUVIN9X||board==BOARD_M128)
|
||||
return 24;
|
||||
else
|
||||
@@ -549,7 +550,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||
case VoicesAsNumbers:
|
||||
return (IS_ARM(board) ? 0 : 1);
|
||||
case VoicesMaxLength:
|
||||
return (IS_ARM(board) ? (IS_TARANIS(board) ? 10 : 6) : 0);
|
||||
return (IS_ARM(board) ? (IS_TARANIS(board) ? 8 : 6) : 0);
|
||||
case MultiLangVoice:
|
||||
return (IS_ARM(board) ? 1 : 0);
|
||||
case SoundPitch:
|
||||
@@ -934,9 +935,11 @@ bool OpenTxInterface::loadBackup(RadioData &radioData, uint8_t *eeprom, int esiz
|
||||
|
||||
QString geturl( int board)
|
||||
{
|
||||
QSettings settings;
|
||||
QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString();
|
||||
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
case BOARD_M128:
|
||||
@@ -957,8 +960,11 @@ QString geturl( int board)
|
||||
|
||||
QString getstamp( int board)
|
||||
{
|
||||
QSettings settings;
|
||||
QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString();
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
url.append("/stamp-opentx-");
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
@@ -986,8 +992,11 @@ QString getstamp( int board)
|
||||
|
||||
QString getrnurl( int board)
|
||||
{
|
||||
QSettings settings;
|
||||
QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString();
|
||||
QString url = g.compileServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compileServer(url);
|
||||
}
|
||||
url.append("/releasenotes-");
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
@@ -1213,9 +1222,7 @@ void RegisterOpen9xFirmwares()
|
||||
open9x->addOptions(fai_options);
|
||||
firmwares.push_back(open9x);
|
||||
|
||||
QSettings settings;
|
||||
int rev4a = settings.value("rev4asupport",0).toInt();
|
||||
if (rev4a) {
|
||||
if (g.rev4aSupport()) {
|
||||
open9x = new Open9xFirmware("opentx-taranisrev4a", QObject::tr("OpenTX for FrSky Taranis Rev4a"), new OpenTxInterface(BOARD_TARANIS_REV4a), geturl(BOARD_TARANIS_REV4a), getstamp(BOARD_TARANIS_REV4a),getrnurl(BOARD_TARANIS), true);
|
||||
open9x->addOption("noheli", QObject::tr("Disable HELI menu and cyclic mix support"));
|
||||
open9x->addOption("notemplates", QObject::tr("Disable TEMPLATES menu"));
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "th9xeeprom.h"
|
||||
#include "th9xsimulator.h"
|
||||
#include "file.h"
|
||||
#include "appdata.h"
|
||||
|
||||
#define FILE_TYP_GENERAL 1
|
||||
#define FILE_TYP_MODEL 2
|
||||
@@ -44,8 +45,7 @@ const char * Th9xInterface::getName()
|
||||
|
||||
const int Th9xInterface::getEEpromSize()
|
||||
{
|
||||
QSettings settings;
|
||||
QString avrMCU = settings.value("mcu", QString("m64")).toString();
|
||||
QString avrMCU = g.mcu();
|
||||
if (avrMCU==QString("m128")) {
|
||||
return 2*EESIZE_STOCK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user