Changed every single QSetting in Companion.
Next step: Function renaming
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(Open9xInterface * 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(Open9xInterface * 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();
|
||||
|
||||
@@ -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
|
||||
@@ -933,9 +934,11 @@ bool Open9xInterface::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.compilationServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compilationServer(url);
|
||||
}
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
case BOARD_M128:
|
||||
@@ -956,8 +959,11 @@ QString geturl( int board)
|
||||
|
||||
QString getstamp( int board)
|
||||
{
|
||||
QSettings settings;
|
||||
QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString();
|
||||
QString url = g.compilationServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compilationServer(url);
|
||||
}
|
||||
url.append("/stamp-opentx-");
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
@@ -985,8 +991,11 @@ QString getstamp( int board)
|
||||
|
||||
QString getrnurl( int board)
|
||||
{
|
||||
QSettings settings;
|
||||
QString url = settings.value("compilation-server", OPENTX_FIRMWARE_DOWNLOADS).toString();
|
||||
QString url = g.compilationServer();
|
||||
if (url.isEmpty()){
|
||||
url= OPENTX_FIRMWARE_DOWNLOADS;
|
||||
g.compilationServer(url);
|
||||
}
|
||||
url.append("/releasenotes-");
|
||||
switch(board) {
|
||||
case BOARD_STOCK:
|
||||
@@ -1212,9 +1221,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 Open9xInterface(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