Merge remote-tracking branch 'upstream/next' into next

This commit is contained in:
Andy Jenkinson
2014-06-11 15:44:27 +01:00
84 changed files with 3475 additions and 3359 deletions
+28 -1
View File
@@ -278,7 +278,7 @@ Josep Clodas Sola
Thierry Martin
Peter Mauro
Mitchell Brenner
Ulach Green
Yak
Lluis Bullich Rañe
Steffen Rohr
Eric Jacquin
@@ -436,3 +436,30 @@ Axel Stöckle
Mike Perkins
Erwin Störrle
Rodger Hopper
Fernando Cesar
Jonathan Gillis
DK-System
Lexington S Morley
Bernd Koehler
Davis RC
Pete Johnson
Patricia Martin
Florian Tschacher
Brian Spearing
Craig Hall
Joseph Case
Harald Klein
Robert Crockford
Chris Boultinghouse
Kitsew
Georgios Papadopoulos
Fourmost Products
Dennis Miller
Dave Matison
Maximilian Radig
Juan Rodriguez
Robert Sessler
John Murray
Martin Sniedze
David Poole
Manfred Delakowitz
+1 -1
View File
@@ -2,7 +2,7 @@ PROJECT( companion )
SET( C9X_VERSION_MAJOR "2" )
SET( C9X_VERSION_MINOR "0" )
SET( C9X_VERSION_REVISION "1" )
SET( C9X_VERSION_REVISION "2" )
SET( C9X_VERSION ${C9X_VERSION_MAJOR}.${C9X_VERSION_MINOR}.${C9X_VERSION_REVISION} )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
+6 -7
View File
@@ -159,11 +159,11 @@ void avrOutputDialog::doCopy()
dest.close();
}
else {
QMessageBox::warning(this, tr("Error"),tr("Cannot write destination"));
QMessageBox::warning(this, tr("Error"),tr("Cannot write destination") + ": " + dest.errorString());
}
}
else {
QMessageBox::warning(this, tr("Error"),tr("Cannot open source file"));
QMessageBox::warning(this, tr("Error"),tr("Cannot open source file") + ": " + source.errorString());
}
source.close();
@@ -438,7 +438,7 @@ void avrOutputDialog::doFinished(int code=0)
if (hasErrors || code) {
if (!cmdLine.isEmpty()) {
if (getProgrammer()!="AVRDUDE") {
QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly"));
QMessageBox::critical(this, "Companion", getProgrammer() + " " + tr("did not finish correctly"));
}
else {
int res = QMessageBox::question(this, "Companion",getProgrammer() + " " + tr("did not finish correctly!\nDo you want some help ?"),QMessageBox::Yes | QMessageBox::No);
@@ -446,8 +446,9 @@ void avrOutputDialog::doFinished(int code=0)
errorWizard();
}
}
} else {
QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly"));
}
else {
QMessageBox::critical(this, "Companion", tr("Copy did not finish correctly"));
}
// reject();
}
@@ -467,8 +468,6 @@ void avrOutputDialog::doFinished(int code=0)
default: //AVR_DIALOG_KEEP_OPEN
break;
}
}
void avrOutputDialog::doProcessStarted()
+3 -3
View File
@@ -20,7 +20,7 @@ class avrOutputDialog : public QDialog
{
Q_OBJECT
public:
public:
explicit avrOutputDialog(QWidget *parent, QString prog, QStringList arg, QString wTitle, int closeBehaviour=AVR_DIALOG_CLOSE_IF_SUCCESSFUL, bool displayDetails=false);
~avrOutputDialog();
@@ -29,7 +29,7 @@ public:
void waitForFinish();
void addReadFuses();
protected slots:
protected slots:
void doAddTextStdOut();
void doAddTextStdErr();
void doProcessStarted();
@@ -41,7 +41,7 @@ protected slots:
void killTimerElapsed();
void errorWizard();
private:
private:
QString getProgrammer();
Ui::avrOutputDialog *ui;
+1 -1
View File
@@ -193,7 +193,7 @@ void burnDialog::checkFw(QString fileName)
ui->FramFWInfo->show();
ui->DateField->setText(flash.getDate() + " " + flash.getTime());
ui->versionField->setText(flash.getVersion());
ui->ModField->setText(flash.getEEprom());
ui->ModField->setText(flash.getEEpromId());
ui->SplashFrame->hide();
if (flash.hasSplash()) {
+9 -6
View File
@@ -263,7 +263,7 @@ QString RawSource::toString()
static const QString telemetry[] = {
QObject::tr("Batt"), QObject::tr("Time"), QObject::tr("Timer1"), QObject::tr("Timer2"),
QObject::tr("SWR"), QObject::tr("RSSI Tx"), QObject::tr("RSSI Rx"), QObject::tr("Rx Batt"),
QObject::tr("SWR"), QObject::tr("RSSI Tx"), QObject::tr("RSSI Rx"),
QObject::tr("A1"), QObject::tr("A2"), QObject::tr("A3"), QObject::tr("A4"),
QObject::tr("Alt"), QObject::tr("Rpm"), QObject::tr("Fuel"), QObject::tr("T1"), QObject::tr("T2"),
QObject::tr("Speed"), QObject::tr("Dist"), QObject::tr("GPS Alt"),
@@ -852,11 +852,16 @@ GeneralSettings::GeneralSettings()
calibSpanPos[i] = 0x180;
}
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
BoardEnum board = GetEepromInterface()->getBoard();
if (IS_TARANIS(board)) {
potsType[0] = 1;
potsType[1] = 1;
}
if (IS_ARM(board)) {
speakerVolume = 12;
}
templateSetup = g.profile[g.id()].channelOrder();
stickMode = g.profile[g.id()].defaultMode();
@@ -991,7 +996,6 @@ void FrSkyData::clear()
memset(this, 0, sizeof(FrSkyData));
rssiAlarms[0].clear(2, 45);
rssiAlarms[1].clear(3, 42);
rxBattAlarms[1] = round(43.0*255/132);
varioSource = 2/*VARIO*/;
blades = 2;
}
@@ -1073,11 +1077,11 @@ void ModelData::clear()
moduleData[0].protocol=PPM;
moduleData[1].protocol=OFF;
}
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++)
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
phaseData[i].clear();
}
clearInputs();
clearMixes();
for (int i=0; i<C9X_NUM_CHNOUT; i++)
limitData[i].clear();
for (int i=0; i<NUM_STICKS; i++)
@@ -1088,7 +1092,6 @@ void ModelData::clear()
curves[i].clear(5);
for (int i=0; i<2; i++)
timers[i].clear();
swashRingData.clear();
frsky.clear();
}
+2 -20
View File
@@ -229,7 +229,6 @@ enum TelemetrySource {
TELEMETRY_SOURCE_SWR,
TELEMETRY_SOURCE_RSSI_TX,
TELEMETRY_SOURCE_RSSI_RX,
TELEMETRY_SOURCE_RX_BATT,
TELEMETRY_SOURCE_A1,
TELEMETRY_SOURCE_A2,
TELEMETRY_SOURCE_A3,
@@ -496,7 +495,6 @@ class GeneralSettings {
bool disableBG;
unsigned int splashMode;
int splashDuration;
uint8_t filterInput; // TODO enum
unsigned int backlightDelay;
bool blightinv;
bool stickScroll;
@@ -517,7 +515,7 @@ class GeneralSettings {
unsigned int gpsFormat;
int speakerVolume;
unsigned int backlightBright;
unsigned int switchesDelay;
int switchesDelay;
int currentCalib;
int temperatureCalib;
int temperatureWarn;
@@ -799,15 +797,6 @@ class FrSkyAlarmData {
void clear() { memset(this, 0, sizeof(FrSkyAlarmData)); }
};
class FrSkyErAlarmData {
public:
FrSkyErAlarmData() { clear(); }
uint8_t frskyAlarmType ;
uint8_t frskyAlarmLimit ;
uint8_t frskyAlarmSound ;
void clear() { memset(this, 0, sizeof(FrSkyErAlarmData)); }
};
class FrSkyRSSIAlarm {
public:
FrSkyRSSIAlarm() { clear(0, 50); }
@@ -871,7 +860,6 @@ enum TelemetryVarioSources {
};
enum TelemetryVoltsSources {
TELEMETRY_VOLTS_SOURCE_RXBATT,
TELEMETRY_VOLTS_SOURCE_A1,
TELEMETRY_VOLTS_SOURCE_A2,
TELEMETRY_VOLTS_SOURCE_A3,
@@ -910,7 +898,6 @@ class FrSkyData {
bool mAhPersistent;
unsigned int storedMah;
int fasOffset;
unsigned int rxBattAlarms[2];
void clear();
};
@@ -993,7 +980,6 @@ class ModelData {
bool used;
char name[12+1];
uint8_t modelVoice;
TimerData timers[2];
bool thrTrim; // Enable Throttle Trim
bool thrExpo; // Enable Throttle Expo
@@ -1016,8 +1002,7 @@ class ModelData {
LogicalSwitchData customSw[C9X_NUM_CSW];
FuncSwData funcSw[C9X_MAX_CUSTOM_FUNCTIONS];
SwashRingData swashRingData;
unsigned int thrTraceSrc;
int8_t traineron; // 0 disable trainer, 1 allow trainer
unsigned int thrTraceSrc;
unsigned int modelId;
unsigned int switchWarningStates;
unsigned int nSwToWarn;
@@ -1027,9 +1012,6 @@ class ModelData {
// TODO structure
char gvars_names[C9X_MAX_GVARS][6+1];
bool gvars_popups[C9X_MAX_GVARS];
uint8_t gvsource[5];
uint8_t bt_telemetry;
uint8_t numVoice;
MavlinkData mavlink;
unsigned int telemetryProtocol;
FrSkyData frsky;
@@ -356,7 +356,6 @@ t_Er9xModelData::operator ModelData ()
{
ModelData c9x;
c9x.used = true;
c9x.modelVoice = modelVoice;
getEEPROMString(c9x.name, name, sizeof(name));
c9x.timers[0].mode = getEr9xTimerMode(tmrMode);
c9x.timers[0].dir = tmrDir;
@@ -375,8 +374,6 @@ t_Er9xModelData::operator ModelData ()
c9x.moduleData[0].protocol = PPM;
break;
}
c9x.traineron= traineron;
// c9x.t2throttle = t2throttle;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
@@ -125,7 +125,6 @@ Ersky9xGeneral::operator GeneralSettings ()
result.splashMode = disableSplashScreen;
result.disablePotScroll=(disablePotScroll==1);
result.disableBG=(disableBG==1);
result.filterInput = filterInput;
result.templateSetup = templateSetup;
result.PPM_Multiplier = PPM_Multiplier;
getEEPROMString(result.ownerName, ownerName, sizeof(ownerName));
@@ -507,8 +506,6 @@ t_Ersky9xModelData_v10::operator ModelData ()
c9x.moduleData[0].protocol = PPM;
break;
}
c9x.traineron= traineron;
// c9x.t2throttle = t2throttle;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
@@ -628,8 +625,6 @@ t_Ersky9xModelData_v11::operator ModelData ()
c9x.moduleData[0].protocol = PPM;
break;
}
c9x.traineron= traineron;
// c9x.t2throttle = t2throttle;
c9x.moduleData[0].ppmFrameLength=ppmFrameLength;
c9x.moduleData[0].channelsCount = 8 + 2 * ppmNCH;
c9x.thrTrim = thrTrim;
@@ -732,7 +727,7 @@ t_Ersky9xModelData_v11::operator ModelData ()
// }
for (int i=0; i<5;i++) {
c9x.phaseData[0].gvars[i]=gvars[i].gvar;
c9x.gvsource[i]=gvars[i].gvsource;
// c9x.gvsource[i]=gvars[i].gvsource;
}
return c9x;
}
@@ -108,7 +108,6 @@ Gruvin9xGeneral_v103::operator GeneralSettings ()
result.flashBeep = flashBeep;
result.splashMode = disableSplashScreen;
result.enableTelemetryAlarm = enableTelemetryAlarm;
result.filterInput = filterInput;
result.templateSetup = templateSetup;
result.PPM_Multiplier = PPM_Multiplier;
// TODO frskyRssiAlarms[2];
@@ -153,7 +152,6 @@ Gruvin9xGeneral_v104::operator GeneralSettings ()
result.flashBeep = flashBeep;
result.splashMode = disableSplashScreen;
result.enableTelemetryAlarm = enableTelemetryAlarm;
result.filterInput = filterInput;
result.templateSetup = templateSetup;
result.PPM_Multiplier = PPM_Multiplier;
// TODO frskyRssiAlarms[2];
+25 -18
View File
@@ -260,15 +260,17 @@ class SourcesConversionTable: public ConversionTable {
for (int i=0; i<TELEMETRY_SOURCE_ACC; i++) {
if (version < 216) {
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPD || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPD || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
continue;
}
if (!IS_ARM(board)) {
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR|| i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_A3_MIN || i==TELEMETRY_SOURCE_A4_MIN)
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_A3_MIN || i==TELEMETRY_SOURCE_A4_MIN)
continue;
}
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, i), val++);
if (version >= 216 && IS_ARM(board)) {
if (i==TELEMETRY_SOURCE_RSSI_RX)
val += 1;
if (i==TELEMETRY_SOURCE_TX_TIME)
val += 5;
if (i==TELEMETRY_SOURCE_DTE)
@@ -414,7 +416,7 @@ class TelemetrySourcesConversionTable: public ConversionTable {
addConversion(1+TELEMETRY_SOURCE_RSSI_TX, val++);
addConversion(1+TELEMETRY_SOURCE_RSSI_RX, val++);
if (IS_ARM(board) && version >= 216)
addConversion(1+TELEMETRY_SOURCE_RX_BATT, val++);
addConversion(1+TELEMETRY_SOURCE_RESERVE, val++);
addConversion(1+TELEMETRY_SOURCE_A1, val++);
addConversion(1+TELEMETRY_SOURCE_A2, val++);
if (IS_ARM(board) && version >= 216) {
@@ -1247,13 +1249,20 @@ class CurvesField: public TransformedField {
for (int i=0; i<maxCurves; i++) {
CurveData *curve = &curves[i];
int size = (curve->type == CurveData::CURVE_TYPE_CUSTOM ? curve->count * 2 - 2 : curve->count);
if (offset+size > maxPoints) {
EEPROMWarnings += ::QObject::tr("OpenTX only accepts %1 points in all curves").arg(maxPoints) + "\n";
break;
if (IS_TARANIS(board) && version >= 216) {
offset += (curve->type == CurveData::CURVE_TYPE_CUSTOM ? curve->count * 2 - 2 : curve->count);
if (offset > maxPoints) {
EEPROMWarnings += ::QObject::tr("OpenTX only accepts %1 points in all curves").arg(maxPoints) + "\n";
break;
}
}
if (!IS_TARANIS(board) || version < 216) {
_curves[i] = offset - (5*i);
else {
offset += (curve->type == CurveData::CURVE_TYPE_CUSTOM ? curve->count * 2 - 2 : curve->count) - 5;
if (offset > maxPoints - 5 * maxCurves) {
EEPROMWarnings += ::QObject::tr("OpenTx only accepts %1 points in all curves").arg(maxPoints) + "\n";
break;
}
_curves[i] = offset;
}
for (int j=0; j<curve->count; j++) {
*cur++ = curve->points[j].y;
@@ -1263,7 +1272,6 @@ class CurvesField: public TransformedField {
*cur++ = curve->points[j].x;
}
}
offset += size;
}
}
@@ -1783,7 +1791,7 @@ class ArmCustomFunctionField: public TransformedField {
{
_mode = 0;
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue)
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic)
_active = (version >= 216 ? fn.repeatParam : (fn.repeatParam/5));
else
_active = (fn.enabled ? 1 : 0);
@@ -1855,7 +1863,7 @@ class ArmCustomFunctionField: public TransformedField {
virtual void afterImport()
{
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue)
if (fn.func == FuncPlaySound || fn.func == FuncPlayPrompt || fn.func == FuncPlayValue || fn.func == FuncPlayHaptic)
fn.repeatParam = (version >= 216 ? _active : (_active*5));
else
fn.enabled = (_active & 0x01);
@@ -2202,8 +2210,6 @@ class TelemetryVoltsSourceConversionTable: public ConversionTable
TelemetryVoltsSourceConversionTable(BoardEnum board, unsigned int version)
{
int val = 0;
if (IS_ARM(board) && version >= 216)
addConversion(TELEMETRY_VOLTS_SOURCE_RXBATT, val++);
addConversion(TELEMETRY_VOLTS_SOURCE_A1, val++);
addConversion(TELEMETRY_VOLTS_SOURCE_A2, val++);
if (IS_ARM(board) && version >= 216) {
@@ -2569,8 +2575,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
}
if (IS_ARM(board) && version >= 216) {
internalField.Append(new UnsignedField<8>(modelData.frsky.rxBattAlarms[0]));
internalField.Append(new UnsignedField<8>(modelData.frsky.rxBattAlarms[1]));
internalField.Append(new SpareBitsField<16>());
}
}
@@ -2704,7 +2709,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
internalField.Append(new SignedField<2>((int &)generalData.hapticMode));
if (IS_ARM(board))
internalField.Append(new UnsignedField<8>(generalData.switchesDelay));
internalField.Append(new SignedField<8>(generalData.switchesDelay));
else
internalField.Append(new SpareBitsField<8>());
@@ -2740,6 +2745,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
}
if (IS_ARM(board)) {
internalField.Append(new UnsignedField<8>(generalData.backlightBright));
internalField.Append(new SignedField<8>(generalData.currentCalib));
if (version >= 213) {
internalField.Append(new SignedField<8>(generalData.temperatureWarn)); // TODO
@@ -2809,7 +2815,8 @@ void OpenTxGeneralData::beforeExport()
void OpenTxGeneralData::afterImport()
{
for (int i=0; i<4; i++) {
if (i<2 && generalData.potsType[i] == 0)
generalData.potsType[i] = potsType[i];
if (i<2 && potsType[i] == 0)
generalData.potsType[i] = 1;
}
}
@@ -154,7 +154,7 @@ bool OpenTxEepromInterface::loadModelVariant(unsigned int index, ModelData &mode
int numbytes = efile->readRlc2((uint8_t *)eepromData.data(), eepromData.size());
if (numbytes) {
open9xModel.Import(eepromData);
// open9xModel.Dump();
open9xModel.Dump();
model.used = true;
}
else {
@@ -504,7 +504,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
return 1;
case GvarsAreNamed:
case GvarsFlightModes:
return ((IS_ARM(board)||(board==BOARD_GRUVIN9X)) ? 1 : 0);
return ((IS_ARM(board) || board==BOARD_GRUVIN9X) ? 1 : 0);
case Mixes:
return (IS_ARM(board) ? O9X_ARM_MAX_MIXERS : O9X_MAX_MIXERS);
case OffsetWeight:
@@ -659,6 +659,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
case LuaInputs:
case LimitsPer1000:
case EnhancedCurves:
return IS_TARANIS(board);
case HasFasOffset:
return (IS_STOCK(board) ? false : true);
case HasMahPersistent:
@@ -85,7 +85,6 @@ Th9xGeneral::operator GeneralSettings ()
}
result.stickMode = stickMode;
result.inactivityTimer = inactivityMin;
result.filterInput = adcFilt;
return result;
}
+11 -1
View File
@@ -69,7 +69,17 @@ FlashInterface::FlashInterface(QString fileName):
version = seekLabel(VERS_MARK);
date = seekLabel(DATE_MARK);
time = seekLabel(TIME_MARK);
eeprom = seekLabel(EEPR_MARK);
eepromId = seekLabel(EEPR_MARK);
if (eepromId.contains('-')) {
QStringList list = eepromId.split('-');
eepromVersion = list[0].toInt();
eepromVariant = list[1].toInt();
}
else {
eepromVersion = eepromId.toInt();
}
versionId = version2index(version);
SeekSplash();
isValidFlag = true;
+6 -2
View File
@@ -49,7 +49,9 @@ class FlashInterface
int getSize() { return flash_size; }
inline QString getVersion() { return version; }
unsigned int getVersionId() { return versionId; }
inline QString getEEprom() { return eeprom; }
inline int getEEpromVersion() { return eepromVersion; }
inline int getEEpromVariant() { return eepromVariant; }
inline QString getEEpromId() { return eepromId; }
QImage getSplash();
bool setSplash(const QImage & newsplash);
bool hasSplash();
@@ -72,7 +74,9 @@ class FlashInterface
QString time;
QString version;
int versionId;
QString eeprom;
QString eepromId;
int eepromVersion;
int eepromVariant;
QByteArray splash;
uint splash_offset;
uint splash_size;
+58 -9
View File
@@ -88,7 +88,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
if (!GetCurrentFirmware()->getCapability(MultiLangVoice)) {
ui->VoiceLang_label->hide();
ui->voiceLang_CB->hide();
} else {
}
else {
voiceLangEditLock=true;
populateVoiceLangCB(ui->voiceLang_CB, g_eeGeneral.ttsLanguage);
voiceLangEditLock=false;
@@ -97,7 +98,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
if (!mavlink) {
ui->mavbaud_CB->hide();
ui->mavbaud_label->hide();
} else {
}
else {
mavbaudEditLock=true;
ui->mavbaud_CB->setCurrentIndex(g_eeGeneral.mavbaud);
populateVoiceLangCB(ui->voiceLang_CB, g_eeGeneral.ttsLanguage);
@@ -170,7 +172,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
ui->volume_SB->hide();
ui->volume_SB->setDisabled(true);
ui->label_volume->hide();
} else {
}
else {
ui->volume_SB->setMaximum(GetCurrentFirmware()->getCapability(MaxVolume));
}
if (!GetCurrentFirmware()->getCapability(HasBrightness)) {
@@ -307,13 +310,15 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
}
if (IS_ARM(eepromInterface->getBoard())) {
ui->switchesDelay->setValue(10*g_eeGeneral.switchesDelay);
ui->switchesDelay->setValue(10*(g_eeGeneral.switchesDelay+15));
}
else {
ui->switchesDelay->hide();
ui->switchesDelayLabel->hide();
}
disableMouseScrolling();
ga.sendPageView(getBoardName(GetCurrentFirmware()->getBoard()) + " GeneralEdit");
}
@@ -527,7 +532,7 @@ void GeneralEdit::on_backlightautoSB_editingFinished()
void GeneralEdit::on_switchesDelay_valueChanged()
{
g_eeGeneral.switchesDelay = ui->switchesDelay->value() / 10;
g_eeGeneral.switchesDelay = (ui->switchesDelay->value() / 10) - 15;
updateSettings();
}
@@ -1076,7 +1081,8 @@ void GeneralEdit::on_calstore_PB_clicked()
if (name.isEmpty()) {
ui->calstore_PB->setDisabled(true);
return;
} else {
}
else {
QString calib=g.profile[profile_id].stickPotCalib();
if (!(calib.isEmpty())) {
int ret = QMessageBox::question(this, "Companion",
@@ -1115,7 +1121,50 @@ void GeneralEdit::on_calstore_PB_clicked()
}
}
void GeneralEdit::shrink() {
resize(100,100);
resize(0,0);
void GeneralEdit::shrink()
{
resize(100, 100);
resize(0, 0);
}
bool GeneralEdit::eventFilter(QObject *object, QEvent * event)
{
QWidget * widget = qobject_cast<QWidget*>(object);
if (widget) {
if (event->type() == QEvent::Wheel) {
if (widget->focusPolicy() == Qt::WheelFocus) {
event->accept();
return false;
}
else {
event->ignore();
return true;
}
}
else if (event->type() == QEvent::FocusIn) {
widget->setFocusPolicy(Qt::WheelFocus);
}
else if (event->type() == QEvent::FocusOut) {
widget->setFocusPolicy(Qt::StrongFocus);
}
}
return QWidget::eventFilter(object, event);
}
void GeneralEdit::disableMouseScrolling()
{
Q_FOREACH(QComboBox * cb, findChildren<QComboBox*>()) {
cb->installEventFilter(this);
cb->setFocusPolicy(Qt::StrongFocus);
}
Q_FOREACH(QAbstractSpinBox * sb, findChildren<QAbstractSpinBox*>()) {
sb->installEventFilter(this);
sb->setFocusPolicy(Qt::StrongFocus);
}
Q_FOREACH(QSlider * slider, findChildren<QSlider*>()) {
slider->installEventFilter(this);
slider->setFocusPolicy(Qt::StrongFocus);
}
}
+6 -2
View File
@@ -12,12 +12,12 @@ class GeneralEdit : public QDialog
{
Q_OBJECT
public:
public:
explicit GeneralEdit(RadioData &radioData, QWidget *parent = 0);
~GeneralEdit();
void updateSettings();
private:
private:
Ui::GeneralEdit *ui;
RadioData &radioData;
GeneralSettings g_eeGeneral;
@@ -28,6 +28,10 @@ private:
void getGeneralSwitchDefPos(int i, bool val);
void setSwitchDefPos();
void updateVarioPitchRange();
void disableMouseScrolling();
protected:
virtual bool eventFilter(QObject *obj, QEvent *event);
signals:
void modelValuesChanged();
+2 -2
View File
@@ -1977,7 +1977,7 @@ Mode 4:
</sizepolicy>
</property>
<property name="text">
<string>Switches Delay (mid position)</string>
<string>Play Delay (switch mid position)</string>
</property>
</widget>
</item>
@@ -2004,7 +2004,7 @@ p, li { white-space: pre-wrap; }
<number>0</number>
</property>
<property name="maximum">
<number>250</number>
<number>300</number>
</property>
<property name="singleStep">
<number>10</number>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 2.4 KiB

+11 -17
View File
@@ -152,7 +152,8 @@ MainWindow::MainWindow():
if (!(printing && (model >=0 && model<GetEepromInterface()->getMaxModels()) && !printfilename.isEmpty() )) {
statusBar()->showMessage(tr("File loaded"), 2000);
child->show();
} else {
}
else {
child->show();
child->print(model,printfilename);
child->close();
@@ -990,7 +991,6 @@ bool MainWindow::readFirmwareFromRadio(const QString filename)
ad->setWindowIcon(CompanionIcon("read_flash.png"));
ad->exec();
delete ad;
sleep(1);
result = true;
}
}
@@ -1025,7 +1025,6 @@ bool MainWindow::writeFirmwareToRadio(const QString filename)
ad->setWindowIcon(CompanionIcon("write_flash.png"));
ad->exec();
delete ad;
sleep(1);
result = true;
}
}
@@ -1068,7 +1067,6 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
ad->exec();
delete ad;
sleep(1);
result = true;
}
}
@@ -1079,7 +1077,6 @@ bool MainWindow::readEepromFromRadio(const QString filename, const QString messa
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
ad->exec();
delete ad;
sleep(1);
result = true;
}
@@ -1113,22 +1110,20 @@ bool MainWindow::writeEepromToRadio(const QString filename, const QString messag
if (!path.isEmpty()) {
QStringList str;
str << filename << path;
avrOutputDialog *ad = new avrOutputDialog(this, "", str, message);
ad->setWindowIcon(CompanionIcon("read_eeprom.png"));
avrOutputDialog *ad = new avrOutputDialog(this, "", str, message, AVR_DIALOG_SHOW_DONE);
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
ad->exec();
delete ad;
sleep(1);
result = true;
}
}
if (result == false && !IS_TARANIS(GetCurrentFirmware()->getBoard())) {
QStringList str = GetSendEEpromCommand(filename);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write Backup To Radio", AVR_DIALOG_SHOW_DONE);
avrOutputDialog *ad = new avrOutputDialog(this, GetAvrdudeLocation(), str, "Write EEPROM To Radio", AVR_DIALOG_SHOW_DONE);
ad->setWindowIcon(CompanionIcon("write_eeprom.png"));
ad->exec();
delete ad;
sleep(1);
result = true;
}
@@ -1270,11 +1265,8 @@ bool MainWindow::convertEEPROM(QString backupFile, QString restoreFile, QString
if (!flash.isValid())
return false;
unsigned int version = 0;
unsigned int variant = 0;
QString fwEEprom = flash.getEEprom();
version = fwEEprom.toInt();
unsigned int version = flash.getEEpromVersion();
unsigned int variant = flash.getEEpromVariant();
QFile file(backupFile);
int eeprom_size = file.size();
@@ -1336,7 +1328,7 @@ void MainWindow::writeFlash(QString fileToFlash)
if (backupEnable) {
QDateTime datetime;
backupFile.clear();
backupFile=backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin";
backupFile = backupPath+"/backup-"+QDateTime().currentDateTime().toString("yyyy-MM-dd-hhmmss")+".bin";
}
if (readEepromFromRadio(backupFile, tr("Backup Models and Settings From Radio"))) {
@@ -1428,6 +1420,7 @@ void MainWindow::compare()
void MainWindow::logFile()
{
logsDialog *fd = new logsDialog(this);
fd->setWindowFlags(Qt::Window); //to show minimize an maximize buttons
fd->setAttribute(Qt::WA_DeleteOnClose, true);
fd->show();
}
@@ -1480,8 +1473,9 @@ MdiChild *MainWindow::createMdiChild()
{
MdiChild * child = new MdiChild();
mdiArea->addSubWindow(child);
if(!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized())
if (!child->parentWidget()->isMaximized() && !child->parentWidget()->isMinimized()) {
child->parentWidget()->resize(400, 400);
}
connect(child, SIGNAL(copyAvailable(bool)),cutAct, SLOT(setEnabled(bool)));
connect(child, SIGNAL(copyAvailable(bool)),copyAct, SLOT(setEnabled(bool)));
+2 -2
View File
@@ -71,13 +71,13 @@ MdiChild::MdiChild():
fileChanged(false)
{
ui->setupUi(this);
this->setWindowIcon(CompanionIcon("open.png"));
setWindowIcon(CompanionIcon("open.png"));
ui->SimulateTxButton->setIcon(CompanionIcon("simulate.png"));
setAttribute(Qt::WA_DeleteOnClose);
eepromInterfaceChanged();
if(!(this->isMaximized() || this->isMinimized())) {
if (!(this->isMaximized() || this->isMinimized())) {
adjustSize();
}
+2
View File
@@ -136,6 +136,8 @@ Channels::Channels(QWidget * parent, ModelData & model, GeneralSettings & genera
}
// Push the rows up
addVSpring(gridLayout, 0,firmware->getCapability(Outputs)+1);
disableMouseScrolling();
}
Channels::~Channels()
+6 -3
View File
@@ -180,6 +180,8 @@ Curves::Curves(QWidget * parent, ModelData & model, GeneralSettings & generalSet
addTemplate(tr("Symmetrical f(x)=-f(-x)"), CURVE_COEFF_ENABLE, curveSymmetricalY);
addTemplate(tr("Symmetrical f(x)=f(-x)"), CURVE_COEFF_ENABLE | CURVE_YMID_ENABLE, curveSymmetricalX);
disableMouseScrolling();
lock = false;
}
@@ -246,12 +248,13 @@ void Curves::updateCurveType()
index = model.curves[currentCurve].count - 2;
}
else {
ui->curveSmooth->hide();
if (model.curves[currentCurve].count == 5)
index += 2;
index = 1;
else if (model.curves[currentCurve].count == 9)
index += 4;
index = 2;
else if (model.curves[currentCurve].count == 17)
index += 6;
index = 3;
}
ui->curvePoints->setCurrentIndex(index);
+2 -2
View File
@@ -87,7 +87,7 @@ CustomFunctionsPanel::CustomFunctionsPanel(QWidget * parent, ModelData & model,
lang="en";
path.append(lang);
QDir qd(path);
int vml= firmware->getCapability(VoicesMaxLength)+4;
int vml= firmware->getCapability(VoicesMaxLength);
if (qd.exists()) {
QStringList filters;
filters << "*.wav" << "*.WAV";
@@ -573,10 +573,10 @@ void CustomFunctionsPanel::fsw_customContextMenuRequested(QPoint pos)
bool hasData = mimeData->hasFormat("application/x-companion-fsw");
QMenu contextMenu;
contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(fswDelete()),tr("Delete"));
contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(fswCopy()),tr("Ctrl+C"));
contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(fswCut()),tr("Ctrl+X"));
contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(fswPaste()),tr("Ctrl+V"))->setEnabled(hasData);
contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(fswDelete()),tr("Delete"));
contextMenu.exec(globalPos);
}
+9 -14
View File
@@ -121,7 +121,7 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
}
// GVars
if (gvCount > 0) {
if (gvCount > 0 && (firmware->getCapability(GvarsFlightModes) || phaseIdx == 0) ) {
QGridLayout *gvLayout = new QGridLayout(ui->gvGB);
for (int i=0; i<gvCount; i++) {
int col = 0;
@@ -171,6 +171,8 @@ FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseI
ui->gvGB->hide();
}
disableMouseScrolling();
update();
}
@@ -200,13 +202,14 @@ void FlightModePanel::update()
trimUpdate(i);
}
for (int i=0; i<gvCount; i++) {
gvNames[i]->setText(model.gvars_names[i]);
gvValues[i]->setDisabled(model.isGVarLinked(phaseIdx, i));
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
if (ui->gvGB->isVisible()) {
for (int i=0; i<gvCount; i++) {
gvNames[i]->setText(model.gvars_names[i]);
gvValues[i]->setDisabled(model.isGVarLinked(phaseIdx, i));
gvValues[i]->setValue(model.getGVarValue(phaseIdx, i));
if (phaseIdx == 0)
if (IS_TARANIS(GetEepromInterface()->getBoard()) && phaseIdx == 0) {
gvPopups[i]->setChecked(model.gvars_popups[i]);
}
}
}
@@ -296,14 +299,6 @@ void FlightModePanel::GVName_editingFinished()
}
}
void FlightModePanel::GVSource_currentIndexChanged(int index)
{
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
int gvar = comboBox->property("index").toInt();
model.gvsource[gvar] = index;
emit modified();
}
void FlightModePanel::phaseGVUse_currentIndexChanged(int index)
{
if (!lock) {
-1
View File
@@ -35,7 +35,6 @@ class FlightModePanel : public ModelPanel
void phaseTrim_valueChanged();
void phaseTrimSlider_valueChanged();
void GVName_editingFinished();
void GVSource_currentIndexChanged(int index);
void phaseGVValue_editingFinished();
void phaseGVUse_currentIndexChanged(int index);
void phaseGVPopupToggled(bool checked);
+2
View File
@@ -14,6 +14,8 @@ HeliPanel::HeliPanel(QWidget *parent, ModelData & model, GeneralSettings & gener
connect(ui->swashInvertELE, SIGNAL(stateChanged(int)), this, SLOT(edited()));
connect(ui->swashInvertAIL, SIGNAL(stateChanged(int)), this, SLOT(edited()));
connect(ui->swashInvertCOL, SIGNAL(stateChanged(int)), this, SLOT(edited()));
disableMouseScrolling();
}
HeliPanel::~HeliPanel()
+4 -1
View File
@@ -116,6 +116,9 @@ LogicalSwitchesPanel::LogicalSwitchesPanel(QWidget * parent, ModelData & model,
}
// Push rows upward
addVSpring(gridLayout,0,firmware->getCapability(LogicalSwitches)+1);
disableMouseScrolling();
lock = false;
}
@@ -437,10 +440,10 @@ void LogicalSwitchesPanel::csw_customContextMenuRequested(QPoint pos)
bool hasData = mimeData->hasFormat("application/x-companion-csw");
QMenu contextMenu;
contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(cswDelete()),tr("Delete"));
contextMenu.addAction(CompanionIcon("copy.png"), tr("&Copy"),this,SLOT(cswCopy()),tr("Ctrl+C"));
contextMenu.addAction(CompanionIcon("cut.png"), tr("&Cut"),this,SLOT(cswCut()),tr("Ctrl+X"));
contextMenu.addAction(CompanionIcon("paste.png"), tr("&Paste"),this,SLOT(cswPaste()),tr("Ctrl+V"))->setEnabled(hasData);
contextMenu.addAction(CompanionIcon("clear.png"), tr("&Delete"),this,SLOT(cswDelete()),tr("Delete"));
contextMenu.exec(globalPos);
}
+2 -3
View File
@@ -191,9 +191,8 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
str += " " + Qt::escape(tr("Switch(%1)").arg(md->swtch.toString()));
}
if (md->carryTrim) {
str += " " + Qt::escape(tr("NoTrim"));
}
if (md->carryTrim>0) str += " " + Qt::escape(tr("NoTrim"));
else if (md->carryTrim<0) str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
if (firmware->getCapability(HasNoExpo) && md->noExpo) str += " " + Qt::escape(tr("No DR/Expo"));
if (md->sOffset) str += " " + Qt::escape(tr("Offset(%1)").arg(getGVarString(md->sOffset)));
+5
View File
@@ -94,4 +94,9 @@ void ModelPanel::disableMouseScrolling()
sb->installEventFilter(this);
sb->setFocusPolicy(Qt::StrongFocus);
}
Q_FOREACH(QSlider * slider, findChildren<QSlider*>()) {
slider->installEventFilter(this);
slider->setFocusPolicy(Qt::StrongFocus);
}
}
+7
View File
@@ -28,6 +28,8 @@ TimerPanel::TimerPanel(QWidget *parent, ModelData & model, TimerData & timer, Ge
if (IS_ARM(GetEepromInterface()->getBoard()) || IS_2560(GetEepromInterface()->getBoard()))
ui->countdownBeep->addItem(tr("Voice"), 2);
disableMouseScrolling();
lock = false;
}
@@ -157,6 +159,8 @@ ModulePanel::ModulePanel(QWidget *parent, ModelData & model, ModuleData & module
}
}
disableMouseScrolling();
lock = false;
}
@@ -478,6 +482,9 @@ SetupPanel::SetupPanel(QWidget *parent, ModelData & model, GeneralSettings & gen
ui->label_potWarning->hide();
ui->potWarningMode->hide();
}
disableMouseScrolling();
lock = false;
}
+6 -29
View File
@@ -50,6 +50,8 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog, Mod
else {
ui->label_Max->setText(tr("Range"));
}
disableMouseScrolling();
}
void TelemetryAnalog::update()
@@ -324,6 +326,8 @@ TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model,
ui->screenBarsLayout->addWidget(maxSB[l], l, 3, 1, 1);
}
disableMouseScrolling();
update();
}
@@ -516,6 +520,8 @@ TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model, GeneralSettin
ui->bladesCount->setMaximum(128);
}
disableMouseScrolling();
setup();
}
@@ -530,20 +536,6 @@ void TelemetryPanel::setup()
lock = true;
if (IS_ARM(firmware->getBoard())) {
ui->rxbattAlarm1DSB->setValue((13.2*model.frsky.rxBattAlarms[0])/255);
ui->rxbattAlarm2DSB->setValue((13.2*model.frsky.rxBattAlarms[1])/255);
}
else {
ui->rxbattLabel->hide();
ui->rxbattAlarm1Label->hide();
ui->rxbattAlarm2Label->hide();
ui->rxbattAlarm1CB->hide();
ui->rxbattAlarm2CB->hide();
ui->rxbattAlarm1DSB->hide();
ui->rxbattAlarm2DSB->hide();
}
ui->rssiAlarm1SB->setValue(model.frsky.rssiAlarms[0].value);
ui->rssiAlarm2SB->setValue(model.frsky.rssiAlarms[1].value);
if (!IS_TARANIS(GetEepromInterface()->getBoard())) {
@@ -692,9 +684,6 @@ void TelemetryPanel::populateVoltsSource()
{
QUnsignedAutoComboBox * cb = ui->frskyVoltCB;
cb->setField(&model.frsky.voltsSource, this);
if (IS_ARM(firmware->getBoard())) {
cb->addItem(tr("RxBatt"), TELEMETRY_VOLTS_SOURCE_RXBATT);
}
cb->addItem(tr("A1"), TELEMETRY_VOLTS_SOURCE_A1);
cb->addItem(tr("A2"), TELEMETRY_VOLTS_SOURCE_A2);
if (IS_ARM(firmware->getBoard())) {
@@ -790,18 +779,6 @@ void TelemetryPanel::on_varioLimitMin_DSB_editingFinished()
emit modified();
}
void TelemetryPanel::on_rxbattAlarm1DSB_editingFinished()
{
model.frsky.rxBattAlarms[0] = round(ui->rxbattAlarm1DSB->value()/(13.2/255));
emit modified();
}
void TelemetryPanel::on_rxbattAlarm2DSB_editingFinished()
{
model.frsky.rxBattAlarms[1] = round(ui->rxbattAlarm2DSB->value()/(13.2/255));
emit modified();
}
void TelemetryPanel::on_varioLimitMax_DSB_editingFinished()
{
model.frsky.varioMax = round(ui->varioLimitMax_DSB->value()-10);
-2
View File
@@ -93,8 +93,6 @@ class TelemetryPanel : public ModelPanel
void on_rssiAlarm2CB_currentIndexChanged(int index);
void on_rssiAlarm1SB_editingFinished();
void on_rssiAlarm2SB_editingFinished();
void on_rxbattAlarm1DSB_editingFinished();
void on_rxbattAlarm2DSB_editingFinished();
void on_AltitudeGPS_ChkB_toggled(bool checked);
void on_varioLimitMin_DSB_editingFinished();
void on_varioLimitMax_DSB_editingFinished();
+210 -350
View File
@@ -437,356 +437,6 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="RSSIGB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="flat">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="5" column="0">
<widget class="QLabel" name="rxbattAlarm2Label">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Alarm 2</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="rxbattAlarm1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Alarm 1</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="rxbattLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>RxBatt</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="rxbattAlarm2CB">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Critical Alarm</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="rssiAlarm1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Alarm 1</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="rssiAlarm1CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>----</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="rssiAlarm1SB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>20</number>
</property>
<property name="maximum">
<number>80</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="rssiAlarm2Label">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Alarm 2</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="rssiAlarm2CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>----</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="rssiAlarm2SB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>20</number>
</property>
<property name="maximum">
<number>80</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="rssiLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>RSSI</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QComboBox" name="rxbattAlarm1CB">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Low Alarm</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="2">
<widget class="QDoubleSpinBox" name="rxbattAlarm2DSB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>13.199999999999999</double>
</property>
<property name="singleStep">
<double>0.050000000000000</double>
</property>
<property name="value">
<double>4.300000000000000</double>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QDoubleSpinBox" name="rxbattAlarm1DSB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="decimals">
<number>2</number>
</property>
<property name="minimum">
<double>0.000000000000000</double>
</property>
<property name="maximum">
<double>13.199999999999999</double>
</property>
<property name="singleStep">
<double>0.051764000000000</double>
</property>
<property name="value">
<double>4.300000000000000</double>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QGroupBox" name="altimetryGB">
<property name="sizePolicy">
@@ -1213,6 +863,216 @@
</layout>
</widget>
</item>
<item row="3" column="0">
<widget class="QGroupBox" name="RSSIGB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="flat">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_7">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>3</number>
</property>
<property name="bottomMargin">
<number>3</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="rssiAlarm1Label">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Alarm 1</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="rssiAlarm1CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>----</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
</widget>
</item>
<item row="1" column="2">
<widget class="QSpinBox" name="rssiAlarm1SB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>20</number>
</property>
<property name="maximum">
<number>80</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="rssiAlarm2Label">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Alarm 2</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="rssiAlarm2CB">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>----</string>
</property>
</item>
<item>
<property name="text">
<string>Yellow</string>
</property>
</item>
<item>
<property name="text">
<string>Orange</string>
</property>
</item>
<item>
<property name="text">
<string>Red</string>
</property>
</item>
</widget>
</item>
<item row="2" column="2">
<widget class="QSpinBox" name="rssiAlarm2SB">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="suffix">
<string/>
</property>
<property name="minimum">
<number>20</number>
</property>
<property name="maximum">
<number>80</number>
</property>
<property name="singleStep">
<number>1</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="rssiLabel">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>RSSI</string>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
+2 -3
View File
@@ -347,9 +347,8 @@ void PrintDialog::printMixes()
str += " " + Qt::escape(tr("Switch(%1)").arg(md->swtch.toString()));
}
if (md->carryTrim) {
str += " " + Qt::escape(tr("NoTrim"));
}
if (md->carryTrim>0) str += " " + Qt::escape(tr("NoTrim"));
else if (md->carryTrim<0) str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
if (firmware->getCapability(HasNoExpo) && md->noExpo) str += " " + Qt::escape(tr("No DR/Expo"));
if (md->sOffset) str += " " + Qt::escape(tr("Offset(%1)").arg(getGVarString(md->sOffset)));
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-2
View File
@@ -105,8 +105,6 @@ void saveGeneralSettings(GeneralSettings & settings, global_settings & gs)
}
/* TODO if (settings.disableSplashScreen)
gs.splash_screen(false); */
if (settings.filterInput)
gs.filter_input(filter_input::value(settings.filterInput));
/* TODO if (settings.backlightDelay)
gs.light_auto_off_timer(settings.lightAutoOff); */
gs.default_channel_order(settings.templateSetup);
@@ -95,6 +95,10 @@ Section "OpenTX companion" SecDummy
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\avrdude.conf"
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb0.dll"
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe"
CreateDirectory "$INSTDIR\phonon_backend"
SetOutPath "$INSTDIR\phonon_backend"
File "@QT_BINARY_DIR@\..\plugins\phonon_backend\Phonon_ds94.dll"
CreateDirectory "$INSTDIR\lang"
SetOutPath "$INSTDIR\lang"
@@ -123,6 +123,10 @@ Section "OpenTX Companion" SecDummy
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\dfu-util.exe"
File "@CMAKE_CURRENT_SOURCE_DIR@\..\targets\windows\libusb-1.0.dll"
CreateDirectory "$INSTDIR\phonon_backend"
SetOutPath "$INSTDIR\phonon_backend"
File "@QT_BINARY_DIR@\..\plugins\phonon_backend\Phonon_ds94.dll"
CreateDirectory "$INSTDIR\lang"
SetOutPath "$INSTDIR\lang"
File "*.qm"
+1 -1
View File
@@ -279,7 +279,7 @@ SHELL = sh
IMG2LBM = -python ../util/img2lbm.py
BIN2LBM = -python ../util/bin2lbm.py
TRANSLATE = -python ../util/translate.py
VERSION = 2.0.1
VERSION = 2.0.2
SRC =
CPPSRC =
+2 -6
View File
@@ -201,8 +201,6 @@ const char * audioFilenames[] = {
"rssi_org",
"rssi_red",
"swr_red",
"rx_org",
"rx_red",
"telemko",
"telemok"
};
@@ -329,8 +327,8 @@ void getLogicalSwitchAudioFile(char * filename, int index, unsigned int event)
char * str = getModelPath(filename);
int len = STR_VSWITCHES[0];
strncpy(str, &STR_VSWITCHES[1+len*(index+SWSRC_FIRST_LOGICAL_SWITCH)], len);
str += len;
strcpy(str, suffixes[event]);
str[len] = '\0';
strcat(str, suffixes[event]);
strcat(str, SOUNDS_EXT);
}
@@ -1057,14 +1055,12 @@ void audioEvent(uint8_t e, uint16_t f)
case AU_TIMER_30:
audioQueue.playTone(BEEP_DEFAULT_FREQ+150, 120, 20, PLAY_REPEAT(2)|PLAY_NOW);
break;
case AU_RXBATT_ORANGE:
case AU_A1_ORANGE:
case AU_A2_ORANGE:
case AU_A3_ORANGE:
case AU_A4_ORANGE:
audioQueue.playTone(BEEP_DEFAULT_FREQ+600, 200, 20, PLAY_NOW);
break;
case AU_RXBATT_RED:
case AU_A1_RED:
case AU_A2_RED:
case AU_A3_RED:
+6 -2
View File
@@ -62,9 +62,10 @@
#include "../FatFs/ff.h"
#include "../FatFs/diskio.h"
#include "../translations/en.h"
#include "../stamp-opentx.h"
#if defined(PCBTARANIS)
#define BOOTLOADER_TITLE " Taranis BootLoader - v1.0"
#define BOOTLOADER_TITLE " Taranis BootLoader - " VERS_STR
#define BOOT_KEY_UP KEY_PLUS
#define BOOT_KEY_DOWN KEY_MINUS
#define BOOT_KEY_LEFT KEY_MENU
@@ -73,7 +74,7 @@
#define BOOT_KEY_EXIT KEY_EXIT
#define DISPLAY_CHAR_WIDTH 35
#elif defined(PCBSKY9X)
#define BOOTLOADER_TITLE "Sky9x Boot Loader - v1.0"
#define BOOTLOADER_TITLE "Sky9x Boot Loader - " VERS_STR
#endif
const uint8_t bootloaderVersion[] __attribute__ ((section(".version"), used)) =
@@ -499,6 +500,9 @@ int main()
#endif
#if defined(PCBTARANIS)
#if defined(REVPLUS)
turnBacklightOn(0, 0);
#endif
keysInit();
I2C_EE_Init();
init_hw_timer();
+2 -5
View File
@@ -338,8 +338,8 @@ int ConvertTelemetrySource_215_to_216(int source)
// TELEM_RSSI_TX added
if (source >= TELEM_RSSI_TX)
source += 1;
// RxBatt added
if (source >= TELEM_RXBATT)
// Reserve added
if (source >= TELEM_RESERVE0)
source += 1;
// A3 and A4 added
if (source >= TELEM_A3)
@@ -838,9 +838,6 @@ void ConvertModel_215_to_216(ModelData &model)
memcpy(&g_model.frsky, &oldModel.frsky, 2*sizeof(FrSkyChannelData));
// gap for A3-A4
memcpy(((uint8_t *)&g_model.frsky) + 4*sizeof(FrSkyChannelData), ((uint8_t *)&oldModel.frsky) + 2*sizeof(FrSkyChannelData), sizeof(oldModel.frsky) - 2*sizeof(FrSkyChannelData));
// RxBatt introduced
if (g_model.frsky.voltsSource >= FRSKY_VOLTS_SOURCE_A1)
g_model.frsky.voltsSource += 1;
// A3 and A4 introduced
if (g_model.frsky.voltsSource >= FRSKY_VOLTS_SOURCE_A3)
g_model.frsky.voltsSource += 2;
+5 -5
View File
@@ -406,7 +406,7 @@ void menuGeneralSetup(uint8_t event)
case ITEM_SETUP_VARIO_REPEAT:
lcd_putsLeft(y, STR_REPEAT_AT_ZERO);
lcd_outdezAtt(RADIO_SETUP_2ND_COLUMN, y, VARIO_REPEAT_ZERO+(g_eeGeneral.varioRepeat*10), attr|LEFT);
lcd_putsAtt(lcdLastPos, y, "ms", attr);
lcd_putsAtt(lcdLastPos, y, STR_MS, attr);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.varioRepeat, -30, 50);
break;
#endif
@@ -624,10 +624,10 @@ void menuGeneralSetup(uint8_t event)
#if defined(CPUARM)
case ITEM_SETUP_SWITCHES_DELAY:
lcd_putsLeft(y, "Switches Delay");
lcd_outdezAtt(RADIO_SETUP_2ND_COLUMN, y, 10*g_eeGeneral.switchesDelay, attr|LEFT);
lcd_putsAtt(lcdLastPos, y, "ms", attr);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.switchesDelay, 0, 25);
lcd_putsLeft(y, STR_SWITCHES_DELAY);
lcd_outdezAtt(RADIO_SETUP_2ND_COLUMN, y, 10*SWITCHES_DELAY(), attr|LEFT);
lcd_putsAtt(lcdLastPos, y, STR_MS, attr);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.switchesDelay, -15, +15);
break;
#endif
+3 -31
View File
@@ -4807,8 +4807,8 @@ void menuModelLogicalSwitches(uint8_t event)
#endif
#if LCD_W >= 212
#define MODEL_CUSTOM_FUNC_1ST_COLUMN (5+3*FW)
#define MODEL_CUSTOM_FUNC_2ND_COLUMN (8*FW)
#define MODEL_CUSTOM_FUNC_1ST_COLUMN (4*FW+2)
#define MODEL_CUSTOM_FUNC_2ND_COLUMN (8*FW+2)
#define MODEL_CUSTOM_FUNC_3RD_COLUMN (20*FW)
#define MODEL_CUSTOM_FUNC_4TH_COLUMN (33*FW-3)
#define MODEL_CUSTOM_FUNC_4TH_COLUMN_ONOFF (34*FW-3)
@@ -5361,11 +5361,6 @@ void menuModelCustomScripts(uint8_t event)
enum menuModelTelemetryItems {
CASE_CPUARM(ITEM_TELEMETRY_PROTOCOL_TYPE)
#if defined(CPUARM)
ITEM_TELEMETRY_RXBATT_LABEL,
ITEM_TELEMETRY_RXBATT_ALARM1,
ITEM_TELEMETRY_RXBATT_ALARM2,
#endif
ITEM_TELEMETRY_A1_LABEL,
ITEM_TELEMETRY_A1_RANGE,
ITEM_TELEMETRY_A1_OFFSET,
@@ -5463,12 +5458,6 @@ enum menuModelTelemetryItems {
#define TELEM_SCRTYPE_COL (10*FW)
#endif
#if defined(CPUARM)
#define RXBATT_ROWS LABEL(RXBATT), 0, 0,
#else
#define RXBATT_ROWS
#endif
#if defined(PCBTARANIS)
#define CHANNEL_ROWS LABEL(CHANNEL), 1, 0, 0, 0
#define RSSI_ROWS LABEL(RSSI), 0, 0
@@ -5497,7 +5486,7 @@ enum menuModelTelemetryItems {
void menuModelTelemetry(uint8_t event)
{
MENU(STR_MENUTELEMETRY, menuTabModel, e_Telemetry, ITEM_TELEMETRY_MAX+1, {0, CASE_CPUARM(0) RXBATT_ROWS CHANNEL_ROWS, CHANNEL_ROWS, CASE_CPUARM(CHANNEL_ROWS) CASE_CPUARM(CHANNEL_ROWS) RSSI_ROWS, USRDATA_LINES 0, 0, IF_FAS_OFFSET(0) CASE_CPUARM(0) CASE_VARIO(LABEL(Vario)) CASE_VARIO(0) CASE_VARIO(VARIO_RANGE_ROWS) CASE_PCBTARANIS(LABEL(TopBar)) CASE_PCBTARANIS(0) SCREEN_TYPE_ROWS, 2, 2, 2, 2, SCREEN_TYPE_ROWS, 2, 2, 2, 2, CASE_CPUARM(SCREEN_TYPE_ROWS) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2)});
MENU(STR_MENUTELEMETRY, menuTabModel, e_Telemetry, ITEM_TELEMETRY_MAX+1, {0, CASE_CPUARM(0) CHANNEL_ROWS, CHANNEL_ROWS, CASE_CPUARM(CHANNEL_ROWS) CASE_CPUARM(CHANNEL_ROWS) RSSI_ROWS, USRDATA_LINES 0, 0, IF_FAS_OFFSET(0) CASE_CPUARM(0) CASE_VARIO(LABEL(Vario)) CASE_VARIO(0) CASE_VARIO(VARIO_RANGE_ROWS) CASE_PCBTARANIS(LABEL(TopBar)) CASE_PCBTARANIS(0) SCREEN_TYPE_ROWS, 2, 2, 2, 2, SCREEN_TYPE_ROWS, 2, 2, 2, 2, CASE_CPUARM(SCREEN_TYPE_ROWS) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2) CASE_CPUARM(2)});
uint8_t sub = m_posVert - 1;
@@ -5540,23 +5529,6 @@ void menuModelTelemetry(uint8_t event)
break;
#endif
#if defined(CPUARM)
case ITEM_TELEMETRY_RXBATT_LABEL:
lcd_putsLeft(y, "RxBatt");
putsTelemetryChannel(TELEM_COL2+6*FW, y, TELEM_RXBATT-1, frskyData.analog[TELEM_ANA_RXBATT].value, LEFT);
break;
case ITEM_TELEMETRY_RXBATT_ALARM1:
case ITEM_TELEMETRY_RXBATT_ALARM2:
{
uint8_t alarm = (k==ITEM_TELEMETRY_RXBATT_ALARM1 ? 0 : 1);
lcd_putsLeft(y, (alarm==0 ? STR_LOWALARM : STR_CRITICALALARM));
putsTelemetryChannel(TELEM_COL2, y, TELEM_RXBATT-1, g_model.rxBattAlarms[alarm], LEFT|attr);
if (attr && (s_editMode>0 || p1valdiff)) {
g_model.rxBattAlarms[alarm] = checkIncDec(event, g_model.rxBattAlarms[alarm], 0, 255, EE_MODEL);
}
break;
}
#endif
case ITEM_TELEMETRY_A1_LABEL:
case ITEM_TELEMETRY_A2_LABEL:
#if defined(CPUARM)
+3
View File
@@ -1451,6 +1451,9 @@ bool isTelemetrySourceAvailable(int source)
return false;
#endif
if (source == TELEM_RESERVE0)
return false;
if (source >= TELEM_RESERVE1 && source <= TELEM_RESERVE5)
return false;
+16 -12
View File
@@ -252,11 +252,7 @@ void displayTopBar()
/* Rx voltage */
lcdint_t voltage = 0;
uint8_t channel = 0;
if (g_model.frsky.voltsSource == FRSKY_VOLTS_SOURCE_RXBATT) {
channel = TELEM_RXBATT-1;
voltage = frskyData.analog[TELEM_ANA_RXBATT].value;
}
else if (g_model.frsky.voltsSource <= FRSKY_VOLTS_SOURCE_A4) {
if (g_model.frsky.voltsSource <= FRSKY_VOLTS_SOURCE_A4) {
channel = TELEM_A1+g_model.frsky.voltsSource-1;
voltage = frskyData.analog[g_model.frsky.voltsSource].value;
}
@@ -368,14 +364,20 @@ void displayTimers()
}
}
#else
void displayTimers()
{
#if defined(TRANSLATIONS_CZ)
#define MAINTMR_LBL_COL (9*FW-FW/2-1)
#else
#define MAINTMR_LBL_COL (9*FW-FW/2+3)
#endif
// Main timer
if (g_model.timers[0].mode) {
TimerState & timerState = timersStates[0];
uint8_t att = DBLSIZE | (timerState.val<0 ? BLINK|INVERS : 0);
putsTimer(12*FW+2+10*FWNUM-4, FH*2, timerState.val, att, att);
putsTimerMode(timerState.val >= 0 ? 9*FW-FW/2+3 : 9*FW-FW/2-4, FH*3, g_model.timers[0].mode);
putsTimerMode(timerState.val >= 0 ? MAINTMR_LBL_COL : MAINTMR_LBL_COL-7, FH*3, g_model.timers[0].mode);
}
}
#endif
@@ -826,24 +828,26 @@ void menuMainView(uint8_t event)
lcd_vline(x-1, VSWITCH_Y-len, len);
lcd_vline(x, VSWITCH_Y-len, len);
}
#elif defined(PCBGRUVIN9X) && ROTARY_ENCODERS > 2
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(4*FW-2) + (i/3>1 ? 3*FW+6 : 0), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#elif defined(PCBGRUVIN9X)
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(4*FW-2) + (i/3>1 ? 3*FW : 0), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
putsSwitches(2*FW-3 + (i/3)*(i/3>2 ? 3*FW+2 : (3*FW-1)) + (i/3>2 ? 2*FW : 0), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#elif !defined(PCBSTD)
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(4*FW-1), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#else
for (uint8_t i=0; i<NUM_LOGICAL_SWITCH; i++)
putsSwitches(2*FW-2 + (i/3)*(5*FW), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
putsSwitches(2*FW-3 + (i/3)*(4*FW), 4*FH+1 + (i%3)*FH, SWSRC_SW1+i, getSwitch(SWSRC_SW1+i) ? INVERS : 0);
#endif
}
}
else { // timer2
#if defined(TRANSLATIONS_CZ)
#define TMR2_LBL_COL (20-FW/2+1)
#else
#define TMR2_LBL_COL (20-FW/2+5)
#endif
putsTimer(33+FW+2+10*FWNUM-4, FH*5, timersStates[1].val, DBLSIZE, DBLSIZE);
putsTimerMode(timersStates[1].val >= 0 ? 20-FW/2+5 : 20-FW/2-2, FH*6, g_model.timers[1].mode);
putsTimerMode(timersStates[1].val >= 0 ? TMR2_LBL_COL : TMR2_LBL_COL-7, FH*6, g_model.timers[1].mode);
// lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s
}
#endif // PCBTARANIS
+4 -5
View File
@@ -347,11 +347,6 @@ void menuTelemetryFrsky(uint8_t event)
lcd_putsiAtt(0, 2*FH, STR_AMPSRC, g_model.frsky.voltsSource+1, 0);
#endif
switch (g_model.frsky.voltsSource) {
#if defined(CPUARM)
case FRSKY_VOLTS_SOURCE_RXBATT:
putsTelemetryChannel(3*FW+6*FW+4, FH+1, TELEM_RXBATT-1, frskyData.analog[TELEM_ANA_RXBATT].value, DBLSIZE);
break;
#endif
case FRSKY_VOLTS_SOURCE_A1:
case FRSKY_VOLTS_SOURCE_A2:
#if defined(CPUARM)
@@ -393,7 +388,11 @@ void menuTelemetryFrsky(uint8_t event)
putsTelemetryChannel(3*FW+4+4*FW+6*FW+FW, 5*FH+1, TELEM_CONSUMPTION-1, frskyData.hub.currentConsumption, DBLSIZE);
}
else {
#if defined(CPUARM)
displayVoltageScreenLine(analog > 0 ? 5*FH : 4*FH, analog==1+FRSKY_VOLTS_SOURCE_A1 ? FRSKY_VOLTS_SOURCE_A2 : FRSKY_VOLTS_SOURCE_A1);
#else
displayVoltageScreenLine(analog > 0 ? 5*FH : 4*FH, analog ? 2-analog : 0);
#endif
if (analog == 0) displayVoltageScreenLine(6*FH, 1);
}
-17
View File
@@ -1219,23 +1219,6 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val,
att &= ~NO_UNIT;
putsTimer(x, y, val, att, att);
break;
#if defined(CPUARM)
case TELEM_RXBATT-1:
val = ((val*1320) + 127) / 255;
#if LCD_W >= 212
att |= PREC2;
#else
if (abs(val) < 1000) {
att |= PREC2;
}
else {
val = div10_and_round(val);
att |= PREC1;
}
#endif
putsTelemetryValue(x, y, val, UNIT_VOLTS, att);
break;
#endif
#if defined(FRSKY)
case TELEM_MIN_A1-1:
case TELEM_MIN_A2-1:
+21 -19
View File
@@ -100,28 +100,30 @@ void _bootStart()
bwdt_reset();
}
if (((GPIOC->IDR & 0x00000002) == 0) || ((GPIOE->IDR & 0x00000008) == 0)) {
// Bootloader needed
const uint8_t *src;
uint8_t *dest;
uint32_t size;
if ((GPIOE->IDR & 0x00000008) == 0) {
if ((GPIOC->IDR & 0x00000002) == 0) {
// Bootloader needed
const uint8_t *src;
uint8_t *dest;
uint32_t size;
bwdt_reset();
size = sizeof(BootCode);
src = BootCode;
dest = (uint8_t *) 0x20000000;
bwdt_reset();
size = sizeof(BootCode);
src = BootCode;
dest = (uint8_t *) 0x20000000;
for (; size; size -= 1) {
*dest++ = *src++;
}
// Could check for a valid copy to RAM here
// Go execute bootloader
bwdt_reset();
uint32_t address = *(uint32_t *) 0x20000004;
((void (*)(void)) (address))(); // Go execute the loaded application
for (; size; size -= 1) {
*dest++ = *src++;
}
// Could check for a valid copy to RAM here
// Go execute bootloader
bwdt_reset();
uint32_t address = *(uint32_t *) 0x20000004;
((void (*)(void)) (address))(); // Go execute the loaded application
}
// run_application() ;
+5 -5
View File
@@ -115,8 +115,8 @@ const pm_char * openLogs()
f_puts("Time,", &g_oLogFile);
#endif
#if defined(FRSKY_SPORT)
f_puts("SWR,RSSI,A1,A2,", &g_oLogFile);
#if defined(CPUARM)
f_puts("SWR,RSSI,A1,A2,A3,A4,", &g_oLogFile);
#elif defined(FRSKY)
f_puts("Buffer,RX,TX,A1,A2,", &g_oLogFile);
#endif
@@ -196,14 +196,14 @@ void writeLogs()
f_printf(&g_oLogFile, "%d,", tmr10ms);
#endif
#if defined(FRSKY_SPORT)
f_printf(&g_oLogFile, "%d,%d,", frskyData.rssi[1].value, frskyData.rssi[0].value);
#if defined(CPUARM)
f_printf(&g_oLogFile, "%d,%d,", frskyData.swr.value, frskyData.rssi[0].value);
#elif defined(FRSKY)
f_printf(&g_oLogFile, "%d,%d,%d,", frskyStreaming, frskyData.rssi[0].value, frskyData.rssi[1].value);
#endif
#if defined(FRSKY)
for (uint8_t i=0; i<2; i++) {
for (uint8_t i=0; i<MAX_FRSKY_A_CHANNELS; i++) {
int16_t converted_value = applyChannelRatio(i, frskyData.analog[i].value);
f_printf(&g_oLogFile, "%d.%02d,", converted_value/100, converted_value%100);
}
+1 -2
View File
@@ -329,7 +329,6 @@ getvalue_t getValue(uint8_t i)
#if defined(FRSKY)
#if defined(CPUARM)
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_SWR) return frskyData.swr.value;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_RXBATT) return frskyData.analog[TELEM_ANA_RXBATT].value;
#endif
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_RSSI_TX) return frskyData.rssi[1].value;
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_RSSI_RX) return frskyData.rssi[0].value;
@@ -824,7 +823,7 @@ void evalFlightModeMixes(uint8_t mode, uint8_t tick10ms)
//========== OFFSET / AFTER ===============
if (apply_offset_and_curve) {
int16_t offset = GET_GVAR(MD_OFFSET(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_current_mixer_flight_mode);
if (offset) dv += calc100toRESX_16Bits(offset) << 8;
if (offset) dv += int32_t(calc100toRESX_16Bits(offset)) << 8;
}
//========== DIFFERENTIAL =========
+17 -16
View File
@@ -326,7 +326,7 @@ PACK(typedef struct t_ScriptData {
TRAINER_MODULE
};
#define MODELDATA_BITMAP char bitmap[LEN_BITMAP_NAME];
#define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; char curveNames[MAX_CURVES][6]; ScriptData scriptsData[MAX_SCRIPTS]; char inputNames[MAX_INPUTS][4]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS]; uint8_t rxBattAlarms[2];
#define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; char curveNames[MAX_CURVES][6]; ScriptData scriptsData[MAX_SCRIPTS]; char inputNames[MAX_INPUTS][4]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS]; uint8_t spare[2];
#define LIMITDATA_EXTRA char name[LEN_CHANNEL_NAME]; int8_t curve;
#define swstate_t uint16_t
#elif defined(PCBSKY9X)
@@ -417,7 +417,7 @@ PACK(typedef struct t_EEGeneral {
int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
AVR_FIELD(uint8_t blOffBright:4)
AVR_FIELD(uint8_t blOnBright:4)
ARM_FIELD(uint8_t switchesDelay)
ARM_FIELD(int8_t switchesDelay)
uint8_t lightAutoOff;
uint8_t templateSetup; // RETA order for receiver channels
int8_t PPM_Multiplier;
@@ -439,6 +439,8 @@ PACK(typedef struct t_EEGeneral {
}) EEGeneral;
#define SWITCHES_DELAY() uint8_t(15+g_eeGeneral.switchesDelay)
#define SWITCHES_DELAY_NONE (-15)
#define HAPTIC_STRENGTH() (3+g_eeGeneral.hapticStrength)
#if defined(PCBTARANIS)
@@ -839,33 +841,35 @@ enum Functions {
FUNC_MAX
};
#define HAS_ENABLE_PARAM(func) (func < FUNC_FIRST_WITHOUT_ENABLE)
#define HAS_ENABLE_PARAM(func) ((func) < FUNC_FIRST_WITHOUT_ENABLE)
#if defined(VOICE)
#define IS_PLAY_FUNC(func) ((func) >= FUNC_PLAY_SOUND && func <= FUNC_PLAY_VALUE)
#else
#define IS_PLAY_FUNC(func) ((func) == FUNC_PLAY_SOUND)
#endif
#if defined(CPUARM)
#define IS_PLAY_BOTH_FUNC(func) (0)
#define IS_VOLUME_FUNC(func) (func == FUNC_VOLUME)
#define IS_VOLUME_FUNC(func) ((func) == FUNC_VOLUME)
#else
#define IS_PLAY_BOTH_FUNC(func) (func == FUNC_PLAY_BOTH)
#define IS_PLAY_BOTH_FUNC(func) ((func) == FUNC_PLAY_BOTH)
#define IS_VOLUME_FUNC(func) (0)
#endif
#if defined(GVARS)
#define IS_ADJUST_GV_FUNC(func) (func == FUNC_ADJUST_GVAR)
#define IS_ADJUST_GV_FUNC(func) ((func) == FUNC_ADJUST_GVAR)
#else
#define IS_ADJUST_GV_FUNC(func) (0)
#endif
#if defined(HAPTIC)
#define IS_HAPTIC_FUNC(func) (func == FUNC_HAPTIC)
#define IS_HAPTIC_FUNC(func) ((func) == FUNC_HAPTIC)
#else
#define IS_HAPTIC_FUNC(func) (0)
#endif
#if defined(VOICE)
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || (func >= FUNC_PLAY_TRACK && func <= FUNC_PLAY_VALUE) || IS_HAPTIC_FUNC(func))
#else
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || IS_HAPTIC_FUNC(func))
#endif
#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func))
enum ResetFunctionParam {
FUNC_RESET_TIMER1,
@@ -1034,7 +1038,7 @@ enum TelemetrySource {
TELEM_RSSI_TX,
TELEM_RSSI_RX,
#if defined(CPUARM)
TELEM_RXBATT,
TELEM_RESERVE0,
#endif
TELEM_A_FIRST,
TELEM_A1=TELEM_A_FIRST,
@@ -1184,9 +1188,6 @@ enum FrskyCurrentSource {
};
enum FrskyVoltsSource {
#if defined(CPUARM)
FRSKY_VOLTS_SOURCE_RXBATT,
#endif
FRSKY_VOLTS_SOURCE_A1,
FRSKY_VOLTS_SOURCE_A2,
#if defined(CPUARM)
+31 -23
View File
@@ -439,8 +439,6 @@ void modelDefault(uint8_t id)
#if defined(PCBTARANIS)
g_model.frsky.channels[0].ratio = 132;
g_model.rxBattAlarms[0] = 0;
g_model.rxBattAlarms[1] = 83; // 4.3V
#endif
#if defined(MAVLINK)
@@ -1082,7 +1080,9 @@ void checkTHR()
else {
calibratedStick[thrchn] = -1024;
#if !defined(PCBTARANIS)
rawAnas[thrchn] = anas[thrchn] = calibratedStick[thrchn];
if (thrchn < NUM_STICKS) {
rawAnas[thrchn] = anas[thrchn] = calibratedStick[thrchn];
}
#endif
MESSAGE(STR_THROTTLEWARN, STR_THROTTLENOTIDLE, STR_PRESSANYKEYTOSKIP, AU_THROTTLE_ALERT);
}
@@ -1650,15 +1650,10 @@ PLAY_FUNCTION(playValue, uint8_t idx)
case MIXSRC_FIRST_TELEM+TELEM_TM2-1:
PLAY_DURATION(val, 0);
break;
#if defined(CPUARM)
#if defined(CPUARM) && defined(FRSKY)
case MIXSRC_FIRST_TELEM+TELEM_SWR-1:
PLAY_NUMBER(val, 0, 0);
break;
case MIXSRC_FIRST_TELEM+TELEM_RXBATT-1:
if (TELEMETRY_STREAMING()) {
PLAY_NUMBER((val*132+127)/255, 1+UNIT_VOLTS, PREC1);
}
break;
#endif
#if defined(FRSKY)
case MIXSRC_FIRST_TELEM+TELEM_RSSI_TX-1:
@@ -1833,9 +1828,14 @@ void evalFunctions()
CustomFnData *sd = &g_model.funcSw[i];
int8_t swtch = CFN_SWITCH(sd);
if (swtch) {
MASK_CFN_TYPE switch_mask = ((MASK_CFN_TYPE)1 << i);
MASK_CFN_TYPE switch_mask = ((MASK_CFN_TYPE)1 << i);
#if defined(CPUARM)
bool active = getSwitch(swtch, IS_PLAY_FUNC(CFN_FUNC(sd)) ? GETSWITCH_MIDPOS_DELAY : 0);
#else
bool active = getSwitch(swtch);
#endif
if (HAS_ENABLE_PARAM(CFN_FUNC(sd))) {
active &= (bool)CFN_ACTIVE(sd);
@@ -2025,6 +2025,10 @@ void evalFunctions()
PUSH_CUSTOM_PROMPT(active ? param : param+1, i+1);
}
}
if (!active) {
// PLAY_BOTH would change activeFnSwitches otherwise
switch_mask = 0;
}
break;
}
#else
@@ -2152,11 +2156,11 @@ void doMixerCalculations()
val = val - gModelMin;
#if defined(PPM_LIMITS_SYMETRICAL)
if (lim->symetrical)
if (lim->symetrical) {
val -= calc1000toRESX(lim->offset);
}
#endif
gModelMax -= gModelMin; // we compare difference between Max and Mix for recaling needed; Max and Min are shifted to 0 by default
// usually max is 1024 min is -1024 --> max-min = 2048 full range
@@ -2178,7 +2182,7 @@ void doMixerCalculations()
#ifdef PCBTARANIS
val = RESX + calibratedStick[g_model.thrTraceSrc == 0 ? THR_STICK : g_model.thrTraceSrc+NUM_STICKS-1];
#else
val = RESX + rawAnas[g_model.thrTraceSrc == 0 ? THR_STICK : g_model.thrTraceSrc+NUM_STICKS-1];
val = RESX + (g_model.thrTraceSrc == 0 ? rawAnas[THR_STICK] : calibratedStick[g_model.thrTraceSrc+NUM_STICKS-1]);
#endif
}
@@ -2201,8 +2205,6 @@ void doMixerCalculations()
timerState->sum = 0;
}
// value for time described in timer->mode
// OFFABSTHsTH%THt
if (tm == TMRMODE_THR_REL) {
timerState->cnt++;
timerState->sum+=val;
@@ -2223,21 +2225,22 @@ void doMixerCalculations()
// @@@ open.20.fsguruh: why so complicated? we have already a s_sum field; use it for the half seconds (not showable) as well
// check for s_cnt[i]==0 is not needed because we are shure it is at least 1
#if defined(ACCURAT_THROTTLE_TIMER)
if ((timerState->sum/timerState->cnt)>=128) { // throttle was normalized to 0 to 128 value (throttle/64*2 (because - range is added as well)
if ((timerState->sum/timerState->cnt) >= 128) { // throttle was normalized to 0 to 128 value (throttle/64*2 (because - range is added as well)
newTimerVal++; // add second used of throttle
timerState->sum-=128*timerState->cnt;
timerState->sum -= 128*timerState->cnt;
}
#else
if ((timerState->sum/timerState->cnt)>=32) { // throttle was normalized to 0 to 32 value (throttle/16*2 (because - range is added as well)
if ((timerState->sum/timerState->cnt) >= 32) { // throttle was normalized to 0 to 32 value (throttle/16*2 (because - range is added as well)
newTimerVal++; // add second used of throttle
timerState->sum-=32*timerState->cnt;
timerState->sum -= 32*timerState->cnt;
}
#endif
timerState->cnt=0;
}
else if (tm == TMRMODE_THR_TRG) {
if (val || newTimerVal > 0)
if (val || newTimerVal > 0) {
newTimerVal++;
}
}
else {
if (tm > 0) tm -= (TMR_VAROFS-1);
@@ -3003,6 +3006,8 @@ ISR(USART0_UDRE_vect)
#endif
#endif
#define INSTANT_TRIM_MARGIN 10 /* around 1% */
void instantTrim()
{
evalInputs(e_perout_mode_notrainer);
@@ -3012,11 +3017,14 @@ void instantTrim()
// don't instant trim the throttle stick
uint8_t trim_phase = getTrimFlightPhase(s_current_mixer_flight_mode, i);
#if defined(PCBTARANIS)
int16_t trim = limit<int16_t>(TRIM_EXTENDED_MIN, (calibratedStick[i] + trims[i]) / 2, TRIM_EXTENDED_MAX);
int16_t delta = calibratedStick[i];
#else
int16_t trim = limit<int16_t>(TRIM_EXTENDED_MIN, (anas[i] + trims[i]) / 2, TRIM_EXTENDED_MAX);
int16_t delta = anas[i];
#endif
setTrimValue(trim_phase, i, trim);
if (abs(delta) >= INSTANT_TRIM_MARGIN) {
int16_t trim = limit<int16_t>(TRIM_EXTENDED_MIN, (delta + trims[i]) / 2, TRIM_EXTENDED_MAX);
setTrimValue(trim_phase, i, trim);
}
}
}
+8 -4
View File
@@ -696,7 +696,14 @@ void perMain();
NOINLINE void per10ms();
getvalue_t getValue(uint8_t i);
#if defined(CPUARM)
#define GETSWITCH_MIDPOS_DELAY 1
bool getSwitch(int8_t swtch, uint8_t flags=0);
#else
bool getSwitch(int8_t swtch);
#endif
void logicalSwitchesTimerTick();
void logicalSwitchesReset();
@@ -1229,9 +1236,8 @@ uint8_t lswFamily(uint8_t func);
int16_t lswTimerValue(delayval_t val);
#if defined(CPUARM)
#define MASK_CFN_TYPE uint32_t // current max = 32 function switches
#define MASK_CFN_TYPE uint64_t // current max = 64 function switches
#define MASK_FUNC_TYPE uint32_t // current max = 32 functions
#elif defined(CPUM64)
#define MASK_CFN_TYPE uint16_t // current max = 16 function switches
#define MASK_FUNC_TYPE uint8_t // current max = 8 functions
@@ -1363,8 +1369,6 @@ enum AUDIO_SOUNDS {
AU_RSSI_ORANGE,
AU_RSSI_RED,
AU_SWR_RED,
AU_RXBATT_ORANGE,
AU_RXBATT_RED,
AU_TELEMETRY_LOST,
AU_TELEMETRY_BACK,
#endif
+2
View File
@@ -678,5 +678,7 @@ void unlockFlash() { }
void lockFlash() { }
void writeFlash(uint32_t *address, uint32_t *buffer) { SIMU_SLEEP(100); }
uint32_t isBootloaderStart(const void *block) { return 1; }
void turnBacklightOn(uint8_t level, uint8_t color) { }
void turnBacklightOff(void) { }
#endif
+13 -5
View File
@@ -111,7 +111,7 @@ uint32_t check3PosSwitchPosition(uint8_t idx, EnumKeys sw, bool startup)
result = (1 << index);
switchesMidposStart[idx] = 0;
}
else if (startup || (switchesPos & (1 << (sw - SW_SA0 + 1))) || g_eeGeneral.switchesDelay==0 || (switchesMidposStart[idx] && (tmr10ms_t)(get_tmr10ms() - switchesMidposStart[idx]) > g_eeGeneral.switchesDelay)) {
else if (startup || (switchesPos & (1 << (sw - SW_SA0 + 1))) || g_eeGeneral.switchesDelay==SWITCHES_DELAY_NONE || (switchesMidposStart[idx] && (tmr10ms_t)(get_tmr10ms() - switchesMidposStart[idx]) > SWITCHES_DELAY())) {
index = sw - SW_SA0 + 1;
result = (1 << index);
switchesMidposStart[idx] = 0;
@@ -158,7 +158,7 @@ void getSwitchesPosition(bool startup)
potsLastposStart[i] = get_tmr10ms();
potsPos[i] = (pos << 4) | previousStoredPos;
}
else if (startup || g_eeGeneral.switchesDelay==0 || (tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > g_eeGeneral.switchesDelay) {
else if (startup || g_eeGeneral.switchesDelay==SWITCHES_DELAY_NONE || (tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > SWITCHES_DELAY()) {
potsLastposStart[i] = 0;
potsPos[i] = (pos << 4) | pos;
if (previousStoredPos != pos) {
@@ -171,8 +171,6 @@ void getSwitchesPosition(bool startup)
}
#define SWITCH_POSITION(sw) (switchesPos & (1<<(sw)))
#define POT_POSITION(sw) ((potsPos[(sw)/XPOTS_MULTIPOS_COUNT] & 0x0f) == ((sw) % XPOTS_MULTIPOS_COUNT))
#else
#define SWITCH_POSITION(idx) switchState((EnumKeys)(SW_BASE+(idx)))
#endif
bool getLogicalSwitch(uint8_t idx)
@@ -369,7 +367,11 @@ bool getLogicalSwitch(uint8_t idx)
return result;
}
#if defined(CPUARM)
bool getSwitch(int8_t swtch, uint8_t flags)
#else
bool getSwitch(int8_t swtch)
#endif
{
bool result;
@@ -385,7 +387,13 @@ bool getSwitch(int8_t swtch)
result = true;
}
else if (cs_idx <= SWSRC_LAST_SWITCH) {
result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
#if defined(PCBTARANIS)
if (flags & GETSWITCH_MIDPOS_DELAY)
result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
else
#endif
result = switchState((EnumKeys)(SW_BASE+cs_idx-SWSRC_FIRST_SWITCH));
#if defined(MODULE_ALWAYS_SEND_PULSES)
if (startupWarningState < STARTUP_WARNING_DONE) {
// if throttle or switch warning is currently active, ignore actual stick position and use wanted values
+2 -1
View File
@@ -82,12 +82,13 @@
#define JACK_PPM_OUT() PORTG |= (1<<OUT_G_SIM_CTL)
#define JACK_PPM_IN() PORTG &= ~(1<<OUT_G_SIM_CTL)
#define sdDone()
// SD driver
#if !defined(SIMU)
bool sdMounted();
void sdMountPoll();
void sdPoll10ms();
#define sdDone()
#define SD_IS_HC() (0)
#define SD_GET_BLOCKNR() (0)
+1 -1
View File
@@ -47,7 +47,7 @@ int8_t Coproc_maxtemp=-127 ;
int8_t Coproc_valid ;
bool get_onlytemp;
#if !defined(SIMU)
static uint8_t *Twi_read_address ;
// TODO not used? static uint8_t *Twi_read_address ;
#endif
static uint8_t TwiOperation ;
@@ -169,17 +169,3 @@ void boardInit()
}
#endif
#if defined(REVPLUS)
void turnBacklightOn(uint8_t level, uint8_t color)
{
TIM4->CCR4 = (100-level)*color;
TIM4->CCR2 = (100-level)*(100-color);
}
void turnBacklightOff(void)
{
TIM4->CCR4 = 0;
TIM4->CCR2 = 0;
}
#endif
+14 -1
View File
@@ -161,7 +161,7 @@ static void LCD_BL_Config()
TIM4->CCMR2 = TIM_CCMR2_OC4M_1 | TIM_CCMR2_OC4M_2 ; // PWM
TIM4->CCER = TIM_CCER_CC4E | TIM_CCER_CC2E ;
int BacklightBrightness = 40 ;
int BacklightBrightness = 0 ;
TIM4->CCR2 = BacklightBrightness ;
TIM4->CCR4 = BacklightBrightness ;
TIM4->EGR = 0 ;
@@ -257,3 +257,16 @@ void lcdSetRefVolt(uint8_t val)
AspiCmd(val+CONTRAST_OFS); //0--255
}
#if defined(REVPLUS)
void turnBacklightOn(uint8_t level, uint8_t color)
{
TIM4->CCR4 = (100-level)*color;
TIM4->CCR2 = (100-level)*(100-color);
}
void turnBacklightOff(void)
{
TIM4->CCR4 = 0;
TIM4->CCR2 = 0;
}
#endif
+7 -19
View File
@@ -134,10 +134,6 @@ lcdint_t applyChannelRatio(uint8_t channel, lcdint_t val)
}
#if defined(CPUARM)
inline bool rxBattAlarmRaised(uint8_t alarm)
{
return g_model.rxBattAlarms[alarm] > 0 && frskyData.analog[TELEM_ANA_RXBATT].value < g_model.rxBattAlarms[alarm];
}
inline bool alarmRaised(uint8_t channel, uint8_t idx)
{
return g_model.frsky.channels[channel].ratio > 0 && g_model.frsky.channels[channel].alarms_value[idx] > 0 && frskyData.analog[channel].value < g_model.frsky.channels[channel].alarms_value[idx];
@@ -269,7 +265,6 @@ NOINLINE void processSerialData(uint8_t data)
enum AlarmsCheckSteps {
ALARM_SWR_STEP,
ALARM_RSSI_STEP,
ALARM_RXBATT_STEP,
ALARM_A1_STEP,
ALARM_A2_STEP,
ALARM_A3_STEP,
@@ -317,7 +312,9 @@ void telemetryWakeup()
static uint8_t frskyTxDelay = 5;
if (frskyAlarmsSendState && (--frskyTxDelay == 0)) {
frskyTxDelay = 5; // 50ms
#if !defined(SIMU)
frskyDSendNextAlarm();
#endif
}
}
#endif
@@ -357,16 +354,6 @@ void telemetryWakeup()
alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3 seconds */
}
}
else if (alarmsCheckStep == ALARM_RXBATT_STEP) {
if (rxBattAlarmRaised(1)) {
AUDIO_RXBATT_RED();
alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3 seconds */
}
else if (rxBattAlarmRaised(0)) {
AUDIO_RXBATT_ORANGE();
alarmsCheckTime = get_tmr10ms() + 300; /* next check in 3 seconds */
}
}
else if (alarmsCheckStep == ALARM_A1_STEP) {
if (alarmRaised(TELEM_ANA_A1, 1)) {
AUDIO_A1_RED();
@@ -446,10 +433,7 @@ void telemetryInterrupt10ms()
// power calculation
uint8_t channel = g_model.frsky.voltsSource;
#if defined(CPUARM)
if (channel == FRSKY_VOLTS_SOURCE_RXBATT) {
voltage = ((frskyData.analog[TELEM_ANA_RXBATT].value * 132) + 127) / 255;
}
else if (channel <= FRSKY_VOLTS_SOURCE_A4) {
if (channel <= FRSKY_VOLTS_SOURCE_A4) {
voltage = applyChannelRatio(channel, frskyData.analog[channel].value) / 10;
}
#else
@@ -536,6 +520,10 @@ void telemetryReset()
frskyData.rssi[1].value = 75;
frskyData.analog[TELEM_ANA_A1].set(120, UNIT_VOLTS);
frskyData.analog[TELEM_ANA_A2].set(240, UNIT_VOLTS);
#if defined(CPUARM)
frskyData.analog[TELEM_ANA_A3].set(100, UNIT_VOLTS);
frskyData.analog[TELEM_ANA_A4].set(200, UNIT_VOLTS);
#endif
frskyData.hub.fuelLevel = 75;
frskyData.hub.rpm = 12000;
frskyData.hub.vfas = 100;
-1
View File
@@ -298,7 +298,6 @@ enum TelemAnas {
#if defined(CPUARM)
TELEM_ANA_A3,
TELEM_ANA_A4,
TELEM_ANA_RXBATT,
#endif
TELEM_ANA_COUNT
};
+2
View File
@@ -435,7 +435,9 @@ void frskySendPacket(uint8_t type, uint8_t value, uint8_t p1, uint8_t p2)
*ptr++ = START_STOP; // Start of packet
frskyTxBufferCount = ptr - &frskyTxBuffer[0];
#if !defined(SIMU)
telemetryTransmitBuffer();
#endif
}
inline void frskyDSendNextAlarm(void)
+1 -1
View File
@@ -325,7 +325,7 @@ void frskySportProcessPacket(uint8_t *packet)
#endif
}
else if (appId == BATT_ID) {
frskyData.analog[TELEM_ANA_RXBATT].set(SPORT_DATA_U8(packet), UNIT_VOLTS);
frskyData.analog[TELEM_ANA_A1].set(SPORT_DATA_U8(packet), UNIT_VOLTS);
}
else if ((appId >> 8) == 0) {
// The old FrSky IDs
+6 -6
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
@@ -444,8 +444,8 @@
#define TR_VSRCRAW "---\0""Směr""Výšk""Plyn""Křid" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmS" "TrmV" "TrmP" "TrmK" TR_SW_VSRCRAW
#define LEN_VTMRMODES "\003"
#define TR_VTMRMODES "VYP""ABS""PL>""PL%""PL*"
#define LEN_VTMRMODES "\004"
#define TR_VTMRMODES "VYP\0""ABS\0""Pln>""Pln%""Pln*"
#define LEN_VTRAINERMODES "\006"
#define TR_VTRAINERMODES "Učitel""Žák\0 "
@@ -497,7 +497,7 @@
#define TR_ELIMITS TR("Limit +25%", "Kanál +/- 125%")
#define TR_ETRIMS TR("širší Trim", "Široký trim")
#define TR_TRIMINC TR("Krok Trimu", "Krok trimu")
#define TR_TTRACE TR("PL stopek", INDENT "Stopa PL stopek")
#define TR_TTRACE TR("StopaPlynu", INDENT "Stopa plynu")
#define TR_TTRIM TR("TrimVolnob.", INDENT "Trim jen volnoběh")
#define TR_BEEPCTR "Středy \221\222"
#define TR_PROTO INDENT "Protokol"
@@ -572,7 +572,7 @@
#define TR_BLDELAY INDENT"Zhasnout po"
#define TR_BLONBRIGHTNESS INDENT"Jas Zap."
#define TR_BLOFFBRIGHTNESS INDENT"Jas Vyp."
#define TR_BLCOLOR INDENT "Color"
#define TR_BLCOLOR INDENT "Barva"
#define TR_SPLASHSCREEN TR("úvodníLogo", "Zobrazit úvodní logo")
#define TR_THROTTLEWARNING TR("* Plyn", INDENT "Páka Plynu")
#define TR_SWITCHWARNING TR("* Spínače", INDENT "Polohy Spínačů")
+2 -2
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxAkku\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
+8 -8
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -355,13 +355,13 @@
#define TR_VTELPROTO "None\0 ""Hub\0 ""WSHHigh"
#if defined(CPUARM)
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_AMPSRC TR("\003", "\005")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
#define LEN_VOLTSRC TR("\003", "\005")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
#define LEN_AMPSRC TR("\003", "\005")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells")
#endif
#define LEN_VARIOSRC "\004"
@@ -579,7 +579,7 @@
#define TR_POTWARNING TR(IF_CPUARM(INDENT) "Pot Warn.", INDENT "Pot Positions")
#define TR_TIMEZONE TR("Time Zone", "GPS Time zone")
#define TR_RXCHANNELORD TR("Rx Channel Ord", "Default channel order")
#define TR_SWITCHES_DELAY "Switches Delay"
#define TR_SWITCHES_DELAY "Play Delay (sw. mid pos)"
#define TR_SLAVE CENTER "Slave"
#define TR_MODESRC "Mode\006% Source"
#define TR_MULTIPLIER "Multiplier"
+2 -2
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
+2 -2
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
+8 -8
View File
@@ -355,13 +355,13 @@
#define TR_VTELPROTO "Aucun ""Hub\0 ""WSHHigh"
#if defined(CPUARM)
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Elem.\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Elem.\0 ")
#define LEN_AMPSRC TR("\003", "\005")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Elem.")
#define LEN_VOLTSRC TR("\003", "\005")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Elem.")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Elem.\0 ")
#define LEN_AMPSRC TR("\003", "\005")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Elem.")
#endif
#define LEN_VARIOSRC "\005"
@@ -579,7 +579,7 @@
#define TR_POTWARNING TR(IF_CPUARM(INDENT) "Alerte pot", INDENT "Pos. potentiom.")
#define TR_TIMEZONE "Fuseau horaire"
#define TR_RXCHANNELORD TR("Ordre voies RX","Ordre des voies préféré")
#define TR_SWITCHES_DELAY "Switches Delay"
#define TR_SWITCHES_DELAY "Délai inters milieu"
#define TR_SLAVE "Elève"
#define TR_MODESRC "Mode\006% Source"
#define TR_MULTIPLIER "Multiplieur"
@@ -781,7 +781,7 @@
#define TR_ANTENNAPROBLEM CENTER "Antenne radio défectueuse!"
#define TR_MODELIDUSED TR("ID déjà affecté", "No de modèle déjà utilisé")
#define TR_MODULE INDENT "Type de module"
#define TR_TELEMETRY_TYPE "Telemetry Type"
#define TR_TELEMETRY_TYPE "Type télémesure"
#define TR_CHANNELRANGE TR(INDENT "Canaux", INDENT "Plage de canaux")
#define TR_LOWALARM INDENT "Alarme basse"
#define TR_CRITICALALARM INDENT "Alarme critique"
+2 -2
View File
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "BattRx\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Celle\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Celle\0 ")
@@ -445,7 +445,7 @@
#define TR_VSRCRAW "---\0""Dir\0""Ele\0""Mot\0""Ale\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmD" "TrmE" "TrmM" "TrmA" TR_SW_VSRCRAW
#define LEN_VTMRMODES "\003"
#define TR_VTMRMODES "OFF""ABS""THs""TH%""THt"
#define TR_VTMRMODES "OFF""ABS""MOs""MO%""MOt"
#define LEN_VTRAINERMODES "\007"
#define TR_VTRAINERMODES "Maestro""Allievo"
+2 -2
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
+2 -2
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Time", "Time\0")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
+4 -4
View File
@@ -292,7 +292,7 @@
#define TR_TELEM_RESERVE TR("[--]", "[---]")
#define TR_TELEM_TIME TR("Tid\0", "Tid\0 ")
#define TR_SWR TR("SWR\0", "SWR\0 ")
#define TR_RX_BATT TR("RxBt", "RxBat")
#define TR_RX_BATT TR("[NA]", "[NA]\0")
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
#else
@@ -358,7 +358,7 @@
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define LEN_VOLTSRC TR("\003", "\007")
#define TR_VOLTSRC TR("RxV""A1\0""A2\0""A3\0""A4\0""FAS""Cel", "RxBatt\0""A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#define TR_VOLTSRC TR("A1\0""A2\0""A3\0""A4\0""FAS""Cel", "A1\0 ""A2\0 ""A3\0 ""A4\0 ""FAS\0 ""Cells\0 ")
#else
#define LEN_AMPSRC TR("\003", "\007")
#define TR_AMPSRC TR("---""A1\0""A2\0""FAS""Cel", "---\0 ""A1\0 ""A2\0 ""FAS\0 ""Cells\0 ")
@@ -579,7 +579,7 @@
#define TR_POTWARNING TR("Rattvarn.", INDENT "Rattvarning")
#define TR_TIMEZONE TR("Tidszon","GPS Tidszon")
#define TR_RXCHANNELORD "Kanaler i RX"
#define TR_SWITCHES_DELAY "Switches Delay"
#define TR_SWITCHES_DELAY "Brytarfördröjning"
#define TR_SLAVE "Elev"
#define TR_MODESRC " Läge\004% Källa"
#define TR_MULTIPLIER "Styrka"
@@ -781,7 +781,7 @@
#define TR_ANTENNAPROBLEM CENTER "Fel på TX-antennen"
#define TR_MODELIDUSED TR("ID finns redan","ModellID används redan")
#define TR_MODULE INDENT "Modul"
#define TR_TELEMETRY_TYPE "Telemetry Type"
#define TR_TELEMETRY_TYPE "Telemetrityp"
#define TR_CHANNELRANGE INDENT "Kanalområde"
#define TR_LOWALARM INDENT "Låg-alarm"
#define TR_CRITICALALARM INDENT "Kritiskt alarm"
-4
View File
@@ -177,8 +177,6 @@ def ttsEn():
(u"A3,critical", "a3_red", NO_ALTERNATE),
(u"A4,low", "a4_org", NO_ALTERNATE),
(u"A4,critical", "a4_red", NO_ALTERNATE),
(u"receiver battery, low", "rx_org", NO_ALTERNATE),
(u"receiver battery, critical", "rx_red", NO_ALTERNATE),
(u"RF signal, low", "rssi_org", NO_ALTERNATE),
(u"RF signal, critical", "rssi_red", NO_ALTERNATE),
(u"radio antenna defective", "swr_red", NO_ALTERNATE),
@@ -276,8 +274,6 @@ def ttsFr():
(u"A3,critique", "a3_red", NO_ALTERNATE),
(u"A4,faible", "a4_org", NO_ALTERNATE),
(u"A4,critique", "a4_red", NO_ALTERNATE),
(u"Batterie récepteur faible !", "rx_org", NO_ALTERNATE),
(u"Batterie récepteur critique !", "rx_red", NO_ALTERNATE),
(u"Signal RF, faible", "rssi_org", NO_ALTERNATE),
(u"Signal RF, critique", "rssi_red", NO_ALTERNATE),
(u"Antenne défectueuse", "swr_red", NO_ALTERNATE),