1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-19 14:25:11 +03:00

Merge remote-tracking branch 'origin/next' into mhotar/layout_alignments_Issue #584

Conflicts:
	radio/src/translations/es.h.txt
	radio/src/translations/fr.h.txt
	radio/src/translations/pl.h.txt
Manually resolved.
This commit is contained in:
mhotar 2014-02-04 13:41:39 +01:00
commit 40edf9f88a
242 changed files with 41100 additions and 31497 deletions

View file

@ -302,3 +302,14 @@ Dan Neelands
Yashiro Masayuki
Isaac Sloan
Harold Baird
Roy Bender
Bradley Murchie
Maximilian Süß
Dean Jansa
Ronald Donker
Paul Oldenkamp
Dietmar Drees
Bradley Murchie
Richard Fahie
James Kaufman
Henry Deucker

View file

@ -296,7 +296,7 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
SET( LANGUAGES he pt ru de fr it sv cs )
SET( LANGUAGES he pl pt ru de fr it sv cs )
FOREACH( language ${LANGUAGES} )
SET( companion_TS ${companion_TS} translations/companion_${language}.ts )
ENDFOREACH( language )

View file

@ -1260,6 +1260,7 @@ void compareDialog::printFrSky()
color=getColor1(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value);
str.append("<td align=\"center\"><font color="+color+">"+QString::number(fd1->rssiAlarms[1].value,10)+"</td>");
str.append("</table>");
#if 0
if (GetEepromInterface()->getCapability(TelemetryBars) || GetEepromInterface()->getCapability(TelemetryCSFields)) {
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
@ -1300,13 +1301,13 @@ void compareDialog::printFrSky()
if (fd1->screens[0].type==fd2->screens[0].type)
color=getColor1(fd1->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].source);
str.append("<td align=\"Center\"><font color="+color+">"+getFrSkySrc(fd1->screens[0].body.bars[i].source)+"</font></td>");
value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1);
value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2);
// TODO value1 = getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1);
// TODO value2 = getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2);
if (fd1->screens[0].type==fd2->screens[0].type)
color=getColor1(value1,value2);
str.append("<td align=\"Right\"><font color="+color+">"+QString::number(value1)+"</td>");
value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1);
value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2);
// TODO value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1);
// TODO value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2);
if (fd1->screens[0].type==fd2->screens[0].type)
color=getColor1(value1,value2);
str.append("<td align=\"Right\"><font color="+color+">"+QString::number(value1)+"</td></tr>");
@ -1315,6 +1316,7 @@ void compareDialog::printFrSky()
}
}
}
#endif
str.append("</td><td width=\"50%\">");
str.append("<table border=1 cellspacing=0 cellpadding=1 width=\"100%\">");
@ -1377,7 +1379,7 @@ void compareDialog::printFrSky()
color=getColor2(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value);
str.append("<td align=\"center\"><font color="+color+">"+QString::number(fd2->rssiAlarms[1].value,10)+"</td>");
str.append("</table></br>");
#if 0
if (GetEepromInterface()->getCapability(TelemetryBars) || GetEepromInterface()->getCapability(TelemetryCSFields)) {
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
@ -1418,13 +1420,13 @@ void compareDialog::printFrSky()
if (fd1->screens[0].type==fd2->screens[0].type)
color=getColor2(fd1->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].source);
str.append("<td align=\"Center\"><font color="+color+">"+getFrSkySrc(fd2->screens[0].body.bars[i].source)+"</font></td>");
value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1);
value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2);
// TODO value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMin,fd1);
// TODO value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMin,fd2);
if (fd1->screens[0].type==fd2->screens[0].type)
color=getColor2(value1,value2);
str.append("<td align=\"Right\"><font color="+color+">"+QString::number(value2)+"</font></td>");
value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1);
value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2);
// TODO value1=getBarValue(fd1->screens[0].body.bars[i].source,fd1->screens[0].body.bars[i].barMax,fd1);
// TODO value2=getBarValue(fd2->screens[0].body.bars[i].source,fd2->screens[0].body.bars[i].barMax,fd2);
if (fd1->screens[0].type==fd2->screens[0].type)
color=getColor2(value1,value2);
str.append("<td align=\"Right\"><font color="+color+">"+QString::number(value2)+"</font></td></tr>");
@ -1433,6 +1435,7 @@ void compareDialog::printFrSky()
}
}
}
#endif
str.append("</td></tr></table>");
te->append(str);
}

View file

@ -37,215 +37,117 @@ void getEEPROMString(char *dst, const char *src, int size)
}
}
int RawSource::getDecimals(const ModelData & Model)
RawSourceRange RawSource::getRange(bool singleprec)
{
if(type==SOURCE_TYPE_TELEMETRY) {
switch (index) {
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0 ? 2: 0);
case TELEMETRY_SOURCE_CELL:
return 2;
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
case TELEMETRY_SOURCE_CURRENT:
return 1;
default:
return 0;
}
}
return 0;
RawSourceRange result;
int board = GetEepromInterface()->getBoard();
if (!singleprec && !IS_TARANIS(board)) {
singleprec = true;
}
double RawSource::getMin(const ModelData & Model)
{
switch (type) {
case SOURCE_TYPE_TELEMETRY:
switch (index) {
/*case TELEMETRY_SOURCE_NONE:
case TELEMETRY_SOURCE_TX_BATT:
case TELEMETRY_SOURCE_TIMER1:
case TELEMETRY_SOURCE_TIMER2:
return 0; */
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/2550.0;
}
else {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0;
}
case TELEMETRY_SOURCE_ALT:
case TELEMETRY_SOURCE_GPS_ALT:
return -500;
case TELEMETRY_SOURCE_T1:
case TELEMETRY_SOURCE_T2:
return -30;
default:
return 0;
}
result.step = 0.1;
result.decimals = 1;
result.max = 25.5;
break;
default:
return (Model.extendedLimits ? -125 :-100);
}
}
double RawSource::getMax(const ModelData & Model)
{
switch (type) {
case SOURCE_TYPE_TELEMETRY:
switch (index) {
case TELEMETRY_SOURCE_TIMER1:
case TELEMETRY_SOURCE_TIMER2:
return 765;
result.step = singleprec ? 3 : 1;
result.max = singleprec ? 765 : 7200;
break;
case TELEMETRY_SOURCE_RSSI_TX:
case TELEMETRY_SOURCE_RSSI_RX:
return 100;
result.max = 100;
break;
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio-(Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0)/10;
} else {
return Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio-(Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0;
}
case TELEMETRY_SOURCE_ALT:
case TELEMETRY_SOURCE_GPS_ALT:
return 1540;
case TELEMETRY_SOURCE_RPM:
return 12750;
case TELEMETRY_SOURCE_FUEL:
return 100;
case TELEMETRY_SOURCE_T1:
case TELEMETRY_SOURCE_T2:
return 225;
case TELEMETRY_SOURCE_SPEED:
return 944;
case TELEMETRY_SOURCE_DIST:
return 2040;
case TELEMETRY_SOURCE_CELL:
return 5.1;
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
return 25.5;
case TELEMETRY_SOURCE_CURRENT:
return 127.5;
case TELEMETRY_SOURCE_CONSUMPTION:
return 5100;
case TELEMETRY_SOURCE_POWER:
return 1275;
default:
return 125;
if (model) {
const FrSkyChannelData & channel = model->frsky.channels[index-TELEMETRY_SOURCE_A1];
float ratio = channel.getRatio();
if (channel.type==0 || channel.type==1 || channel.type==2)
result.decimals = 2;
else
result.decimals = 0;
result.step = ratio / 255;
result.min = channel.offset * result.step;
result.max = ratio + result.min;
}
break;
default:
return (Model.extendedLimits ? 125 :100);
}
}
double RawSource::getOffset(const ModelData & Model)
{
if (type==SOURCE_TYPE_TELEMETRY) {
switch (index) {
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/2550.0;
}
else {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].offset*Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio)/255.0;
}
case TELEMETRY_SOURCE_ALT:
case TELEMETRY_SOURCE_GPS_ALT:
return 524;
case TELEMETRY_SOURCE_RPM:
return 6400;
case TELEMETRY_SOURCE_FUEL:
return 0;
result.step = singleprec ? 8 : 1;
result.min = -500;
result.max = singleprec ? 1540 : 3000;
break;
case TELEMETRY_SOURCE_T1:
case TELEMETRY_SOURCE_T2:
return 98;
case TELEMETRY_SOURCE_SPEED:
return 474;
case TELEMETRY_SOURCE_DIST:
return 1024;
case TELEMETRY_SOURCE_CELL:
return 2.56;
default:
return 0;
}
}
return 0;
}
int RawSource::getRawOffset(const ModelData & Model)
{
switch (type) {
case SOURCE_TYPE_TELEMETRY:
switch (index) {
case TELEMETRY_SOURCE_TIMER1:
case TELEMETRY_SOURCE_TIMER2:
case TELEMETRY_SOURCE_RSSI_TX:
case TELEMETRY_SOURCE_RSSI_RX:
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
case TELEMETRY_SOURCE_FUEL:
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
case TELEMETRY_SOURCE_CURRENT:
case TELEMETRY_SOURCE_CONSUMPTION:
case TELEMETRY_SOURCE_POWER:
return 128;
default:
return 0;
}
default:
return 0;
}
}
double RawSource::getStep(const ModelData & Model)
{
switch (type) {
case SOURCE_TYPE_TELEMETRY:
switch (index) {
case TELEMETRY_SOURCE_TIMER1:
case TELEMETRY_SOURCE_TIMER2:
return 3;
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
if (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio/2550.0);
}
else {
return (Model.frsky.channels[index-TELEMETRY_SOURCE_A1].ratio/255.0);
}
case TELEMETRY_SOURCE_ALT:
case TELEMETRY_SOURCE_GPS_ALT:
return 8;
result.min = -30;
result.max = 225;
break;
case TELEMETRY_SOURCE_RPM:
return 50;
result.step = singleprec ? 50 : 1;
result.max = singleprec ? 12750 : 20000;
break;
case TELEMETRY_SOURCE_FUEL:
result.max = 100;
break;
case TELEMETRY_SOURCE_SPEED:
return 4;
case TELEMETRY_SOURCE_DIST:
return 8;
case TELEMETRY_SOURCE_CELL:
return 0.02;
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
return 0.1;
case TELEMETRY_SOURCE_CURRENT:
return 0.5;
case TELEMETRY_SOURCE_CONSUMPTION:
return 20;
case TELEMETRY_SOURCE_POWER:
return 5;
default:
return 1;
result.step = singleprec ? 4 : 1;
result.max = singleprec ? 944 : 2000;
if (model && !model->frsky.imperial) {
result.step *= 1.852;
result.max *= 1.852;
}
break;
case TELEMETRY_SOURCE_DIST:
result.step = singleprec ? 8 : 1;
result.max = singleprec ? 2040 : 10000;
break;
case TELEMETRY_SOURCE_CELL:
result.step = singleprec ? 0.02 : 0.01;
result.max = 5.1;
result.decimals = 2;
break;
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
result.step = 0.1;
result.max = 25.5;
result.decimals = 1;
break;
case TELEMETRY_SOURCE_CURRENT:
result.step = singleprec ? 0.5 : 0.1;
result.max = singleprec ? 127.5 : 200.0;
result.decimals = 1;
break;
case TELEMETRY_SOURCE_CONSUMPTION:
result.step = singleprec ? 20 : 1;
result.max = singleprec ? 5100 : 10000;
break;
case TELEMETRY_SOURCE_POWER:
result.step = singleprec ? 5 : 1;
result.max = singleprec ? 1275 : 2000;
break;
default:
return 1;
result.max = 125;
break;
}
if (singleprec) {
result.offset = result.max - (127*result.step);
}
break;
default:
result.max = (model && model->extendedLimits ? 125 : 100);
result.min = - result.max;
break;
}
return result;
}
QString AnalogString(int index)
@ -337,12 +239,14 @@ QString SwitchDn(const char sw)
QString RawSwitch::toString()
{
static const QString switches9X[] = { QObject::tr("THR"), QObject::tr("RUD"), QObject::tr("ELE"),
QObject::tr("ID0"), QObject::tr("ID1"), QObject::tr("ID2"),
QObject::tr("AIL"), QObject::tr("GEA"), QObject::tr("TRN")
static const QString switches9X[] = {
QString("THR"), QString("RUD"), QString("ELE"),
QString("ID0"), QString("ID1"), QString("ID2"),
QString("AIL"), QString("GEA"), QString("TRN")
};
static const QString switchesX9D[] = { SwitchUp('A'), QString::fromUtf8("SA-"), SwitchDn('A'),
static const QString switchesX9D[] = {
SwitchUp('A'), QString::fromUtf8("SA-"), SwitchDn('A'),
SwitchUp('B'), QString::fromUtf8("SB-"), SwitchDn('B'),
SwitchUp('C'), QString::fromUtf8("SC-"), SwitchDn('C'),
SwitchUp('D'), QString::fromUtf8("SD-"), SwitchDn('D'),
@ -352,12 +256,18 @@ QString RawSwitch::toString()
SwitchUp('H'), SwitchDn('H'),
};
static const QString virtualSwitches[] = { QObject::tr("LS1"), QObject::tr("LS2"), QObject::tr("LS3"), QObject::tr("LS4"), QObject::tr("LS5"), QObject::tr("LS6"), QObject::tr("LS7"), QObject::tr("LS8"), QObject::tr("LS9"), QObject::tr("LSA"),
static const QString virtualSwitches[] = {
QObject::tr("LS1"), QObject::tr("LS2"), QObject::tr("LS3"), QObject::tr("LS4"), QObject::tr("LS5"), QObject::tr("LS6"), QObject::tr("LS7"), QObject::tr("LS8"), QObject::tr("LS9"), QObject::tr("LSA"),
QObject::tr("LSB"), QObject::tr("LSC"), QObject::tr("LSD"), QObject::tr("LSE"), QObject::tr("LSF"), QObject::tr("LSG"), QObject::tr("LSH"), QObject::tr("LSI"), QObject::tr("LSJ"), QObject::tr("LSK"),
QObject::tr("LSL"), QObject::tr("LSM"), QObject::tr("LSN"), QObject::tr("LSO"), QObject::tr("LSP"), QObject::tr("LSQ"), QObject::tr("LSR"), QObject::tr("LSS"), QObject::tr("LST"), QObject::tr("LSU"),
QObject::tr("LSV"), QObject::tr("LSW")
};
static const QString multiposPots[] = {
QObject::tr("S11"), QObject::tr("S12"), QObject::tr("S13"), QObject::tr("S14"), QObject::tr("S15"), QObject::tr("S16"),
QObject::tr("S21"), QObject::tr("S22"), QObject::tr("S23"), QObject::tr("S24"), QObject::tr("S25"), QObject::tr("S26")
};
switch(type) {
case SWITCH_TYPE_SWITCH:
if (IS_TARANIS(GetEepromInterface()->getBoard()))
@ -366,6 +276,8 @@ QString RawSwitch::toString()
return index > 0 ? CHECK_IN_ARRAY(switches9X, index-1) : QString("!") + CHECK_IN_ARRAY(switches9X, -index-1);
case SWITCH_TYPE_VIRTUAL:
return index > 0 ? CHECK_IN_ARRAY(virtualSwitches, index-1) : QString("!") + CHECK_IN_ARRAY(virtualSwitches, -index-1);
case SWITCH_TYPE_MULTIPOS_POT:
return CHECK_IN_ARRAY(multiposPots, index);
case SWITCH_TYPE_ON:
return QObject::tr("ON");
case SWITCH_TYPE_ONM:

View file

@ -283,6 +283,30 @@ class ModelData;
QString AnalogString(int index);
QString RotaryEncoderString(int index);
class RawSourceRange
{
public:
RawSourceRange():
decimals(0),
min(0.0),
max(0.0),
step(1.0),
offset(0.0)
{
}
float getValue(int value) {
return min + float(value) * step;
}
int decimals;
double min;
double max;
double step;
double offset;
};
class RawSource {
public:
RawSource():
@ -313,17 +337,16 @@ class RawSource {
QString toString();
int getDecimals(const ModelData & Model);
double getMin(const ModelData & Model);
double getMax(const ModelData & Model);
double getStep(const ModelData & Model);
double getOffset(const ModelData & Model);
int getRawOffset(const ModelData & Model);
RawSourceRange getRange(bool singleprec=false);
bool operator == ( const RawSource & other) {
return (this->type == other.type) && (this->index == other.index);
}
bool operator != ( const RawSource & other) {
return (this->type != other.type) || (this->index != other.index);
}
RawSourceType type;
int index;
const ModelData * model;
@ -333,6 +356,7 @@ enum RawSwitchType {
SWITCH_TYPE_NONE,
SWITCH_TYPE_SWITCH,
SWITCH_TYPE_VIRTUAL,
SWITCH_TYPE_MULTIPOS_POT,
SWITCH_TYPE_MOMENT_SWITCH,
SWITCH_TYPE_MOMENT_VIRTUAL,
SWITCH_TYPE_ON,
@ -480,6 +504,7 @@ class GeneralSettings {
unsigned int mavbaud;
unsigned int switchUnlockStates;
unsigned int hw_uartMode;
unsigned int potsType[8];
};
class CurveReference {
@ -714,6 +739,14 @@ class FrSkyChannelData {
unsigned int multiplier;
FrSkyAlarmData alarms[2];
float getRatio() const
{
if (type==0 || type==1 || type==2)
return float(ratio << multiplier) / 10.0;
else
return ratio << multiplier;
}
void clear() { memset(this, 0, sizeof(FrSkyChannelData)); }
};
@ -982,11 +1015,10 @@ enum Capability {
GvarsAreNamed,
GvarsFlightPhases,
GvarsHaveSources,
GvarsAsSources,
GvarsName,
NoTelemetryProtocol,
TelemetryCSFields,
TelemetryColsCSFields,
TelemetryCustomScreens,
TelemetryCustomScreensFieldsPerLine,
TelemetryRSSIModel,
TelemetryAlarm,
TelemetryInternalAlarm,
@ -1022,7 +1054,9 @@ enum Capability {
EnhancedCurves,
TelemetryInternalAlarms,
HasFasOffset,
HasMahPersistent
HasMahPersistent,
MultiposPots,
MultiposPotsPositions
};
enum UseContext {

View file

@ -282,7 +282,6 @@ int Er9xInterface::getCapability(const Capability capability)
case Gvars:
return 7;
case GvarsHaveSources:
case GvarsAsSources:
return 1;
case GetThrSwitch:
return DSW_THR;

View file

@ -318,7 +318,6 @@ int Ersky9xInterface::getCapability(const Capability capability)
case MaxVolume:
return 23;
case GvarsHaveSources:
case GvarsAsSources:
return 1;
case TelemetryMaxMultiplier:
return 2;

View file

@ -77,6 +77,7 @@ inline int geteepromsize() {
#include "radio/src/targets/taranis/pulses_driver.cpp"
#include "radio/src/targets/taranis/rtc_driver.cpp"
#include "radio/src/targets/taranis/trainer_driver.cpp"
#include "radio/src/targets/taranis/uart3_driver.cpp"
#include "radio/src/protocols/pulses_arm.cpp"
#include "radio/src/stamp.cpp"
#include "radio/src/maths.cpp"

View file

@ -56,21 +56,29 @@ class SwitchesConversionTable: public ConversionTable {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
if (IS_TARANIS(board) && version >= 216) {
for (int i=0; i<2; i++) {
for (int j=0; j<6; j++) {
addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i*6+j), val++);
}
}
}
addConversion(RawSwitch(SWITCH_TYPE_OFF), -val);
addConversion(RawSwitch(SWITCH_TYPE_ON), val++);
for (int i=1; i<=MAX_SWITCHES_POSITION(board); i++) {
int s = switchIndex(i, board, version);
addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, -s), -val);
// addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, -s), -val);
addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, s), val++);
}
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, -i), -val);
// addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, -i), -val);
addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i), val++);
}
addConversion(RawSwitch(SWITCH_TYPE_ONM, 1 ), -val);
// addConversion(RawSwitch(SWITCH_TYPE_ONM, 1 ), -val);
addConversion(RawSwitch(SWITCH_TYPE_ONM, 0 ), val++);
addConversion(RawSwitch(SWITCH_TYPE_TRN, 0), val++);
addConversion(RawSwitch(SWITCH_TYPE_TRN, 1), val++);
@ -201,7 +209,7 @@ class SourcesConversionTable: public ConversionTable {
if (!(flags & FLAG_NOTELEMETRY)) {
if (release21March2013) {
if ((board != BOARD_STOCK && (board!=BOARD_M128 || version<215)) || (variant & GVARS_VARIANT)) {
for (int i=0; i<5; i++)
for (int i=0; i<MAX_GVARS(board, version); i++)
addConversion(RawSource(SOURCE_TYPE_GVAR, i), val++);
}
}
@ -2011,12 +2019,21 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
if (version >= 213 || (!IS_ARM(board) && version >= 212))
internalField.Append(new UnsignedField<16>(generalData.variant));
if (version >= 216) {
for (int i=0; i<inputsCount; i++) {
internalField.Append(new SignedField<16>(generalData.calibMid[i]));
internalField.Append(new SignedField<16>(generalData.calibSpanNeg[i]));
internalField.Append(new SignedField<16>(generalData.calibSpanPos[i]));
}
}
else {
for (int i=0; i<inputsCount; i++)
internalField.Append(new SignedField<16>(generalData.calibMid[i]));
for (int i=0; i<inputsCount; i++)
internalField.Append(new SignedField<16>(generalData.calibSpanNeg[i]));
for (int i=0; i<inputsCount; i++)
internalField.Append(new SignedField<16>(generalData.calibSpanPos[i]));
}
internalField.Append(new UnsignedField<16>(chkSum));
internalField.Append(new UnsignedField<8>(generalData.currModel));
@ -2110,8 +2127,11 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
internalField.Append(new SignedField<8>(generalData.varioVolume));
internalField.Append(new SignedField<8>(generalData.backgroundVolume));
}
if (version >= 216) {
if (IS_TARANIS(board) && version >= 216) {
internalField.Append(new UnsignedField<8>(generalData.hw_uartMode));
for (int i=0; i<8; i++) {
internalField.Append(new UnsignedField<1>(generalData.potsType[i]));
}
}
}
}

View file

@ -610,24 +610,12 @@ int Open9xInterface::getCapability(const Capability capability)
return TM_HASTELEMETRY|TM_HASOFFSET|TM_HASWSHH;
case TelemetryBars:
return 1;
case TelemetryCSFields:
if (IS_TARANIS(board)) {
return 36;
} else {
return IS_ARM(board) ? 24 : 16;
}
case TelemetryColsCSFields:
if (IS_TARANIS(board)) {
return 3;
} else {
return 2;
}
case TelemetryCustomScreens:
return IS_TARANIS(board) ? 3 : 2;
case TelemetryCustomScreensFieldsPerLine:
return IS_TARANIS(board) ? 3 : 2;
case NoTelemetryProtocol:
if (IS_TARANIS(board)) {
return 1;
} else {
return 0;
}
return IS_TARANIS(board) ? 1 : 0;
case TelemetryUnits:
return 0;
case TelemetryBlades:
@ -694,6 +682,10 @@ int Open9xInterface::getCapability(const Capability capability)
return (IS_STOCK(board) ? false : true);
case HasMahPersistent:
return (IS_ARM(board) ? true : false);
case MultiposPots:
return IS_TARANIS(board) ? 2 : 0;
case MultiposPotsPositions:
return IS_TARANIS(board) ? 6 : 0;
default:
return 0;
}

View file

@ -64,7 +64,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
}
this->layout()->removeItem(ui->TaranisReadOnlyUnlock);
}
} else {
}
else {
for (int i=0; pmsl[i]; i++) {
pmsl[i]->hide();
}
@ -373,6 +374,18 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
for (int i=0; tpmsld[i]; i++) {
connect(tpmsld[i], SIGNAL(valueChanged(int)),this,SLOT(unlockSwitchEdited()));
}
if (GetEepromInterface()->getCapability(MultiposPots)) {
ui->pot1Type->setCurrentIndex(g_eeGeneral.potsType[0]);
ui->pot2Type->setCurrentIndex(g_eeGeneral.potsType[1]);
}
else {
ui->potsTypeSeparator->hide();
ui->pot1Type->hide();
ui->pot1TypeLabel->hide();
ui->pot2Type->hide();
ui->pot2TypeLabel->hide();
}
}
GeneralEdit::~GeneralEdit()
@ -380,6 +393,18 @@ GeneralEdit::~GeneralEdit()
delete ui;
}
void GeneralEdit::on_pot1Type_currentIndexChanged(int index)
{
g_eeGeneral.potsType[0] = index;
updateSettings();
}
void GeneralEdit::on_pot2Type_currentIndexChanged(int index)
{
g_eeGeneral.potsType[1] = index;
updateSettings();
}
void GeneralEdit::unlockSwitchEdited()
{
int i=0;

View file

@ -119,6 +119,9 @@ private slots:
void on_varioVolume_SL_valueChanged();
void on_wavVolume_SL_valueChanged();
void on_pot1Type_currentIndexChanged(int index);
void on_pot2Type_currentIndexChanged(int index);
void on_stickmodeCB_currentIndexChanged(int index);
void on_channelorderCB_currentIndexChanged(int index);
void on_beeperCB_currentIndexChanged(int index);

View file

@ -110,7 +110,7 @@
These will be relevant for all models in the same EEPROM.</string>
</property>
<property name="currentIndex">
<number>0</number>
<number>3</number>
</property>
<widget class="QWidget" name="tabSetup">
<attribute name="title">
@ -3494,6 +3494,91 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="0" colspan="4">
<widget class="Line" name="potsTypeSeparator">
<property name="minimumSize">
<size>
<width>0</width>
<height>10</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QComboBox" name="pot1Type">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>Beeper volume
0 - Quiet. No beeps at all.
1 - No Keys. Normal beeps but menu keys do not beep.
2 - Normal.
3 - Loud.
4 - Extra loud.</string>
</property>
<item>
<property name="text">
<string>Pot (normal)</string>
</property>
</item>
<item>
<property name="text">
<string>Multipos Switch</string>
</property>
</item>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="pot1TypeLabel">
<property name="text">
<string>S1 Type</string>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QComboBox" name="pot2Type">
<property name="toolTip">
<string/>
</property>
<property name="statusTip">
<string/>
</property>
<property name="whatsThis">
<string>Beeper volume
0 - Quiet. No beeps at all.
1 - No Keys. Normal beeps but menu keys do not beep.
2 - Normal.
3 - Loud.
4 - Extra loud.</string>
</property>
<item>
<property name="text">
<string>Pot (normal)</string>
</property>
</item>
<item>
<property name="text">
<string>Multipos Switch</string>
</property>
</item>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="pot2TypeLabel">
<property name="text">
<string>S2 Type</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>

View file

@ -48,8 +48,8 @@ void populateGvSourceCB(QComboBox *b, int value)
void populateVoiceLangCB(QComboBox *b, QString language)
{
QString strings[] = { QObject::tr("English"), QObject::tr("French"), QObject::tr("Italian"), QObject::tr("German"), QObject::tr("Czech"), QObject::tr("Slovak"), QObject::tr("Spanish"), QObject::tr("Portuguese"), QObject::tr("Swedish"), NULL};
QString langcode[] = { "en", "fr", "it", "de", "cz", "sk", "es", "pt", "se", NULL};
QString strings[] = { QObject::tr("English"), QObject::tr("French"), QObject::tr("Italian"), QObject::tr("German"), QObject::tr("Czech"), QObject::tr("Slovak"), QObject::tr("Spanish"), QObject::tr("Polish"), QObject::tr("Portuguese"), QObject::tr("Swedish"), NULL};
QString langcode[] = { "en", "fr", "it", "de", "cz", "sk", "es", "pl", "pt", "se", NULL};
b->clear();
for (int i=0; strings[i]!=NULL; i++) {
@ -175,6 +175,7 @@ QString getFuncName(unsigned int val)
}
}
// TODO should be a toString() method in CustoSwData ...
QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model)
{
QString result = "";
@ -189,7 +190,8 @@ QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model)
result = QString("TIM(%1 , %2)").arg(ValToTim(customSw->val1)).arg(ValToTim(customSw->val2));
break;
case CS_FAMILY_VOFS: {
RawSource source = RawSource(customSw->val1);
RawSource source = RawSource(customSw->val1, &model);
RawSourceRange range = source.getRange();
if (customSw->val1)
result += source.toString();
else
@ -204,7 +206,7 @@ QString getCustomSwitchStr(CustomSwData * customSw, const ModelData & model)
result += " &gt; ";
else if (customSw->func == CS_FN_ANEG || customSw->func == CS_FN_VNEG)
result += " &lt; ";
result += QString::number(source.getStep(model) * (customSw->val2 + source.getRawOffset(model)) + source.getOffset(model));
result += QString::number(range.step * (customSw->val2 /*TODO+ source.getRawOffset(model)*/) + range.offset);
break;
}
case CS_FAMILY_VBOOL:
@ -840,6 +842,8 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
return;
}
#if 0
// TODO check ... I removed negative toggle switches in the FW, no?
if (attr & POPULATE_MSWITCHES) {
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ONM, 1);
@ -858,6 +862,7 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
#endif
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_OFF);
@ -903,6 +908,14 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
if (item == value) b->setCurrentIndex(b->count()-1);
}
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
for (int i=0; i<GetEepromInterface()->getCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i++) {
item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i);
b->addItem(item.toString(), item.toValue());
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ON);
b->addItem(item.toString(), item.toValue());
@ -1084,7 +1097,8 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
b->addItem(item.toString(), item.toValue());
if (item == source) b->setCurrentIndex(b->count()-1);
}
} else if (flags & POPULATE_TELEMETRY) {
}
else if (flags & POPULATE_TELEMETRY) {
for (int i=0; i<TELEMETRY_SOURCES_COUNT; i++) {
item = RawSource(SOURCE_TYPE_TELEMETRY, i);
b->addItem(item.toString(), item.toValue());
@ -1313,109 +1327,6 @@ QString getFrSkySrc(int index)
return RawSource(SOURCE_TYPE_TELEMETRY, index-1).toString();
}
/*
1,2) Timer1/Timer2 0:765
3,4) TX/RX
5) A1 range
6) A2 range
7) ALT 0-1020
8)RPM 0-12750
9FUEL 0-100%
10) T1 -30-225
11) T2 -30-225
12) spd 0-510
13) dist 0-2040
14)GAlt 0-1020
15) cell 0-5.1
16) Cels 0 25.5
17) Vfas 0 25.5
18) Curr 0 127.5
19) Cnsp 0 5100
20) Powr 0 1275
21) AccX 0 2.55
22) AccY 0 2.55
23) AccZ 0 2.55
24) Hdg 0 255
25) VSpd 0 2.55
26) A1- A1 range
27) A2- A2 range
28) Alt- 0 255
29) Alt+ 0 255
30) Rpm+ 0 255
31) T1+ 0 255 (s????)
32) T2+ 0 255 (e????)
33) Spd+ 0 255 (ILG???)
34) Dst+ 0 255 (v ????)
35) Cur+ 0 25.5 (A)
1.852
*/
float getBarValue(int barId, int value, FrSkyData *fd)
{
switch (barId-1) {
case TELEMETRY_SOURCE_TX_BATT:
return value/10.0;
case TELEMETRY_SOURCE_TIMER1:
case TELEMETRY_SOURCE_TIMER2:
return (3*value);
case TELEMETRY_SOURCE_RSSI_TX:
case TELEMETRY_SOURCE_RSSI_RX:
case TELEMETRY_SOURCE_FUEL:
return std::min(100, value);
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A1_MIN:
if (fd->channels[0].type==0)
return ((fd->channels[0].ratio*value/255.0)+fd->channels[0].offset)/10;
else
return ((fd->channels[0].ratio*value/255.0)+fd->channels[0].offset);
case TELEMETRY_SOURCE_A2:
case TELEMETRY_SOURCE_A2_MIN:
if (fd->channels[1].type==0)
return ((fd->channels[1].ratio*value/255.0)+fd->channels[1].offset)/10;
else
return ((fd->channels[1].ratio*value/255.0)+fd->channels[1].offset);
case TELEMETRY_SOURCE_ALT:
case TELEMETRY_SOURCE_GPS_ALT:
case TELEMETRY_SOURCE_ALT_MAX:
case TELEMETRY_SOURCE_ALT_MIN:
return (8*value)-500;
case TELEMETRY_SOURCE_RPM:
case TELEMETRY_SOURCE_RPM_MAX:
return value * 50;
case TELEMETRY_SOURCE_T1:
case TELEMETRY_SOURCE_T2:
case TELEMETRY_SOURCE_T1_MAX:
case TELEMETRY_SOURCE_T2_MAX:
return value - 30.0;
case TELEMETRY_SOURCE_CELL:
return value*2.0/100;
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
return value/10.0;
case TELEMETRY_SOURCE_HDG:
return std::min(359, value*2);
case TELEMETRY_SOURCE_DIST_MAX:
case TELEMETRY_SOURCE_DIST:
return value * 8;
case TELEMETRY_SOURCE_CURRENT_MAX:
case TELEMETRY_SOURCE_CURRENT:
return value/2.0;
case TELEMETRY_SOURCE_POWER:
return value*5;
case TELEMETRY_SOURCE_CONSUMPTION:
return value * 20;
case TELEMETRY_SOURCE_SPEED:
case TELEMETRY_SOURCE_SPEED_MAX:
if (fd->imperial==1)
return value;
else
return value*1.852;
default:
return value;
}
}
QString getTrimInc(ModelData * g_model)
{
switch (g_model->trimInc) {

View file

@ -137,7 +137,7 @@ QString getFrSkyUnits(int units);
QString getFrSkyProtocol(int protocol);
QString getFrSkyMeasure(int units);
QString getFrSkySrc(int index);
float getBarValue(int barId, int value, FrSkyData *fd);
float c9xexpou(float point, float coeff);
float ValToTim(int value);
int TimToVal(float value);

View file

@ -0,0 +1,10 @@
#!/bin/bash
for file in $(ls *png)
do
convert $file \( +clone \
-channel A -morphology EdgeOut Diamond +channel \
+level-colors black \
\) -compose DstOver -composite $file
done

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Before After
Before After

View file

@ -42,6 +42,7 @@ set(modeledit_UIS
setup_module.ui
flightmode.ui
telemetry_analog.ui
telemetry_customscreen.ui
)
foreach(name ${modeledit_NAMES})

View file

@ -146,31 +146,38 @@ void CustomSwitchesPanel::edited()
{
case (CS_FAMILY_VOFS):
if (model.customSw[i].val1 != cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt()) {
source=RawSource(model.customSw[i].val1);
source = RawSource(model.customSw[i].val1, &model);
model.customSw[i].val1 = cswitchSource1[i]->itemData(cswitchSource1[i]->currentIndex()).toInt();
RawSource newSource = RawSource(model.customSw[i].val1);
RawSource newSource = RawSource(model.customSw[i].val1, &model);
if (newSource.type == SOURCE_TYPE_TELEMETRY) {
if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].func<CS_FN_VEQUAL) {
model.customSw[i].val2 = 0;
} else {
}
else {
model.customSw[i].val2 = -128;
}
} else {
}
else {
RawSourceRange range = source.getRange();
if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].func<CS_FN_VEQUAL) {
model.customSw[i].val2 = (cswitchOffset[i]->value()/source.getStep(model));
} else {
model.customSw[i].val2 = ((cswitchOffset[i]->value()-source.getOffset(model))/source.getStep(model))-source.getRawOffset(model);
model.customSw[i].val2 = (cswitchOffset[i]->value() / range.step);
}
else {
model.customSw[i].val2 = (cswitchOffset[i]->value() - range.offset) / range.step/* TODO - source.getRawOffset(model)*/;
}
}
setSwitchWidgetVisibility(i);
} else {
source=RawSource(model.customSw[i].val1);
}
else {
source = RawSource(model.customSw[i].val1, &model);
RawSourceRange range = source.getRange();
if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].func<CS_FN_VEQUAL) {
model.customSw[i].val2 = (cswitchOffset[i]->value()/source.getStep(model));
cswitchOffset[i]->setValue(model.customSw[i].val2*source.getStep(model));
} else {
model.customSw[i].val2 = ((cswitchOffset[i]->value()-source.getOffset(model))/source.getStep(model))-source.getRawOffset(model);
cswitchOffset[i]->setValue((model.customSw[i].val2 +source.getRawOffset(model))*source.getStep(model)+source.getOffset(model));
model.customSw[i].val2 = (cswitchOffset[i]->value() / range.step);
cswitchOffset[i]->setValue(model.customSw[i].val2*range.step);
}
else {
model.customSw[i].val2 = ((cswitchOffset[i]->value()-range.offset)/range.step)/* TODO - source.getRawOffset(model)*/;
cswitchOffset[i]->setValue((model.customSw[i].val2 /* + TODO source.getRawOffset(model)*/)*range.step+range.offset);
}
}
break;
@ -246,7 +253,9 @@ void CustomSwitchesPanel::edited()
void CustomSwitchesPanel::setSwitchWidgetVisibility(int i)
{
RawSource source = RawSource(model.customSw[i].val1);
RawSource source = RawSource(model.customSw[i].val1, &model);
RawSourceRange range = source.getRange();
switch (getCSFunctionFamily(model.customSw[i].func))
{
case CS_FAMILY_VOFS:
@ -255,16 +264,16 @@ void CustomSwitchesPanel::setSwitchWidgetVisibility(int i)
cswitchValue[i]->setVisible(false);
cswitchOffset[i]->setVisible(true);
populateSourceCB(cswitchSource1[i], source, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_TRIMS | POPULATE_SWITCHES | POPULATE_TELEMETRY | (GetEepromInterface()->getCapability(GvarsInCS) ? POPULATE_GVARS : 0));
cswitchOffset[i]->setDecimals(source.getDecimals(model));
cswitchOffset[i]->setSingleStep(source.getStep(model));
cswitchOffset[i]->setDecimals(range.decimals);
cswitchOffset[i]->setSingleStep(range.step);
if (model.customSw[i].func>CS_FN_ELESS && model.customSw[i].func<CS_FN_VEQUAL) {
cswitchOffset[i]->setMinimum(source.getStep(model)*-127);
cswitchOffset[i]->setMaximum(source.getStep(model)*127);
cswitchOffset[i]->setValue(source.getStep(model)*model.customSw[i].val2);
cswitchOffset[i]->setMinimum(range.step*-127);
cswitchOffset[i]->setMaximum(range.step*127);
cswitchOffset[i]->setValue(range.step*model.customSw[i].val2);
} else {
cswitchOffset[i]->setMinimum(source.getMin(model));
cswitchOffset[i]->setMaximum(source.getMax(model));
cswitchOffset[i]->setValue(source.getStep(model)*(model.customSw[i].val2+source.getRawOffset(model))+source.getOffset(model));
cswitchOffset[i]->setMinimum(range.min);
cswitchOffset[i]->setMaximum(range.max);
cswitchOffset[i]->setValue(range.step*(model.customSw[i].val2/* TODO+source.getRawOffset(model)*/)+range.offset);
}
break;
case CS_FAMILY_VBOOL:

View file

@ -48,7 +48,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
ui->sideLabel->hide();
ui->sideCB->hide();
ui->inputName->setMaxLength(4);
populateSourceCB(ui->sourceCB, ed->srcRaw, model, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS | (GetEepromInterface()->getCapability(GvarsAsSources) ? POPULATE_GVARS : 0));
populateSourceCB(ui->sourceCB, ed->srcRaw, model, POPULATE_SOURCES | POPULATE_SWITCHES | POPULATE_TRIMS | POPULATE_TELEMETRY);
ui->sourceCB->removeItem(0);
}
else {
@ -56,8 +56,6 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
ui->inputName->hide();
ui->sourceLabel->hide();
ui->sourceCB->hide();
ui->scaleLabel->hide();
ui->scaleSB->hide();
ui->trimLabel->hide();
ui->trimCB->hide();
}
@ -83,10 +81,12 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, i
ui->lineName->setValidator(new QRegExpValidator(rx, this));
ui->lineName->setText(ed->name);
updateScale();
valuesChanged();
connect(ui->lineName, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
connect(ui->sourceCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
connect(ui->scale, SIGNAL(editingFinished()), this, SLOT(valuesChanged()));
connect(ui->trimCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
connect(ui->switchesCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
connect(ui->sideCB, SIGNAL(currentIndexChanged(int)), this, SLOT(valuesChanged()));
@ -103,15 +103,20 @@ ExpoDialog::~ExpoDialog()
delete ui;
}
void ExpoDialog::changeEvent(QEvent *e)
void ExpoDialog::updateScale()
{
QDialog::changeEvent(e);
switch (e->type()) {
case QEvent::LanguageChange:
ui->retranslateUi(this);
break;
default:
break;
if (GetEepromInterface()->getCapability(VirtualInputs) && ed->srcRaw.type == SOURCE_TYPE_TELEMETRY) {
RawSourceRange range = ed->srcRaw.getRange();
ui->scaleLabel->show();
ui->scale->show();
ui->scale->setDecimals(range.decimals);
ui->scale->setMinimum(range.min);
ui->scale->setMaximum(range.max);
ui->scale->setValue(round(range.step * ed->scale));
}
else {
ui->scaleLabel->hide();
ui->scale->hide();
}
}
@ -119,7 +124,14 @@ void ExpoDialog::valuesChanged()
{
QCheckBox * cb_fp[] = {ui->cb_FP0,ui->cb_FP1,ui->cb_FP2,ui->cb_FP3,ui->cb_FP4,ui->cb_FP5,ui->cb_FP6,ui->cb_FP7,ui->cb_FP8 };
ed->srcRaw = RawSource(ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt());
RawSource srcRaw = RawSource(ui->sourceCB->itemData(ui->sourceCB->currentIndex()).toInt());
if (ed->srcRaw != srcRaw) {
ed->srcRaw = srcRaw;
updateScale();
}
RawSourceRange range = srcRaw.getRange();
ed->scale = round(float(ui->scale->value()) / range.step);
ed->carryTrim = 1 - ui->trimCB->currentIndex();
ed->swtch = RawSwitch(ui->switchesCB->itemData(ui->switchesCB->currentIndex()).toInt());
ed->mode = ui->sideCB->currentIndex() + 1;

View file

@ -18,7 +18,7 @@ class ExpoDialog : public QDialog {
~ExpoDialog();
protected:
void changeEvent(QEvent *e);
void updateScale();
private slots:
void valuesChanged();

View file

@ -330,7 +330,7 @@ If blank then the input is considered to be &quot;ON&quot; all the time.</string
</spacer>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="scaleSB">
<widget class="QDoubleSpinBox" name="scale">
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
@ -441,6 +441,32 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</widget>
<tabstops>
<tabstop>inputName</tabstop>
<tabstop>lineName</tabstop>
<tabstop>sourceCB</tabstop>
<tabstop>scale</tabstop>
<tabstop>trimCB</tabstop>
<tabstop>weightGV</tabstop>
<tabstop>weightSB</tabstop>
<tabstop>weightCB</tabstop>
<tabstop>curveTypeCB</tabstop>
<tabstop>curveGVarCB</tabstop>
<tabstop>curveValueCB</tabstop>
<tabstop>curveValueSB</tabstop>
<tabstop>cb_FP0</tabstop>
<tabstop>cb_FP1</tabstop>
<tabstop>cb_FP2</tabstop>
<tabstop>cb_FP3</tabstop>
<tabstop>cb_FP4</tabstop>
<tabstop>cb_FP5</tabstop>
<tabstop>cb_FP6</tabstop>
<tabstop>cb_FP7</tabstop>
<tabstop>cb_FP8</tabstop>
<tabstop>switchesCB</tabstop>
<tabstop>sideCB</tabstop>
<tabstop>buttonBox</tabstop>
</tabstops>
<resources>
<include location="../companion.qrc"/>
</resources>

View file

@ -20,7 +20,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, i
else
this->setWindowTitle(tr("DEST -> CH%1%2").arg(md->destCh/10).arg(md->destCh%10));
populateSourceCB(ui->sourceCB, md->srcRaw, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS | (GetEepromInterface()->getCapability(GvarsAsSources) ? POPULATE_GVARS : 0));
populateSourceCB(ui->sourceCB, md->srcRaw, model, POPULATE_SOURCES | POPULATE_VIRTUAL_INPUTS | POPULATE_SWITCHES | POPULATE_TRIMS);
ui->sourceCB->removeItem(0);
int limit = GetEepromInterface()->getCapability(OffsetWeight);

View file

@ -1,6 +1,7 @@
#include "telemetry.h"
#include "ui_telemetry.h"
#include "ui_telemetry_analog.h"
#include "ui_telemetry_customscreen.h"
#include "helpers.h"
TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
@ -11,15 +12,13 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
{
ui->setupUi(this);
float ratio;
float ratio = analog.getRatio();
if (analog.type==0 || analog.type==1 || analog.type==2) {
ratio = (analog.ratio<<analog.multiplier)/10.0;
ui->RatioSB->setDecimals(1);
ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
}
else {
ratio = analog.ratio<<analog.multiplier;
ui->RatioSB->setDecimals(0);
ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
}
@ -44,56 +43,33 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
void TelemetryAnalog::update()
{
float ratio, alarm1value, alarm2value;
if (analog.ratio==0) {
ui->alarm1ValueSB->setMinimum(0);
ui->alarm1ValueSB->setMaximum(0);
ui->alarm2ValueSB->setMinimum(0);
ui->alarm2ValueSB->setMaximum(0);
ui->CalibSB->setMinimum(0);
ui->CalibSB->setMaximum(0);
ui->CalibSB->setValue(0);
ui->alarm1ValueSB->setValue(0);
ui->alarm2ValueSB->setValue(0);
return;
}
float ratio = analog.getRatio();
float step = ratio / 255;
float mini = (ratio * analog.offset) / 255;
float maxi = mini + ratio;
if (analog.type==0 || analog.type==1 || analog.type==2) {
ratio=(analog.ratio<<analog.multiplier)/10.0;
ui->alarm1ValueSB->setDecimals(2);
ui->alarm1ValueSB->setSingleStep(ratio/255.0);
ui->alarm1ValueSB->setSingleStep(step);
ui->alarm1ValueSB->setMinimum(mini);
ui->alarm1ValueSB->setMaximum(maxi);
ui->alarm1ValueSB->setValue(mini + step*analog.alarms[0].value);
ui->alarm2ValueSB->setDecimals(2);
ui->alarm2ValueSB->setSingleStep(ratio/255.0);
ui->alarm1ValueSB->setMinimum((analog.ratio*1.0*analog.offset)/2550.0);
ui->alarm1ValueSB->setMaximum(ratio+(analog.ratio*1.0*analog.offset)/2550.0);
ui->alarm2ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/2550.0);
ui->alarm2ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/2550.0);
}
else {
ratio=analog.ratio<<analog.multiplier;
ui->alarm1ValueSB->setDecimals(2);
ui->alarm1ValueSB->setSingleStep(ratio/255.0);
ui->alarm2ValueSB->setDecimals(2);
ui->alarm2ValueSB->setSingleStep(ratio/255.0);
ui->alarm1ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/255.0);
ui->alarm1ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/255.0);
ui->alarm2ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/255.0);
ui->alarm2ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/255.0);
}
ui->alarm2ValueSB->setSingleStep(step);
ui->alarm2ValueSB->setMinimum(mini);
ui->alarm2ValueSB->setMaximum(maxi);
ui->alarm2ValueSB->setValue(mini + step*analog.alarms[1].value);
ui->CalibSB->setDecimals(2);
ui->CalibSB->setMaximum((ratio*127)/255.0);
ui->CalibSB->setMinimum((-ratio*128)/255.0);
ui->CalibSB->setSingleStep(ratio/255.0);
ui->CalibSB->setValue((analog.offset*ratio)/255);
alarm1value=ratio*(analog.alarms[0].value/255.0+analog.offset/255.0);
alarm2value=ratio*(analog.alarms[1].value/255.0+analog.offset/255.0);;
ui->alarm1ValueSB->setValue(alarm1value);
ui->alarm2ValueSB->setValue(alarm2value);
ui->CalibSB->setMaximum(step*127);
ui->CalibSB->setMinimum(-step*128);
ui->CalibSB->setSingleStep(step);
ui->CalibSB->setValue(mini);
}
void TelemetryAnalog::on_UnitCB_currentIndexChanged(int index)
{
float ratio;
float ratio = analog.getRatio();
analog.type = index;
switch (index) {
case 0:
@ -101,12 +77,10 @@ void TelemetryAnalog::on_UnitCB_currentIndexChanged(int index)
case 2:
ui->RatioSB->setDecimals(1);
ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
ratio=(analog.ratio<<analog.multiplier)/10.0;
break;
default:
ui->RatioSB->setDecimals(0);
ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
ratio=(analog.ratio<<analog.multiplier);
break;
}
ui->RatioSB->setValue(ratio);
@ -139,15 +113,17 @@ void TelemetryAnalog::on_RatioSB_valueChanged()
void TelemetryAnalog::on_RatioSB_editingFinished()
{
if (!lock) {
float ratio, calib, alarm1value,alarm2value;
if (lock) return;
if (analog.type==0 || analog.type==1 || analog.type==2) {
analog.multiplier = findmult(ui->RatioSB->value(), 25.5);
ui->CalibSB->setSingleStep((1<<analog.multiplier)/10.0);
ui->alarm1ValueSB->setSingleStep((1<<analog.multiplier)/10.0);
ui->alarm2ValueSB->setSingleStep((1<<analog.multiplier)/10.0);
analog.ratio = ((int)(round(ui->RatioSB->value()*10))/(1 <<analog.multiplier));
} else {
}
else {
analog.multiplier = findmult(ui->RatioSB->value(), 255);
ui->CalibSB->setSingleStep(1<<analog.multiplier);
ui->alarm1ValueSB->setSingleStep(1<<analog.multiplier);
@ -171,7 +147,8 @@ void TelemetryAnalog::on_RatioSB_editingFinished()
if (calib>0) {
if (calib>((ratio*127)/255)) {
analog.offset=127;
} else {
}
else {
analog.offset=round(calib*255/ratio);
}
}
@ -185,18 +162,15 @@ void TelemetryAnalog::on_RatioSB_editingFinished()
analog.alarms[0].value=round((alarm1value*255-analog.offset*(analog.ratio<<analog.multiplier))/(analog.ratio<<analog.multiplier));
analog.alarms[1].value=round((alarm2value*255-analog.offset*(analog.ratio<<analog.multiplier))/(analog.ratio<<analog.multiplier));
update();
// TODO ? telBarUpdate();
emit modified();
}
}
void TelemetryAnalog::on_CalibSB_editingFinished()
{
float ratio,calib,alarm1value,alarm2value;
if (analog.type==0 || analog.type==1 || analog.type==2) {
ratio=(analog.ratio<<analog.multiplier)/10.0;
} else {
ratio=analog.ratio<<analog.multiplier;
}
float ratio = analog.getRatio();
float calib,alarm1value,alarm2value;
if (ratio!=0) {
analog.offset = round((255*ui->CalibSB->value()/ratio));
calib=ratio*analog.offset/255.0;
@ -204,7 +178,8 @@ void TelemetryAnalog::on_CalibSB_editingFinished()
alarm2value=ui->alarm2ValueSB->value();
if (alarm1value<calib) {
alarm1value=calib;
} else if (alarm1value>(ratio+calib)) {
}
else if (alarm1value>(ratio+calib)) {
alarm1value=ratio+calib;
}
if (alarm2value<calib) {
@ -220,7 +195,6 @@ void TelemetryAnalog::on_CalibSB_editingFinished()
analog.alarms[1].value=0;
}
update();
// TODO ? telBarUpdate();
emit modified();
}
@ -239,18 +213,19 @@ void TelemetryAnalog::on_alarm1GreaterCB_currentIndexChanged(int index)
void TelemetryAnalog::on_alarm1ValueSB_editingFinished()
{
float ratio, calib, alarm1value;
ratio=analog.ratio<<analog.multiplier;
float ratio = analog.getRatio();
float calib, alarm1value;
calib=analog.offset;
alarm1value=ui->alarm1ValueSB->value();
if (analog.type==0) {
ratio/=10;
}
if (alarm1value<((calib*ratio)/255)) {
analog.alarms[0].value=0;
} else if (alarm1value>(ratio+(calib*ratio)/255)) {
}
else if (alarm1value>(ratio+(calib*ratio)/255)) {
analog.alarms[0].value=255;
} else {
}
else {
analog.alarms[0].value = round((alarm1value-((calib*ratio)/255))/ratio*255);
}
update();
@ -271,16 +246,14 @@ void TelemetryAnalog::on_alarm2GreaterCB_currentIndexChanged(int index)
void TelemetryAnalog::on_alarm2ValueSB_editingFinished()
{
float ratio, calib, alarm2value;
ratio = analog.ratio<<analog.multiplier;
float calib, alarm2value;
float ratio = analog.getRatio();
calib = analog.offset;
alarm2value = ui->alarm2ValueSB->value();
if (analog.type==0) {
ratio/=10;
}
if (alarm2value<((calib*ratio)/255)) {
analog.alarms[1].value=0;
} else if (alarm2value>(ratio+(calib*ratio)/255)) {
}
else if (alarm2value>(ratio+(calib*ratio)/255)) {
analog.alarms[1].value=255;
} else {
analog.alarms[1].value = round((alarm2value-((calib*ratio)/255))/ratio*255);
@ -296,41 +269,182 @@ TelemetryAnalog::~TelemetryAnalog()
/******************************************************/
TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model, FrSkyScreenData & screen):
ModelPanel(parent, model),
ui(new Ui::TelemetryCustomScreen),
screen(screen)
{
ui->setupUi(this);
for (int l=0; l<4; l++) {
for (int c=0; c<GetEepromInterface()->getCapability(TelemetryCustomScreensFieldsPerLine); c++) {
fieldsCB[l][c] = new QComboBox(this);
fieldsCB[l][c]->setProperty("index", c + (l<<8));
populateCustomScreenFieldCB(fieldsCB[l][c], screen.body.lines[l].source[c], (l<4), model.frsky.usrProto);
ui->screenNumsLayout->addWidget(fieldsCB[l][c], l, c, 1, 1);
connect(fieldsCB[l][c], SIGNAL(currentIndexChanged(int)), this, SLOT(customFieldChanged(int)));
}
}
for (int l=0; l<4; l++) {
barsCB[l] = new QComboBox(this);
barsCB[l]->setProperty("index", l);
populateCustomScreenFieldCB(barsCB[l], screen.body.bars[l].source, false, model.frsky.usrProto);
connect(barsCB[l], SIGNAL(currentIndexChanged(int)), this, SLOT(barSourceChanged(int)));
ui->screenBarsLayout->addWidget(barsCB[l], l, 0, 1, 1);
minSB[l] = new QDoubleSpinBox(this);
minSB[l]->setProperty("index", l);
connect(minSB[l], SIGNAL(valueChanged(double)), this, SLOT(barMinChanged(double)));
ui->screenBarsLayout->addWidget(minSB[l], l, 1, 1, 1);
QLabel * label = new QLabel(this);
label->setAutoFillBackground(false);
label->setStyleSheet(QString::fromUtf8("Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)\n"""));
label->setFrameShape(QFrame::Panel);
label->setFrameShadow(QFrame::Raised);
label->setAlignment(Qt::AlignCenter);
ui->screenBarsLayout->addWidget(label, l, 2, 1, 1);
maxSB[l] = new QDoubleSpinBox(this);
maxSB[l]->setProperty("index", l);
connect(maxSB[l], SIGNAL(valueChanged(double)), this, SLOT(barMaxChanged(double)));
ui->screenBarsLayout->addWidget(maxSB[l], l, 3, 1, 1);
}
update();
}
TelemetryCustomScreen::~TelemetryCustomScreen()
{
delete ui;
}
void TelemetryCustomScreen::update()
{
lock = true;
ui->screenType->setCurrentIndex(screen.type);
ui->screenNums->setVisible(screen.type == 0);
ui->screenBars->setVisible(screen.type != 0);
if (screen.type == 0) {
for (int l=0; l<4; l++) {
for (int c=0; c<GetEepromInterface()->getCapability(TelemetryCustomScreensFieldsPerLine); c++) {
fieldsCB[l][c]->setCurrentIndex(screen.body.lines[l].source[c]);
}
}
}
else {
for (int i=0; i<4; i++) {
updateBar(i);
}
}
lock = false;
}
void TelemetryCustomScreen::updateBar(int line)
{
int index = screen.body.bars[line].source;
barsCB[line]->setCurrentIndex(index);
if (index) {
RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, index-1, &model);
RawSourceRange range = source.getRange(true);
int max = round((range.max - range.min) / range.step);
if (255-screen.body.bars[line].barMax > max)
screen.body.bars[line].barMax = 255 - max;
minSB[line]->setEnabled(true);
minSB[line]->setDecimals(range.decimals);
minSB[line]->setMinimum(range.min);
minSB[line]->setMaximum(range.max);
minSB[line]->setSingleStep(range.step);
minSB[line]->setValue(range.getValue(screen.body.bars[line].barMin));
maxSB[line]->setEnabled(true);
maxSB[line]->setDecimals(range.decimals);
maxSB[line]->setMinimum(range.min);
maxSB[line]->setMaximum(range.max);
maxSB[line]->setSingleStep(range.step);
maxSB[line]->setValue(range.getValue(255 - screen.body.bars[line].barMax));
}
else {
minSB[line]->setDisabled(true);
maxSB[line]->setDisabled(true);
}
}
void TelemetryCustomScreen::on_screenType_currentIndexChanged(int index)
{
if (!lock) {
memset(&screen.body, 0, sizeof(screen.body));
screen.type = index;
update();
emit modified();
}
}
void TelemetryCustomScreen::customFieldChanged(int value)
{
int index = sender()->property("index").toInt();
screen.body.lines[index/256].source[index%256] = value;
emit modified();
}
void TelemetryCustomScreen::barSourceChanged(int index)
{
QComboBox * cb = qobject_cast<QComboBox*>(sender());
int line = cb->property("index").toInt();
screen.body.bars[line].source = index;
screen.body.bars[line].barMin = 0;
screen.body.bars[line].barMax = 0;
updateBar(line);
emit modified();
}
void TelemetryCustomScreen::barMinChanged(double value)
{
if (!lock) {
int line = sender()->property("index").toInt();
screen.body.bars[line].barMin = round((value-minSB[line]->minimum()) / minSB[line]->singleStep());
// TODO set min (maxSB)
emit modified();
}
}
void TelemetryCustomScreen::barMaxChanged(double value)
{
if (!lock) {
int line = sender()->property("index").toInt();
screen.body.bars[line].barMax = 255 - round((value-minSB[line]->minimum()) / maxSB[line]->singleStep());
// TODO set max (minSB)
emit modified();
}
}
/******************************************************/
TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model):
ModelPanel(parent, model),
ui(new Ui::Telemetry)
{
ui->setupUi(this);
if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) {
model.frsky.usrProto = 1;
}
analogs[0] = new TelemetryAnalog(this, model.frsky.channels[0]);
ui->A1Layout->addWidget(analogs[0]);
connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified()));
analogs[1] = new TelemetryAnalog(this, model.frsky.channels[1]);
ui->A2Layout->addWidget(analogs[1]);
connect(analogs[1], SIGNAL(modified()), this, SLOT(onAnalogModified()));
QGroupBox* barsgb[3] = { ui->CS1Bars, ui->CS2Bars, ui->CS3Bars };
QGroupBox* numsgb[3] = { ui->CS1Nums, ui->CS2Nums, ui->CS3Nums };
QComboBox* barscb[12] = { ui->telBarCS1B1_CB, ui->telBarCS1B2_CB, ui->telBarCS1B3_CB, ui->telBarCS1B4_CB,
ui->telBarCS2B1_CB, ui->telBarCS2B2_CB, ui->telBarCS2B3_CB, ui->telBarCS2B4_CB,
ui->telBarCS3B1_CB, ui->telBarCS3B2_CB, ui->telBarCS3B3_CB, ui->telBarCS3B4_CB};
QDoubleSpinBox* minSB[12] = { ui->telMinCS1SB1, ui->telMinCS1SB2, ui->telMinCS1SB3, ui->telMinCS1SB4,
ui->telMinCS2SB1, ui->telMinCS2SB2, ui->telMinCS2SB3, ui->telMinCS2SB4,
ui->telMinCS3SB1, ui->telMinCS3SB2, ui->telMinCS3SB3, ui->telMinCS3SB4};
QDoubleSpinBox* maxSB[12] = { ui->telMaxCS1SB1, ui->telMaxCS1SB2, ui->telMaxCS1SB3, ui->telMaxCS1SB4,
ui->telMaxCS2SB1, ui->telMaxCS2SB2, ui->telMaxCS2SB3, ui->telMaxCS2SB4,
ui->telMaxCS3SB1, ui->telMaxCS3SB2, ui->telMaxCS3SB3, ui->telMaxCS3SB4};
QComboBox* tmp[36] = { ui->telemetryCS1F1_CB, ui->telemetryCS1F2_CB, ui->telemetryCS1F3_CB, ui->telemetryCS1F4_CB, ui->telemetryCS1F5_CB, ui->telemetryCS1F6_CB, ui->telemetryCS1F7_CB, ui->telemetryCS1F8_CB, ui->telemetryCS1F9_CB, ui->telemetryCS1F10_CB, ui->telemetryCS1F11_CB, ui->telemetryCS1F12_CB,
ui->telemetryCS2F1_CB, ui->telemetryCS2F2_CB, ui->telemetryCS2F3_CB, ui->telemetryCS2F4_CB, ui->telemetryCS2F5_CB, ui->telemetryCS2F6_CB, ui->telemetryCS2F7_CB, ui->telemetryCS2F8_CB, ui->telemetryCS2F9_CB, ui->telemetryCS2F10_CB, ui->telemetryCS2F11_CB, ui->telemetryCS2F12_CB,
ui->telemetryCS3F1_CB, ui->telemetryCS3F2_CB, ui->telemetryCS3F3_CB, ui->telemetryCS3F4_CB, ui->telemetryCS3F5_CB, ui->telemetryCS3F6_CB, ui->telemetryCS3F7_CB, ui->telemetryCS3F8_CB, ui->telemetryCS3F9_CB, ui->telemetryCS3F10_CB, ui->telemetryCS3F11_CB, ui->telemetryCS3F12_CB};
memcpy(barsGB, barsgb, sizeof(barsGB));
memcpy(numsGB, numsgb, sizeof(numsGB));
memcpy(barsCB, barscb, sizeof(barsCB));
memcpy(this->maxSB, maxSB, sizeof(this->maxSB));
memcpy(this->minSB, minSB, sizeof(this->minSB));
memcpy(csf, tmp, sizeof(csf));
for (int i=0; i<GetEepromInterface()->getCapability(TelemetryCustomScreens); i++) {
TelemetryCustomScreen * tab = new TelemetryCustomScreen(this, model, model.frsky.screens[i]);
ui->customScreens->addTab(tab, tr("Telemetry screen %1").arg(i+1));
}
setup();
}
@ -346,19 +460,6 @@ void TelemetryPanel::setup()
QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString();
lock=true;
ui->telemetryCSType1->setCurrentIndex(model.frsky.screens[0].type);
ui->telemetryCSType2->setCurrentIndex(model.frsky.screens[1].type);
ui->telemetryCSType3->setCurrentIndex(model.frsky.screens[2].type);
for (int i=0; i<3; i++) {
bool isNum = (model.frsky.screens[i].type==0);
barsGB[i]->setVisible(!isNum);
numsGB[i]->setVisible(isNum);
}
connect(ui->telemetryCSType1,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int)));
connect(ui->telemetryCSType2,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int)));
connect(ui->telemetryCSType3,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int)));
//frsky Settings
if (!GetEepromInterface()->getCapability(TelemetryRSSIModel) ) {
@ -397,7 +498,8 @@ void TelemetryPanel::setup()
ui->VarioLabel_4->hide();
ui->varioSourceCB->hide();
ui->varioSource_label->hide();
} else {
}
else {
if (!GetEepromInterface()->getCapability(HasVarioSink)) {
ui->varioLimitMinOff_ChkB->hide();
ui->varioLimitMin_DSB->hide();
@ -431,44 +533,12 @@ void TelemetryPanel::setup()
if (!(GetEepromInterface()->getCapability(HasAltitudeSel)||GetEepromInterface()->getCapability(HasVario))) {
ui->altimetryGB->hide();
}
if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) {
model.frsky.usrProto=1;
ui->frskyProtoCB->setDisabled(true);
} else {
ui->frskyProtoCB->setEnabled(true);
}
if (GetEepromInterface()->getCapability(TelemetryCSFields)==0) {
ui->groupBox_5->hide();
} else {
if (GetEepromInterface()->getCapability(TelemetryCSFields)==8) {
ui->tabCsView->removeTab(1);
ui->tabCsView->removeTab(2);
}
if (GetEepromInterface()->getCapability(TelemetryCSFields)==16) {
ui->tabCsView->removeTab(2);
}
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
for (int screen=0; screen<(GetEepromInterface()->getCapability(TelemetryCSFields)/(4*cols)); screen++) {
for (int c=0; c<cols; c++) {
for (int r=0; r<4; r++) {
int index=screen*12+c*4+r;
if (model.frsky.screens[screen].type==0) {
populateCustomScreenFieldCB(csf[index], model.frsky.screens[screen].body.lines[r].source[c], (r<4), model.frsky.usrProto);
} else {
populateCustomScreenFieldCB(csf[index], 0, (r<4), model.frsky.usrProto);
}
connect(csf[index], SIGNAL(currentIndexChanged(int)), this, SLOT(customFieldEdited()));
}
}
for (int c=cols; c<3; c++) {
for (int r=0; r<4; r++) {
int index=screen*12+c*4+r;
csf[index]->hide();
}
}
if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) {
ui->frskyProtoCB->setDisabled(true);
}
else {
ui->frskyProtoCB->setEnabled(true);
}
if (!GetEepromInterface()->getCapability(TelemetryUnits)) {
@ -479,9 +549,11 @@ void TelemetryPanel::setup()
}
ui->frskyUnitsCB->setCurrentIndex(index);
}
if ((GetEepromInterface()->getCapability(Telemetry)&TM_HASWSHH)) {
ui->frskyProtoCB->addItem(tr("Winged Shadow How High"));
} else {
}
else {
ui->frskyProtoCB->addItem(tr("Winged Shadow How High (not supported)"));
}
@ -517,57 +589,6 @@ void TelemetryPanel::setup()
ui->frskyCurrentCB->setCurrentIndex(model.frsky.currentSource);
ui->frskyVoltCB->setCurrentIndex(model.frsky.voltsSource);
for (int screen=0; screen<2;screen++) {
for (int rows=0; rows<4; rows++) {
for (int cols=0; cols<3; cols++) {
int index=screen*12+cols*4+rows;
populateCustomScreenFieldCB(csf[index], model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), model.frsky.usrProto);
}
}
}
for (int j=0; j<12; j++) {
int screen = j/4;
int field = j%4;
populateCustomScreenFieldCB(barsCB[j], model.frsky.screens[screen].body.bars[field].source, false, model.frsky.usrProto);
switch (model.frsky.screens[screen].body.bars[field].source-1) {
case TELEMETRY_SOURCE_TX_BATT:
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A1_MIN:
case TELEMETRY_SOURCE_A2:
case TELEMETRY_SOURCE_A2_MIN:
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
case TELEMETRY_SOURCE_CURRENT_MAX:
case TELEMETRY_SOURCE_CURRENT:
minSB[j]->setDecimals(1);
maxSB[j]->setDecimals(1);
break;
case TELEMETRY_SOURCE_CELL:
minSB[j]->setDecimals(2);
maxSB[j]->setDecimals(2);
break;
default:
minSB[j]->setDecimals(0);
maxSB[j]->setDecimals(0);
}
minSB[j]->setMinimum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 0, &model.frsky));
minSB[j]->setMaximum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 255, &model.frsky));
minSB[j]->setSingleStep(getBarStep(model.frsky.screens[screen].body.bars[field].source));
minSB[j]->setValue(getBarValue(model.frsky.screens[screen].body.bars[field].source, model.frsky.screens[screen].body.bars[field].barMin, &model.frsky));
maxSB[j]->setMinimum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 0, &model.frsky));
maxSB[j]->setMaximum(getBarValue(model.frsky.screens[screen].body.bars[field].source, 255, &model.frsky));
maxSB[j]->setSingleStep(getBarStep(model.frsky.screens[screen].body.bars[field].source));
maxSB[j]->setValue(getBarValue(model.frsky.screens[screen].body.bars[field].source, (255-model.frsky.screens[screen].body.bars[field].barMax), &model.frsky));
if (model.frsky.screens[screen].body.bars[field].source==0 || model.frsky.screens[screen].type==0) {
minSB[j]->setDisabled(true);
maxSB[j]->setDisabled(true);
}
connect(barsCB[j],SIGNAL(currentIndexChanged(int)),this,SLOT(telBarCBcurrentIndexChanged(int)));
connect(maxSB[j],SIGNAL(editingFinished()),this,SLOT(telMaxSBeditingFinished()));
connect(minSB[j],SIGNAL(editingFinished()),this,SLOT(telMinSBeditingFinished()));
}
lock=false;
}
@ -602,80 +623,36 @@ void TelemetryPanel::on_frskyVoltCB_currentIndexChanged(int index)
void TelemetryPanel::on_frskyProtoCB_currentIndexChanged(int index)
{
if (lock) return;
int bindex[12];
lock=true;
for (int i=0; i<12; i++) {
bindex[i]=barsCB[i]->currentIndex();
model.frsky.usrProto = index;
populateCustomScreenFieldCB(barsCB[i], bindex[i], false, model.frsky.usrProto);
}
if (!GetEepromInterface()->getCapability(TelemetryCSFields)) {
ui->groupBox_5->hide();
} else {
for (int screen=0; screen<2;screen++) {
for (int rows=0; rows<4; rows++) {
for (int cols=0; cols<3; cols++) {
int index=screen*12+cols*4+rows;
populateCustomScreenFieldCB(csf[index], model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), model.frsky.usrProto);
}
}
}
}
lock=false;
if (index==0) {
for (int i=0; i<12; i++) {
if (bindex[i]>2) {
barsCB[i]->setCurrentIndex(0);
} else {
barsCB[i]->setCurrentIndex(bindex[i]);
}
}
} else if (index==2) {
for (int i=0; i<12; i++) {
if (bindex[i]>3) {
barsCB[i]->setCurrentIndex(0);
} else {
barsCB[i]->setCurrentIndex(bindex[i]);
}
}
} else {
for (int i=0; i<12; i++) {
barsCB[i]->setCurrentIndex(bindex[i]);
}
}
emit modified();
}
void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index) {
if (lock) return;
void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index)
{
model.frsky.rssiAlarms[0].level = index;
emit modified();
}
void TelemetryPanel::on_rssiAlarm2CB_currentIndexChanged(int index) {
if (lock) return;
void TelemetryPanel::on_rssiAlarm2CB_currentIndexChanged(int index)
{
model.frsky.rssiAlarms[1].level = index;
emit modified();
}
void TelemetryPanel::on_rssiAlarm1SB_editingFinished()
{
if (lock) return;
model.frsky.rssiAlarms[0].value=(ui->rssiAlarm1SB->value());
model.frsky.rssiAlarms[0].value = ui->rssiAlarm1SB->value();
emit modified();
}
void TelemetryPanel::on_rssiAlarm2SB_editingFinished()
{
if (lock) return;
model.frsky.rssiAlarms[1].value=(ui->rssiAlarm2SB->value());
model.frsky.rssiAlarms[1].value = ui->rssiAlarm2SB->value();
emit modified();
}
void TelemetryPanel::on_AltitudeGPS_ChkB_toggled(bool checked)
{
if (lock) return;
model.frsky.FrSkyGpsAlt = checked;
emit modified();
}
@ -688,60 +665,61 @@ void TelemetryPanel::on_AltitudeToolbar_ChkB_toggled(bool checked)
void TelemetryPanel::on_varioSourceCB_currentIndexChanged(int index)
{
if (lock) return;
model.frsky.varioSource = index;
emit modified();
}
void TelemetryPanel::on_varioLimitMin_DSB_editingFinished()
{
if (lock) return;
model.frsky.varioMin = round(ui->varioLimitMin_DSB->value()+10);
emit modified();
}
void TelemetryPanel::on_varioLimitMax_DSB_editingFinished()
{
if (lock) return;
model.frsky.varioMax = round(ui->varioLimitMax_DSB->value()-10);
emit modified();
}
void TelemetryPanel::on_varioLimitCenterMin_DSB_editingFinished()
{
if (lock) return;
if (!lock) {
if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) {
ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value());
}
model.frsky.varioCenterMin = round((ui->varioLimitCenterMin_DSB->value()+0.5)*10);
emit modified();
}
}
void TelemetryPanel::on_varioLimitMinOff_ChkB_toggled(bool checked)
{
if (lock) return;
if (!lock) {
model.frsky.varioCenterMin = -16;
if (!checked) {
lock=true;
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setEnabled(true);
lock=false;
} else {
}
else {
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setDisabled(true);
}
emit modified();
}
}
void TelemetryPanel::on_varioLimitCenterMax_DSB_editingFinished()
{
if (lock) return;
if (!lock) {
if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) {
ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value());
}
model.frsky.varioCenterMax = round((ui->varioLimitCenterMax_DSB->value()-0.5)*10);
emit modified();
}
}
void TelemetryPanel::on_fasOffset_DSB_editingFinished()
{
@ -761,226 +739,3 @@ void TelemetryPanel::on_mahCount_ChkB_toggled(bool checked)
ui->mahCount_SB->setDisabled(!checked);
emit modified();
}
void TelemetryPanel::telBarUpdate()
{
int index;
lock=true;
for (int i=0; i<12; i++) {
int screen=i/4;
index=barsCB[i]->currentIndex();
if (index==TELEMETRY_SOURCE_A1 || index==TELEMETRY_SOURCE_A1 || index==TELEMETRY_SOURCE_A1_MIN || index==TELEMETRY_SOURCE_A2_MIN) {
minSB[i]->setMinimum(getBarValue(index, 0, &model.frsky));
minSB[i]->setMaximum(getBarValue(index, 255, &model.frsky));
minSB[i]->setSingleStep(getBarStep(index));
maxSB[i]->setMinimum(getBarValue(index, 0, &model.frsky));
maxSB[i]->setMaximum(getBarValue(index, 255, &model.frsky));
maxSB[i]->setSingleStep(getBarStep(index));
minSB[i]->setValue(getBarValue(index, model.frsky.screens[screen].body.bars[i%4].barMin, &model.frsky));
maxSB[i]->setValue(getBarValue(index, 255-model.frsky.screens[screen].body.bars[i%4].barMax, &model.frsky));
}
}
lock=false;
}
void TelemetryPanel::ScreenTypeCBcurrentIndexChanged(int index)
{
if (lock) return;
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
int screen = comboBox->objectName().right(1).toInt() -1;
lock=true;
model.frsky.screens[screen].type=index;
for (int i=0; i<3; i++) {
bool isNum = (model.frsky.screens[i].type==0);
barsGB[i]->setVisible(!isNum);
numsGB[i]->setVisible(isNum);
}
lock=false;
emit modified();
}
void TelemetryPanel::telBarCBcurrentIndexChanged(int index)
{
if (lock) return;
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
int screenId = comboBox->objectName().mid(8,1).toInt() - 1;
int barId = comboBox->objectName().mid(10,1).toInt() - 1;
int bar=barId+screenId*4;
model.frsky.screens[screenId].body.bars[barId].source=index;
lock=true;
if (index==0) {
model.frsky.screens[screenId].body.bars[barId].barMin=0;
model.frsky.screens[screenId].body.bars[barId].barMax=0;
minSB[bar]->setDisabled(true);
maxSB[bar]->setDisabled(true);
} else {
minSB[bar]->setEnabled(true);
maxSB[bar]->setEnabled(true);
}
switch (index-1) {
case TELEMETRY_SOURCE_TX_BATT:
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A1_MIN:
case TELEMETRY_SOURCE_A2:
case TELEMETRY_SOURCE_A2_MIN:
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
case TELEMETRY_SOURCE_CURRENT_MAX:
case TELEMETRY_SOURCE_CURRENT:
minSB[bar]->setDecimals(1);
maxSB[bar]->setDecimals(1);
break;
case TELEMETRY_SOURCE_CELL:
minSB[bar]->setDecimals(2);
maxSB[bar]->setDecimals(2);
break;
default:
minSB[bar]->setDecimals(0);
maxSB[bar]->setDecimals(0);
}
minSB[bar]->setMinimum(getBarValue(index, 0, &model.frsky));
minSB[bar]->setMaximum(getBarValue(index, 255, &model.frsky));
minSB[bar]->setSingleStep(getBarStep(index));
maxSB[bar]->setMinimum(getBarValue(index, 0, &model.frsky));
maxSB[bar]->setMaximum(getBarValue(index, 255, &model.frsky));
maxSB[bar]->setSingleStep(getBarStep(index));
minSB[bar]->setValue(getBarValue(index, model.frsky.screens[screenId].body.bars[barId].barMin, &model.frsky));
maxSB[bar]->setValue(getBarValue(index, 255-model.frsky.screens[screenId].body.bars[barId].barMax, &model.frsky));
lock=false;
emit modified();
}
void TelemetryPanel::telMinSBeditingFinished()
{
if (lock) return;
QDoubleSpinBox *spinBox = qobject_cast<QDoubleSpinBox*>(sender());
int screenId = spinBox->objectName().mid(8,1).toInt() - 1;
int barId = spinBox->objectName().right(1).toInt() - 1;
int minId = barId+screenId*4;
lock=true;
if (model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1 || model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1_MIN) {
model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-analogs[0]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source));
} else if (model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2 || model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2_MIN) {
model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-analogs[1]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source));
} else {
model.frsky.screens[screenId].body.bars[barId].barMin=round((minSB[minId]->value()-getBarValue(model.frsky.screens[screenId].body.bars[barId].source, 0, &model.frsky))/getBarStep(model.frsky.screens[screenId].body.bars[barId].source));
}
spinBox->setValue(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, model.frsky.screens[screenId].body.bars[barId].barMin, &model.frsky));
if (maxSB[minId]->value()<minSB[minId]->value()) {
model.frsky.screens[screenId].body.bars[minId].barMax=(255-model.frsky.screens[screenId].body.bars[barId].barMin+1);
maxSB[minId]->setValue(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, 255-model.frsky.screens[screenId].body.bars[barId].barMax, &model.frsky));
}
maxSB[minId]->setMinimum(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, (model.frsky.screens[screenId].body.bars[barId].barMin+1), &model.frsky));
lock=false;
emit modified();
}
void TelemetryPanel::telMaxSBeditingFinished()
{
if (lock) return;
QDoubleSpinBox *spinBox = qobject_cast<QDoubleSpinBox*>(sender());
int screenId = spinBox->objectName().mid(8,1).toInt() - 1;
int barId = spinBox->objectName().right(1).toInt() - 1;
lock=true;
if (model.frsky.screens[screenId].body.bars[barId].source==5) {
model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-analogs[0]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source)));
} else if (model.frsky.screens[screenId].body.bars[barId].source==6) {
model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-analogs[1]->ui->CalibSB->value())/getBarStep(model.frsky.screens[screenId].body.bars[barId].source)));
} else {
model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-getBarValue(model.frsky.screens[screenId].body.bars[barId].source, 0, &model.frsky))/getBarStep(model.frsky.screens[screenId].body.bars[barId].source) ));
}
spinBox->setValue(getBarValue(model.frsky.screens[screenId].body.bars[barId].source, (255-model.frsky.screens[screenId].body.bars[barId].barMax), &model.frsky));
lock=false;
emit modified();
}
void TelemetryPanel::customFieldEdited()
{
if (!lock) {
lock = true;
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
for (int i=0; i<GetEepromInterface()->getCapability(TelemetryCSFields); i++) {
int screen=i/(4*cols);
int r=((i%(4*cols))%4);
int c=((i%(4*cols))/4);
if (model.frsky.screens[screen].type==0) {
model.frsky.screens[screen].body.lines[r].source[c]=csf[i]->currentIndex();
}
}
emit modified();
lock = false;
}
}
float TelemetryPanel::getBarStep(int barId)
{
switch (barId-1) {
case TELEMETRY_SOURCE_TX_BATT:
return 0.1;
break;
case TELEMETRY_SOURCE_TIMER1:
case TELEMETRY_SOURCE_TIMER2:
return 3;
break;
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A1_MIN:
return (analogs[0]->ui->RatioSB->value()/255);
break;
case TELEMETRY_SOURCE_A2:
case TELEMETRY_SOURCE_A2_MIN:
return (analogs[1]->ui->RatioSB->value()/255);
break;
case TELEMETRY_SOURCE_ALT:
case TELEMETRY_SOURCE_GPS_ALT:
case TELEMETRY_SOURCE_ALT_MAX:
case TELEMETRY_SOURCE_ALT_MIN:
return 8;
break;
case TELEMETRY_SOURCE_RPM:
case TELEMETRY_SOURCE_RPM_MAX:
return 50;
break;
case TELEMETRY_SOURCE_CELLS_SUM:
case TELEMETRY_SOURCE_VFAS:
return 0.1;
break;
case TELEMETRY_SOURCE_CELL:
return 0.02;
break;
case TELEMETRY_SOURCE_HDG:
return 2;
break;
case TELEMETRY_SOURCE_DIST:
case TELEMETRY_SOURCE_DIST_MAX:
return 8;
break;
case TELEMETRY_SOURCE_CURRENT_MAX:
case TELEMETRY_SOURCE_CURRENT:
return 0.5;
break;
case TELEMETRY_SOURCE_POWER:
return 5;
break;
case TELEMETRY_SOURCE_CONSUMPTION:
return 20;
break;
case TELEMETRY_SOURCE_SPEED:
case TELEMETRY_SOURCE_SPEED_MAX:
if (model.frsky.imperial==1) {
return 1;
} else {
return 1.852;
}
break;
default:
return 1;
break;
}
}

View file

@ -8,6 +8,7 @@
namespace Ui {
class TelemetryAnalog;
class TelemetryCustomScreen;
class Telemetry;
}
@ -44,6 +45,32 @@ class TelemetryAnalog : public QWidget
void update();
};
class TelemetryCustomScreen : public ModelPanel
{
Q_OBJECT
public:
TelemetryCustomScreen(QWidget *parent, ModelData & model, FrSkyScreenData & screen);
~TelemetryCustomScreen();
void update();
private slots:
void on_screenType_currentIndexChanged(int index);
void customFieldChanged(int index);
void barSourceChanged(int index);
void barMinChanged(double value);
void barMaxChanged(double value);
private:
void updateBar(int line);
Ui::TelemetryCustomScreen * ui;
FrSkyScreenData & screen;
QComboBox * fieldsCB[4][3];
QComboBox * barsCB[4];
QDoubleSpinBox * minSB[4];
QDoubleSpinBox * maxSB[4];
};
class TelemetryPanel : public ModelPanel
{
Q_OBJECT
@ -77,24 +104,12 @@ class TelemetryPanel : public ModelPanel
void on_fasOffset_DSB_editingFinished();
void on_mahCount_SB_editingFinished();
void on_mahCount_ChkB_toggled(bool checked);
void telBarCBcurrentIndexChanged(int index);
void ScreenTypeCBcurrentIndexChanged(int index);
void telMaxSBeditingFinished();
void telMinSBeditingFinished();
void customFieldEdited();
private:
Ui::Telemetry *ui;
TelemetryAnalog * analogs[2];
QGroupBox* barsGB[3];
QGroupBox* numsGB[3];
QComboBox* barsCB[12];
QDoubleSpinBox* minSB[12];
QDoubleSpinBox* maxSB[12];
QComboBox* csf[36];
void setup();
float getBarStep(int barId);
void telBarUpdate();
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TelemetryCustomScreen</class>
<widget class="QWidget" name="TelemetryCustomScreen">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>650</width>
<height>393</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5" stretch="0,0,1">
<item>
<widget class="QLabel" name="screenTypeLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Custom Screen Type</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="screenType">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>90</width>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>Nums</string>
</property>
</item>
<item>
<property name="text">
<string>Bars</string>
</property>
</item>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QGroupBox" name="screenNums">
<layout class="QGridLayout" name="screenNumsLayout"/>
</widget>
</item>
<item>
<widget class="QGroupBox" name="screenBars">
<layout class="QGridLayout" name="screenBarsLayout" columnstretch="1,0,1,0">
<item row="0" column="1">
<widget class="QLabel" name="label_266">
<property name="text">
<string>Min</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_265">
<property name="text">
<string>Source</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_267">
<property name="text">
<string>Gauge</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="label_268">
<property name="text">
<string>Max</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View file

@ -796,7 +796,7 @@ void printDialog::printFrSky()
str.append("<tr><td colspan=2 align=\"Left\"><b>"+tr("System of units")+"</b></td><td colspan=8 align=\"left\">"+getFrSkyMeasure(fd->imperial)+"</td></tr>");
str.append("<tr><td colspan=2 align=\"Left\"><b>"+tr("Propeller blades")+"</b></td><td colspan=8 align=\"left\">"+getFrSkyBlades(fd->blades)+"</td></tr>");
str.append("<tr><td colspan=10 align=\"Left\" height=\"4px\"></td></tr></table>");
#if 0
if (GetEepromInterface()->getCapability(TelemetryBars) || (GetEepromInterface()->getCapability(TelemetryCSFields))) {
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
@ -834,12 +834,13 @@ void printDialog::printFrSky()
for (int i=0; i<4; i++) {
if (fd->screens[j].body.bars[i].source!=0)
tc++;
str.append("<tr><td align=\"Center\"><b>"+QString::number(i+1,10)+"</b></td><td align=\"Center\"><b>"+getFrSkySrc(fd->screens[j].body.bars[i].source)+"</b></td><td align=\"Right\"><b>"+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source, fd->screens[j].body.bars[i].barMin,fd)):"----")+"</b></td><td align=\"Right\"><b>"+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source,(255-fd->screens[j].body.bars[i].barMax),fd)) :"----")+"</b></td></tr>");
// TODO str.append("<tr><td align=\"Center\"><b>"+QString::number(i+1,10)+"</b></td><td align=\"Center\"><b>"+getFrSkySrc(fd->screens[j].body.bars[i].source)+"</b></td><td align=\"Right\"><b>"+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source, fd->screens[j].body.bars[i].barMin,fd)):"----")+"</b></td><td align=\"Right\"><b>"+(fd->screens[j].body.bars[i].source>0 ? QString::number(getBarValue(fd->screens[j].body.bars[i].source,(255-fd->screens[j].body.bars[i].barMax),fd)) :"----")+"</b></td></tr>");
}
str.append("</table>");
}
}
}
#endif
if (tc>0)
te->append(str);
}

View file

@ -555,6 +555,7 @@ QPushButton:checked {
border-radius: 4px;
border-color: black;
padding: 2px;
}
QPushButton:checked {
@ -1262,7 +1263,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_1">
<property name="text">
<string>CS1</string>
<string>LS1</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1293,7 +1294,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_2">
<property name="text">
<string>CS2</string>
<string>LS2</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1324,7 +1325,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_3">
<property name="text">
<string>CS3</string>
<string>LS3</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1355,7 +1356,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_4">
<property name="text">
<string>CS4</string>
<string>LS4</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1386,7 +1387,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_5">
<property name="text">
<string>CS5</string>
<string>LS5</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1417,7 +1418,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_6">
<property name="text">
<string>CS6</string>
<string>LS6</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1448,7 +1449,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_7">
<property name="text">
<string>CS7</string>
<string>LS7</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1479,7 +1480,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_8">
<property name="text">
<string>CS8</string>
<string>LS8</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1510,7 +1511,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_9">
<property name="text">
<string>CS9</string>
<string>LS9</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1541,7 +1542,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_10">
<property name="text">
<string>CSA</string>
<string>LSA</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1572,7 +1573,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_11">
<property name="text">
<string>CSB</string>
<string>LSB</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1603,7 +1604,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_12">
<property name="text">
<string>CSC</string>
<string>LSC</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1634,7 +1635,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_13">
<property name="text">
<string>CSD</string>
<string>LSD</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1665,7 +1666,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_14">
<property name="text">
<string>CSE</string>
<string>LSE</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1696,7 +1697,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_15">
<property name="text">
<string>CSF</string>
<string>LSF</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1727,7 +1728,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_16">
<property name="text">
<string>CSG</string>
<string>LSG</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1758,7 +1759,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_17">
<property name="text">
<string>CSH</string>
<string>LSH</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1789,7 +1790,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_18">
<property name="text">
<string>CSI</string>
<string>LSI</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1820,7 +1821,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_19">
<property name="text">
<string>CSJ</string>
<string>LSJ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1851,7 +1852,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_20">
<property name="text">
<string>CSK</string>
<string>LSK</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1882,7 +1883,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_21">
<property name="text">
<string>CSL</string>
<string>LSL</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1913,7 +1914,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_22">
<property name="text">
<string>CSM</string>
<string>LSM</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1944,7 +1945,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_23">
<property name="text">
<string>CSN</string>
<string>LSN</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -1975,7 +1976,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_24">
<property name="text">
<string>CSO</string>
<string>LSO</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2006,7 +2007,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_25">
<property name="text">
<string>CSP</string>
<string>LSP</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2037,7 +2038,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_26">
<property name="text">
<string>CSQ</string>
<string>LSQ</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2068,7 +2069,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_27">
<property name="text">
<string>CSR</string>
<string>LSR</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2099,7 +2100,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_28">
<property name="text">
<string>CSS</string>
<string>LSS</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2130,7 +2131,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_29">
<property name="text">
<string>CST</string>
<string>LST</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2161,7 +2162,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_30">
<property name="text">
<string>CSU</string>
<string>LSU</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2192,7 +2193,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_31">
<property name="text">
<string>CSV</string>
<string>LSV</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -2223,7 +2224,7 @@ QPushButton:checked {
<item>
<widget class="QLabel" name="labelCSW_32">
<property name="text">
<string>CSW</string>
<string>LSW</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
@ -3052,6 +3053,7 @@ border-radius: 4px;
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>50</width>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 145 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 156 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 160 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 169 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 162 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 305 B

After

Width:  |  Height:  |  Size: 205 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 364 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

After

Width:  |  Height:  |  Size: 463 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 176 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 393 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 494 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 212 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 196 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 348 B

After

Width:  |  Height:  |  Size: 239 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 450 B

After

Width:  |  Height:  |  Size: 426 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 341 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 158 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 248 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 206 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 B

After

Width:  |  Height:  |  Size: 184 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 175 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

After

Width:  |  Height:  |  Size: 181 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 180 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

After

Width:  |  Height:  |  Size: 286 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 227 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 389 B

After

Width:  |  Height:  |  Size: 371 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 374 B

After

Width:  |  Height:  |  Size: 258 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 181 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 304 B

After

Width:  |  Height:  |  Size: 292 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

After

Width:  |  Height:  |  Size: 348 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 283 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 346 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 311 B

After

Width:  |  Height:  |  Size: 199 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 183 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 303 B

After

Width:  |  Height:  |  Size: 195 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 284 B

After

Width:  |  Height:  |  Size: 181 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

After

Width:  |  Height:  |  Size: 144 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

After

Width:  |  Height:  |  Size: 381 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

After

Width:  |  Height:  |  Size: 344 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 341 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

After

Width:  |  Height:  |  Size: 287 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 465 B

After

Width:  |  Height:  |  Size: 357 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 261 B

After

Width:  |  Height:  |  Size: 343 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 531 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 448 B

After

Width:  |  Height:  |  Size: 525 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 343 B

After

Width:  |  Height:  |  Size: 424 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 471 B

After

Width:  |  Height:  |  Size: 571 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

After

Width:  |  Height:  |  Size: 605 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 557 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 697 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 359 B

After

Width:  |  Height:  |  Size: 443 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 B

After

Width:  |  Height:  |  Size: 613 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 577 B

After

Width:  |  Height:  |  Size: 848 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 679 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

After

Width:  |  Height:  |  Size: 589 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 559 B

After

Width:  |  Height:  |  Size: 741 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 756 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

After

Width:  |  Height:  |  Size: 383 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 B

After

Width:  |  Height:  |  Size: 377 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 531 B

After

Width:  |  Height:  |  Size: 623 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 408 B

After

Width:  |  Height:  |  Size: 537 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 439 B

After

Width:  |  Height:  |  Size: 529 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 528 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 B

After

Width:  |  Height:  |  Size: 425 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 352 B

After

Width:  |  Height:  |  Size: 477 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 605 B

After

Width:  |  Height:  |  Size: 755 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 392 B

After

Width:  |  Height:  |  Size: 515 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 B

After

Width:  |  Height:  |  Size: 440 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 B

After

Width:  |  Height:  |  Size: 724 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 337 B

After

Width:  |  Height:  |  Size: 425 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

After

Width:  |  Height:  |  Size: 372 B

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more