mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 23:35:17 +03:00
Merge remote-tracking branch 'origin/next' into TaranisPlus
Conflicts: companion/src/generaledit.cpp companion/src/generaledit.ui radio/src/gui/menu_general.cpp
This commit is contained in:
commit
220e9f3e97
92 changed files with 6025 additions and 4281 deletions
|
@ -133,7 +133,7 @@ Eric Burdis
|
|||
Nigel Chippindale
|
||||
Michael Deasy
|
||||
Stephen Stough
|
||||
Kenneth Lilja
|
||||
Kenneth Lilja (monthly)
|
||||
Robert Jero
|
||||
Gary Bancroft
|
||||
Robert Cotsford
|
||||
|
@ -332,7 +332,7 @@ Steve Coley
|
|||
Sean Cull
|
||||
Roberto Orsello
|
||||
David Finger
|
||||
FrSky - www.frsky-rc.com
|
||||
FrSky - www.frsky-rc.com (monthly)
|
||||
Jean-Marie Oddo
|
||||
Mike Matheny
|
||||
Glen Roe (Showmaster)
|
||||
|
@ -383,3 +383,17 @@ Gordon Stahl
|
|||
Serge Michaux
|
||||
Robert Young
|
||||
Wilco Hijink
|
||||
Roy Nixon
|
||||
Lexington S Morley
|
||||
Daryl Dacko
|
||||
Beat Zurflueh
|
||||
Piotr Kundu
|
||||
Kevin Berkefeld
|
||||
Tomasz Klys
|
||||
Mirco Didone'
|
||||
Christoph Schroeter
|
||||
Zdenek Trojanek
|
||||
Bryan Anderson
|
||||
Kamco Enterprises
|
||||
Robert Bates
|
||||
Robert Brown
|
||||
|
|
|
@ -76,7 +76,7 @@ void CompareDialog::printDiff()
|
|||
{
|
||||
te->clear();
|
||||
printSetup();
|
||||
if (GetCurrentFirmware()->getCapability(FlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(FlightModes)) {
|
||||
printPhases();
|
||||
}
|
||||
printExpos();
|
||||
|
@ -309,7 +309,7 @@ void CompareDialog::printPhases()
|
|||
str.append(QString("<td width=\"40\" align=\"center\"><b>%1</b></td>").arg(getInputStr(*g_model1, i)));
|
||||
}
|
||||
str.append("</tr>");
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightPhases); i++) {
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
PhaseData *pd1=&g_model1->phaseData[i];
|
||||
PhaseData *pd2=&g_model2->phaseData[i];
|
||||
str.append("<tr><td><b>"+tr("FM")+QString("%1</b> ").arg(i));
|
||||
|
@ -346,10 +346,10 @@ void CompareDialog::printPhases()
|
|||
if (gvars==1) {
|
||||
gvarnum=GetCurrentFirmware()->getCapability(Gvars);
|
||||
}
|
||||
if ((gvars==1 && GetCurrentFirmware()->getCapability(GvarsFlightPhases)) || GetCurrentFirmware()->getCapability(RotaryEncoders)) {
|
||||
if ((gvars==1 && GetCurrentFirmware()->getCapability(GvarsFlightModes)) || GetCurrentFirmware()->getCapability(RotaryEncoders)) {
|
||||
str.append("<br><table border=1 cellspacing=0 cellpadding=1 width=\"100%\">");
|
||||
str.append("<tr><td style=\"border-style:none;\"> </td>");
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightModes)) {
|
||||
|
||||
str.append(QString("<td colspan=%1 align=center><b>").arg(gvarnum)+tr("Gvars")+"</td>");
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ void CompareDialog::printPhases()
|
|||
str.append(QString("<td colspan=%1 align=center><b>").arg(GetCurrentFirmware()->getCapability(RotaryEncoders))+tr("Rot. Enc.")+"</td>");
|
||||
}
|
||||
str.append("</tr><tr><td align=center><b>"+tr("Flight mode name")+"</b></td>");
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightModes)) {
|
||||
for (i=0; i<gvarnum; i++) {
|
||||
str.append(QString("<td width=\"40\" align=\"center\"><b>GV%1</b><br>%2</td>").arg(i+1).arg(g_model1->gvars_names[i]));
|
||||
}
|
||||
|
@ -366,13 +366,13 @@ void CompareDialog::printPhases()
|
|||
str.append(QString("<td align=\"center\"><b>RE%1</b></td>").arg((i==0 ? 'A': 'B')));
|
||||
}
|
||||
str.append("</tr>");
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightPhases); i++) {
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
PhaseData *pd1=&g_model1->phaseData[i];
|
||||
PhaseData *pd2=&g_model2->phaseData[i];
|
||||
str.append("<tr><td><b>"+tr("FM")+QString("%1</b> ").arg(i));
|
||||
color=getColor1(pd1->name,pd2->name);
|
||||
str.append(QString("<font size=+1 face='Courier New' color=%2>%1</font></td>").arg(pd1->name).arg(color));
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightModes)) {
|
||||
for (k=0; k<gvarnum; k++) {
|
||||
color=getColor1(pd1->gvars[k],pd2->gvars[k]);
|
||||
if (pd1->gvars[k]<=1024) {
|
||||
|
@ -411,7 +411,7 @@ void CompareDialog::printPhases()
|
|||
str.append(QString("<td width=\"40\" align=\"center\"><b>%1</b></td>").arg(getInputStr(*g_model1, i)));
|
||||
}
|
||||
str.append("</tr>");
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightPhases); i++) {
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
PhaseData *pd1=&g_model1->phaseData[i];
|
||||
PhaseData *pd2=&g_model2->phaseData[i];
|
||||
str.append("<tr><td><b>"+tr("FM")+QString("%1</b> ").arg(i));
|
||||
|
@ -436,17 +436,17 @@ void CompareDialog::printPhases()
|
|||
}
|
||||
str.append("</table>");
|
||||
|
||||
if ((gvars==1 && GetCurrentFirmware()->getCapability(GvarsFlightPhases)) || GetCurrentFirmware()->getCapability(RotaryEncoders)) {
|
||||
if ((gvars==1 && GetCurrentFirmware()->getCapability(GvarsFlightModes)) || GetCurrentFirmware()->getCapability(RotaryEncoders)) {
|
||||
str.append("<br><table border=1 cellspacing=0 cellpadding=1 width=\"100%\">");
|
||||
str.append("<tr><td style=\"border-style:none;\"> </td>");
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightModes)) {
|
||||
str.append(QString("<td colspan=%1 align=center><b>").arg(gvarnum)+tr("Gvars")+"</td>");
|
||||
}
|
||||
if (GetCurrentFirmware()->getCapability(RotaryEncoders)) {
|
||||
str.append(QString("<td colspan=%1 align=center><b>").arg(GetCurrentFirmware()->getCapability(RotaryEncoders))+tr("Rot. Enc.")+"</td>");
|
||||
}
|
||||
str.append("</tr><tr><td align=center ><b>"+tr("Flight mode name")+"</b></td>");
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightModes)) {
|
||||
for (i=0; i<gvarnum; i++) {
|
||||
str.append(QString("<td width=\"40\" align=\"center\"><b>GV%1</b><br>%2</td>").arg(i+1).arg(g_model2->gvars_names[i]));
|
||||
}
|
||||
|
@ -455,13 +455,13 @@ void CompareDialog::printPhases()
|
|||
str.append(QString("<td align=\"center\"><b>RE%1</b></td>").arg((i==0 ? 'A': 'B')));
|
||||
}
|
||||
str.append("</tr>");
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightPhases); i++) {
|
||||
for (i=0; i<GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
PhaseData *pd1=&g_model1->phaseData[i];
|
||||
PhaseData *pd2=&g_model2->phaseData[i];
|
||||
str.append("<tr><td><b>"+tr("FM")+QString("%1</b> ").arg(i));
|
||||
color=getColor1(pd1->name,pd2->name);
|
||||
str.append(QString("<font size=+1 face='Courier New' color=%2>%1</font></td>").arg(pd2->name).arg(color));
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(GvarsFlightModes)) {
|
||||
for (k=0; k<gvarnum; k++) {
|
||||
color=getColor1(pd1->gvars[k],pd2->gvars[k]);
|
||||
if (pd2->gvars[k]<=1024) {
|
||||
|
@ -569,7 +569,7 @@ void CompareDialog::printGvars()
|
|||
gvarnum=GetCurrentFirmware()->getCapability(Gvars);
|
||||
}
|
||||
|
||||
if (!GetCurrentFirmware()->getCapability(GvarsFlightPhases) && (gvars==1 && GetCurrentFirmware()->getCapability(Gvars))) {
|
||||
if (!GetCurrentFirmware()->getCapability(GvarsFlightModes) && (gvars==1 && GetCurrentFirmware()->getCapability(Gvars))) {
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append("<tr><td colspan=2><h2>"+tr("Global Variables")+"</h2></td></tr>");
|
||||
str.append("<tr><td width=50%>");
|
||||
|
@ -653,12 +653,12 @@ void CompareDialog::printExpos()
|
|||
str += tr("Weight") + QString("%1").arg(getGVarString(ed->weight)).rightJustified(6, ' ');
|
||||
str += ed->curve.toString().replace("<", "<").replace(">", ">");
|
||||
|
||||
if (GetCurrentFirmware()->getCapability(FlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(FlightModes)) {
|
||||
if(ed->phases) {
|
||||
if (ed->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightPhases))-1) {
|
||||
if (ed->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightModes))-1) {
|
||||
int mask=1;
|
||||
int first=0;
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightPhases);i++) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightModes);i++) {
|
||||
if (!(ed->phases & mask)) {
|
||||
first++;
|
||||
}
|
||||
|
@ -671,7 +671,7 @@ void CompareDialog::printExpos()
|
|||
}
|
||||
mask=1;
|
||||
first=1;
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightPhases);j++) {
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightModes);j++) {
|
||||
if (!(ed->phases & mask)) {
|
||||
PhaseData *pd = &g_model1->phaseData[j];
|
||||
if (!first) {
|
||||
|
@ -731,12 +731,12 @@ void CompareDialog::printExpos()
|
|||
str += tr("Weight") + QString("%1").arg(getGVarString(ed->weight)).rightJustified(6, ' ');
|
||||
str += ed->curve.toString().replace("<", "<").replace(">", ">");
|
||||
|
||||
if (GetCurrentFirmware()->getCapability(FlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(FlightModes)) {
|
||||
if(ed->phases) {
|
||||
if (ed->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightPhases))-1) {
|
||||
if (ed->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightModes))-1) {
|
||||
int mask=1;
|
||||
int first=0;
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightPhases);i++) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightModes);i++) {
|
||||
if (!(ed->phases & mask)) {
|
||||
first++;
|
||||
}
|
||||
|
@ -749,7 +749,7 @@ void CompareDialog::printExpos()
|
|||
}
|
||||
mask=1;
|
||||
first=1;
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightPhases);j++) {
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightModes);j++) {
|
||||
if (!(ed->phases & mask)) {
|
||||
PhaseData *pd = &g_model2->phaseData[j];
|
||||
if (!first) {
|
||||
|
@ -829,12 +829,12 @@ void CompareDialog::printMixers()
|
|||
if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale);
|
||||
if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale);
|
||||
if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn);
|
||||
if (GetCurrentFirmware()->getCapability(FlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(FlightModes)) {
|
||||
if(md->phases) {
|
||||
if (md->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightPhases))-1) {
|
||||
if (md->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightModes))-1) {
|
||||
int mask=1;
|
||||
int first=0;
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightPhases);i++) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightModes);i++) {
|
||||
if (!(md->phases & mask)) {
|
||||
first++;
|
||||
}
|
||||
|
@ -847,7 +847,7 @@ void CompareDialog::printMixers()
|
|||
}
|
||||
mask=1;
|
||||
first=1;
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightPhases);j++) {
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightModes);j++) {
|
||||
if (!(md->phases & mask)) {
|
||||
PhaseData *pd = &g_model1->phaseData[j];
|
||||
if (!first) {
|
||||
|
@ -908,12 +908,12 @@ void CompareDialog::printMixers()
|
|||
if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale);
|
||||
if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale);
|
||||
if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn);
|
||||
if (GetCurrentFirmware()->getCapability(FlightPhases)) {
|
||||
if (GetCurrentFirmware()->getCapability(FlightModes)) {
|
||||
if(md->phases) {
|
||||
if (md->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightPhases))-1) {
|
||||
if (md->phases!=(unsigned int)(1<<GetCurrentFirmware()->getCapability(FlightModes))-1) {
|
||||
int mask=1;
|
||||
int first=0;
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightPhases);i++) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightModes);i++) {
|
||||
if (!(md->phases & mask)) {
|
||||
first++;
|
||||
}
|
||||
|
@ -926,7 +926,7 @@ void CompareDialog::printMixers()
|
|||
}
|
||||
mask=1;
|
||||
first=1;
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightPhases);j++) {
|
||||
for (int j=0; j<GetCurrentFirmware()->getCapability(FlightModes);j++) {
|
||||
if (!(md->phases & mask)) {
|
||||
PhaseData *pd = &g_model2->phaseData[j];
|
||||
if (!first) {
|
||||
|
|
|
@ -109,6 +109,10 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
|||
result.decimals = 1;
|
||||
result.max = 25.5;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_TX_TIME:
|
||||
result.step = 1;
|
||||
result.max = 24*60 - 1;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_TIMER1:
|
||||
case TELEMETRY_SOURCE_TIMER2:
|
||||
result.step = singleprec ? 5 : 1;
|
||||
|
@ -200,8 +204,8 @@ RawSourceRange RawSource::getRange(bool singleprec)
|
|||
result.decimals = 1;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_CONSUMPTION:
|
||||
result.step = singleprec ? 20 : 1;
|
||||
result.max = singleprec ? 5100 : 10000;
|
||||
result.step = singleprec ? 100 : 1;
|
||||
result.max = singleprec ? 25500 : 10000;
|
||||
break;
|
||||
case TELEMETRY_SOURCE_POWER:
|
||||
case TELEMETRY_SOURCE_POWER_MAX:
|
||||
|
@ -258,7 +262,7 @@ QString RawSource::toString()
|
|||
};
|
||||
|
||||
static const QString telemetry[] = {
|
||||
QObject::tr("Batt"), QObject::tr("Timer1"), QObject::tr("Timer2"),
|
||||
QObject::tr("Batt"), QObject::tr("Time"), QObject::tr("Timer1"), QObject::tr("Timer2"),
|
||||
QObject::tr("SWR"), QObject::tr("RSSI Tx"), QObject::tr("RSSI Rx"), QObject::tr("Rx Batt"),
|
||||
QObject::tr("A1"), QObject::tr("A2"), QObject::tr("A3"), QObject::tr("A4"),
|
||||
QObject::tr("Alt"), QObject::tr("Rpm"), QObject::tr("Fuel"), QObject::tr("T1"), QObject::tr("T2"),
|
||||
|
@ -269,10 +273,10 @@ QString RawSource::toString()
|
|||
QObject::tr("A1-"), QObject::tr("A2-"), QObject::tr("A3-"), QObject::tr("A4-"),
|
||||
QObject::tr("Alt-"), QObject::tr("Alt+"), QObject::tr("Rpm+"), QObject::tr("T1+"), QObject::tr("T2+"), QObject::tr("Speed+"), QObject::tr("Dist+"), QObject::tr("AirSpeed+"),
|
||||
QObject::tr("Cell-"), QObject::tr("Cells-"), QObject::tr("Vfas-"), QObject::tr("Curr+"), QObject::tr("Powr+"),
|
||||
QObject::tr("ACC"), QObject::tr("Time"),
|
||||
QObject::tr("ACC"), QObject::tr("GPS Time"),
|
||||
};
|
||||
|
||||
static const QString virtualSwitches[] = {
|
||||
static const QString logicalSwitches[] = {
|
||||
QObject::tr("L1"), QObject::tr("L2"), QObject::tr("L3"), QObject::tr("L4"), QObject::tr("L5"), QObject::tr("L6"), QObject::tr("L7"), QObject::tr("L8"), QObject::tr("L9"), QObject::tr("L10"),
|
||||
QObject::tr("L11"), QObject::tr("L12"), QObject::tr("L13"), QObject::tr("L14"), QObject::tr("L15"), QObject::tr("L16"), QObject::tr("L17"), QObject::tr("L18"), QObject::tr("L19"), QObject::tr("L20"),
|
||||
QObject::tr("L21"), QObject::tr("L22"), QObject::tr("L23"), QObject::tr("L24"), QObject::tr("L25"), QObject::tr("L26"), QObject::tr("L27"), QObject::tr("L28"), QObject::tr("L29"), QObject::tr("L30"),
|
||||
|
@ -302,7 +306,7 @@ QString RawSource::toString()
|
|||
case SOURCE_TYPE_SWITCH:
|
||||
return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(switchesX9D, index) : CHECK_IN_ARRAY(switches9X, index));
|
||||
case SOURCE_TYPE_CUSTOM_SWITCH:
|
||||
return virtualSwitches[index];
|
||||
return logicalSwitches[index];
|
||||
case SOURCE_TYPE_CYC:
|
||||
return QObject::tr("CYC%1").arg(index+1);
|
||||
case SOURCE_TYPE_PPM:
|
||||
|
@ -349,13 +353,17 @@ QString RawSwitch::toString()
|
|||
SwitchUp('H'), SwitchDn('H'),
|
||||
};
|
||||
|
||||
static const QString virtualSwitches[] = {
|
||||
static const QString logicalSwitches[] = {
|
||||
QObject::tr("L1"), QObject::tr("L2"), QObject::tr("L3"), QObject::tr("L4"), QObject::tr("L5"), QObject::tr("L6"), QObject::tr("L7"), QObject::tr("L8"), QObject::tr("L9"), QObject::tr("L10"),
|
||||
QObject::tr("L11"), QObject::tr("L12"), QObject::tr("L13"), QObject::tr("L14"), QObject::tr("L15"), QObject::tr("L16"), QObject::tr("L17"), QObject::tr("L18"), QObject::tr("L19"), QObject::tr("L20"),
|
||||
QObject::tr("L21"), QObject::tr("L22"), QObject::tr("L23"), QObject::tr("L24"), QObject::tr("L25"), QObject::tr("L26"), QObject::tr("L27"), QObject::tr("L28"), QObject::tr("L29"), QObject::tr("L30"),
|
||||
QObject::tr("L31"), QObject::tr("L32")
|
||||
};
|
||||
|
||||
static const QString flightModes[] = {
|
||||
QObject::tr("FM0"), QObject::tr("FM1"), QObject::tr("FM2"), QObject::tr("FM3"), QObject::tr("FM4"), QObject::tr("FM5"), QObject::tr("FM6"), QObject::tr("FM7"), QObject::tr("FM8")
|
||||
};
|
||||
|
||||
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"),
|
||||
|
@ -389,7 +397,7 @@ QString RawSwitch::toString()
|
|||
else
|
||||
return CHECK_IN_ARRAY(switches9X, index-1);
|
||||
case SWITCH_TYPE_VIRTUAL:
|
||||
return CHECK_IN_ARRAY(virtualSwitches, index-1);
|
||||
return CHECK_IN_ARRAY(logicalSwitches, index-1);
|
||||
case SWITCH_TYPE_MULTIPOS_POT:
|
||||
return CHECK_IN_ARRAY(multiposPots, index-1);
|
||||
case SWITCH_TYPE_TRIM:
|
||||
|
@ -400,6 +408,8 @@ QString RawSwitch::toString()
|
|||
return QObject::tr("ON");
|
||||
case SWITCH_TYPE_OFF:
|
||||
return QObject::tr("OFF");
|
||||
case SWITCH_TYPE_FLIGHT_MODE:
|
||||
return CHECK_IN_ARRAY(flightModes, index-1);
|
||||
case SWITCH_TYPE_NONE:
|
||||
return QObject::tr("----");
|
||||
case SWITCH_TYPE_TIMER_MODE:
|
||||
|
@ -507,36 +517,43 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
|||
}
|
||||
switch (getFunctionFamily()) {
|
||||
case LS_FAMILY_STAY:
|
||||
result = QObject::tr("STAY(%1, [%2:%3])").arg(RawSwitch(val1).toString()).arg(ValToTim(val2)).arg(ValToTim(val2+val3));
|
||||
result += QObject::tr("Edge(%1, [%2:%3])").arg(RawSwitch(val1).toString()).arg(ValToTim(val2)).arg(ValToTim(val2+val3));
|
||||
break;
|
||||
case LS_FAMILY_STICKY:
|
||||
result = QObject::tr("STICKY(%1, %2)").arg(RawSwitch(val1).toString()).arg(RawSwitch(val2).toString());
|
||||
result += QObject::tr("Sticky(%1, %2)").arg(RawSwitch(val1).toString()).arg(RawSwitch(val2).toString());
|
||||
break;
|
||||
case LS_FAMILY_TIMER:
|
||||
result = QObject::tr("TIMER(%1, %2)").arg(ValToTim(val1)).arg(ValToTim(val2));
|
||||
result += QObject::tr("Timer(%1, %2)").arg(ValToTim(val1)).arg(ValToTim(val2));
|
||||
break;
|
||||
case LS_FAMILY_VOFS: {
|
||||
RawSource source = RawSource(val1, &model);
|
||||
RawSourceRange range = source.getRange();
|
||||
QString res;
|
||||
if (val1)
|
||||
result += source.toString();
|
||||
res += source.toString();
|
||||
else
|
||||
result += "0";
|
||||
result.remove(" ");
|
||||
res += "0";
|
||||
res.remove(" ");
|
||||
if (func == LS_FN_APOS || func == LS_FN_ANEG)
|
||||
result = "|" + result + "|";
|
||||
res = "|" + res + "|";
|
||||
else if (func == LS_FN_DAPOS)
|
||||
result = "|d(" + result + ")|";
|
||||
else if (func == LS_FN_DPOS) result = "d(" + result + ")";
|
||||
res = "|d(" + res + ")|";
|
||||
else if (func == LS_FN_DPOS) result = "d(" + res + ")";
|
||||
result += res;
|
||||
|
||||
if (func == LS_FN_APOS || func == LS_FN_VPOS || func == LS_FN_DAPOS || func == LS_FN_DPOS)
|
||||
result += " > ";
|
||||
else if (func == LS_FN_ANEG || func == LS_FN_VNEG)
|
||||
result += " < ";
|
||||
else if (func == LS_FN_VALMOSTEQUAL)
|
||||
result += " ~ ";
|
||||
else
|
||||
result += " missing";
|
||||
result += QString::number(range.step * (val2 /*TODO+ source.getRawOffset(model)*/) + range.offset);
|
||||
break;
|
||||
}
|
||||
case LS_FAMILY_VBOOL:
|
||||
result = RawSwitch(val1).toString();
|
||||
result += RawSwitch(val1).toString();
|
||||
switch (func) {
|
||||
case LS_FN_AND:
|
||||
result += " AND ";
|
||||
|
@ -548,6 +565,7 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
|||
result += " XOR ";
|
||||
break;
|
||||
default:
|
||||
result += " bar ";
|
||||
break;
|
||||
}
|
||||
result += RawSwitch(val2).toString();
|
||||
|
@ -560,6 +578,7 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
|||
result += "0";
|
||||
switch (func) {
|
||||
case LS_FN_EQUAL:
|
||||
case LS_FN_VEQUAL:
|
||||
result += " = ";
|
||||
break;
|
||||
case LS_FN_NEQUAL:
|
||||
|
@ -578,6 +597,7 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
|||
result += " <= ";
|
||||
break;
|
||||
default:
|
||||
result += " foo ";
|
||||
break;
|
||||
}
|
||||
if (val2)
|
||||
|
@ -593,10 +613,10 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
|||
}
|
||||
|
||||
if (GetCurrentFirmware()->getCapability(LogicalSwitchesExt)) {
|
||||
if (delay)
|
||||
result += QObject::tr(" Delay %1 sec").arg(delay/10.0);
|
||||
if (duration)
|
||||
result += QObject::tr(" Duration %1 sec").arg(duration/10.0);
|
||||
result += QObject::tr(" Duration (%1s)").arg(duration/10.0);
|
||||
if (delay)
|
||||
result += QObject::tr(" Delay (%1s)").arg(delay/10.0);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -1003,6 +1023,17 @@ ExpoData * ModelData::insertInput(const int idx)
|
|||
return &expoData[idx];
|
||||
}
|
||||
|
||||
bool ModelData::isInputValid(const unsigned int idx) const
|
||||
{
|
||||
for (int i=0; i<C9X_MAX_EXPOS; i++) {
|
||||
const ExpoData * expo = &expoData[i];
|
||||
if (expo->mode == 0) break;
|
||||
if (expo->chn == idx)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ModelData::removeInput(const int idx)
|
||||
{
|
||||
memmove(&expoData[idx], &expoData[idx+1], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData));
|
||||
|
@ -1039,7 +1070,7 @@ void ModelData::clear()
|
|||
moduleData[0].protocol=PPM;
|
||||
moduleData[1].protocol=OFF;
|
||||
}
|
||||
for (int i=0; i<C9X_MAX_PHASES; i++)
|
||||
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++)
|
||||
phaseData[i].clear();
|
||||
clearInputs();
|
||||
clearMixes();
|
||||
|
@ -1109,7 +1140,7 @@ void ModelData::setDefaultValues(unsigned int id, const GeneralSettings & settin
|
|||
int ModelData::getTrimValue(int phaseIdx, int trimIdx)
|
||||
{
|
||||
int result = 0;
|
||||
for (int i=0; i<C9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
PhaseData & phase = phaseData[phaseIdx];
|
||||
if (phase.trimMode[trimIdx] < 0) {
|
||||
return result;
|
||||
|
@ -1132,7 +1163,7 @@ int ModelData::getTrimValue(int phaseIdx, int trimIdx)
|
|||
|
||||
void ModelData::setTrimValue(int phaseIdx, int trimIdx, int value)
|
||||
{
|
||||
for (uint8_t i=0; i<C9X_MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
PhaseData & phase = phaseData[phaseIdx];
|
||||
int mode = phase.trimMode[trimIdx];
|
||||
int p = phase.trimRef[trimIdx];
|
||||
|
|
|
@ -66,7 +66,7 @@ const uint8_t modn12x3[4][4]= {
|
|||
{4, 3, 2, 1} };
|
||||
|
||||
#define C9X_MAX_MODELS 60
|
||||
#define C9X_MAX_PHASES 9
|
||||
#define C9X_MAX_FLIGHT_MODES 9
|
||||
#define C9X_MAX_MIXERS 64
|
||||
#define C9X_MAX_INPUTS 32
|
||||
#define C9X_MAX_EXPOS 64
|
||||
|
@ -210,6 +210,7 @@ enum ThrottleSource {
|
|||
|
||||
enum TelemetrySource {
|
||||
TELEMETRY_SOURCE_TX_BATT,
|
||||
TELEMETRY_SOURCE_TX_TIME,
|
||||
TELEMETRY_SOURCE_TIMER1,
|
||||
TELEMETRY_SOURCE_TIMER2,
|
||||
TELEMETRY_SOURCE_SWR,
|
||||
|
@ -371,6 +372,7 @@ enum RawSwitchType {
|
|||
SWITCH_TYPE_ROTARY_ENCODER,
|
||||
SWITCH_TYPE_ON,
|
||||
SWITCH_TYPE_OFF,
|
||||
SWITCH_TYPE_FLIGHT_MODE,
|
||||
SWITCH_TYPE_TIMER_MODE
|
||||
};
|
||||
|
||||
|
@ -488,6 +490,7 @@ class GeneralSettings {
|
|||
int PPM_Multiplier;
|
||||
int hapticLength;
|
||||
unsigned int reNavigation;
|
||||
unsigned int stickReverse;
|
||||
bool hideNameOnSplash;
|
||||
bool enablePpmsim;
|
||||
unsigned int speakerPitch;
|
||||
|
@ -940,6 +943,8 @@ class ModelData {
|
|||
ExpoData * insertInput(const int idx);
|
||||
void removeInput(const int idx);
|
||||
|
||||
bool isInputValid(const unsigned int idx) const;
|
||||
|
||||
bool used;
|
||||
char name[12+1];
|
||||
uint8_t modelVoice;
|
||||
|
@ -954,7 +959,7 @@ class ModelData {
|
|||
bool extendedLimits; // TODO xml
|
||||
bool extendedTrims;
|
||||
bool throttleReversed;
|
||||
PhaseData phaseData[C9X_MAX_PHASES];
|
||||
PhaseData phaseData[C9X_MAX_FLIGHT_MODES];
|
||||
MixData mixData[C9X_MAX_MIXERS];
|
||||
LimitData limitData[C9X_NUM_CHNOUT];
|
||||
|
||||
|
@ -1018,9 +1023,9 @@ class RadioData {
|
|||
|
||||
// TODO rename FlightPhase to FlightMode
|
||||
enum Capability {
|
||||
FlightPhases,
|
||||
FlightModes,
|
||||
FlightModesName,
|
||||
FlightPhasesHaveFades,
|
||||
FlightModesHaveFades,
|
||||
Mixes,
|
||||
MixesWithoutExpo,
|
||||
Timers,
|
||||
|
@ -1076,7 +1081,7 @@ enum Capability {
|
|||
Gvars,
|
||||
GvarsInCS,
|
||||
GvarsAreNamed,
|
||||
GvarsFlightPhases,
|
||||
GvarsFlightModes,
|
||||
GvarsName,
|
||||
NoTelemetryProtocol,
|
||||
TelemetryCustomScreens,
|
||||
|
@ -1198,7 +1203,7 @@ inline void applyStickModeToModel(ModelData &model, unsigned int mode)
|
|||
ModelData model_copy = model;
|
||||
|
||||
// trims
|
||||
for (int p=0; p<C9X_MAX_PHASES; p++) {
|
||||
for (int p=0; p<C9X_MAX_FLIGHT_MODES; p++) {
|
||||
for (int i=0; i<NUM_STICKS/2; i++) {
|
||||
int converted_stick = applyStickMode(i+1, mode) - 1;
|
||||
int tmp = model.phaseData[p].trim[i];
|
||||
|
|
|
@ -455,7 +455,7 @@ t_Gruvin9xModelData_v102::operator ModelData ()
|
|||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++)
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int i=0; i<G9X_MAX_MIXERS; i++)
|
||||
c9x.mixData[i] = mixData[i];
|
||||
|
@ -526,7 +526,7 @@ t_Gruvin9xModelData_v103::operator ModelData ()
|
|||
c9x.beepANACenter = beepANACenter;
|
||||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++)
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++)
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int i=0; i<G9X_MAX_MIXERS; i++)
|
||||
c9x.mixData[i] = mixData[i];
|
||||
|
@ -598,7 +598,7 @@ t_Gruvin9xModelData_v105::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (phaseData[i].trim[j] > 125) {
|
||||
|
@ -689,7 +689,7 @@ t_Gruvin9xModelData_v106::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<G9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<G9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
|
|
@ -277,7 +277,7 @@ PACK(typedef struct t_Gruvin9xTimerData {
|
|||
t_Gruvin9xTimerData() { memset(this, 0, sizeof(t_Gruvin9xTimerData)); }
|
||||
}) Gruvin9xTimerData;
|
||||
|
||||
#define G9X_MAX_PHASES 5
|
||||
#define G9X_MAX_FLIGHT_MODES 5
|
||||
#define G9X_MAX_MIXERS 32
|
||||
#define G9X_MAX_EXPOS 14
|
||||
#define G9X_MAX_CURVE5 8
|
||||
|
@ -312,7 +312,7 @@ PACK(typedef struct t_Gruvin9xModelData_v102 {
|
|||
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
|
||||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
operator ModelData();
|
||||
|
@ -344,7 +344,7 @@ PACK(typedef struct t_Gruvin9xModelData_v103 {
|
|||
Gruvin9xLogicalSwitchData customSw[G9X_NUM_CSW];
|
||||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
operator ModelData();
|
||||
|
@ -377,7 +377,7 @@ PACK(typedef struct t_Gruvin9xModelData_v105 {
|
|||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xFuncSwData funcSw[G9X_NUM_FSW];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v102 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
int16_t subtrim[NUM_STICKS];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
|
@ -409,7 +409,7 @@ PACK(typedef struct t_Gruvin9xModelData_v106 {
|
|||
Gruvin9xSafetySwData safetySw[G9X_NUM_CHNOUT];
|
||||
Gruvin9xFuncSwData funcSw[G9X_NUM_FSW];
|
||||
Gruvin9xSwashRingData swashR;
|
||||
Gruvin9xPhaseData_v106 phaseData[G9X_MAX_PHASES];
|
||||
Gruvin9xPhaseData_v106 phaseData[G9X_MAX_FLIGHT_MODES];
|
||||
Gruvin9xFrSkyData frsky;
|
||||
|
||||
operator ModelData();
|
||||
|
|
|
@ -460,7 +460,7 @@ t_Open9xGruvin9xModelData_v207::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -545,7 +545,7 @@ t_Open9xGruvin9xModelData_v208::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -634,7 +634,7 @@ t_Open9xGruvin9xModelData_v209::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -724,7 +724,7 @@ t_Open9xGruvin9xModelData_v210::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -811,7 +811,7 @@ t_Open9xGruvin9xModelData_v211::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
|
|
@ -197,7 +197,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v207 {
|
|||
Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v208 swashR;
|
||||
Open9xGruvin9xPhaseData_v207 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v207 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v205 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -231,7 +231,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v208 {
|
|||
Open9xGruvin9xLogicalSwitchData_v207 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v208 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -270,7 +270,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v209 {
|
|||
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -310,7 +310,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v210 {
|
|||
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -348,7 +348,7 @@ PACK(typedef struct t_Open9xGruvin9xModelData_v211 {
|
|||
Open9xGruvin9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xGruvin9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xGruvin9xSwashRingData_v209 swashR;
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_PHASES];
|
||||
Open9xGruvin9xPhaseData_v208 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
|
|
@ -767,7 +767,7 @@ t_Open9xArmModelData_v208::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -856,7 +856,7 @@ t_Open9xArmModelData_v209::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -946,7 +946,7 @@ t_Open9xArmModelData_v210::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1030,7 +1030,7 @@ t_Open9xArmModelData_v211::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1117,7 +1117,7 @@ t_Open9xArmModelData_v212::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_ARM_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_ARM_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
#include "open9xStockeeprom.h"
|
||||
|
||||
#define O9X_ARM_MAX_PHASES 9
|
||||
#define O9X_ARM_MAX_FLIGHT_MODES 9
|
||||
#define O9X_ARM_MAX_MIXERS 64
|
||||
#define O9X_ARM_MAX_EXPOS 32
|
||||
#define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16
|
||||
|
@ -346,7 +346,7 @@ PACK(typedef struct t_Open9xArmModelData_v208 {
|
|||
Open9xArmLogicalSwitchData_v208 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v208 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -385,7 +385,7 @@ PACK(typedef struct t_Open9xArmModelData_v209 {
|
|||
Open9xArmLogicalSwitchData_v209 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v208 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -425,7 +425,7 @@ PACK(typedef struct t_Open9xArmModelData_v210 {
|
|||
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v210 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
Open9xArmFrSkyData_v210 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -464,7 +464,7 @@ PACK(typedef struct t_Open9xArmModelData_v211 {
|
|||
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v209 swashR;
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v208 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -502,7 +502,7 @@ PACK(typedef struct t_Open9xArmModelData_v212 {
|
|||
Open9xArmLogicalSwitchData_v210 customSw[O9X_ARM_NUM_CSW];
|
||||
Open9xArmFuncSwData_v211 funcSw[O9X_ARM_NUM_FSW];
|
||||
Open9xArmSwashRingData_v210 swashR;
|
||||
Open9xArmPhaseData_v212 phaseData[O9X_ARM_MAX_PHASES];
|
||||
Open9xArmPhaseData_v212 phaseData[O9X_ARM_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
|
|
@ -948,7 +948,7 @@ t_Open9xModelData_v201::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1022,7 +1022,7 @@ t_Open9xModelData_v202::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1098,7 +1098,7 @@ t_Open9xModelData_v203::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1172,7 +1172,7 @@ t_Open9xModelData_v204::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1251,7 +1251,7 @@ t_Open9xModelData_v205::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1337,7 +1337,7 @@ t_Open9xModelData_v208::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1430,7 +1430,7 @@ t_Open9xModelData_v209::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1524,7 +1524,7 @@ t_Open9xModelData_v210::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
@ -1612,7 +1612,7 @@ t_Open9xModelData_v211::operator ModelData ()
|
|||
c9x.moduleData[0].ppmPulsePol = pulsePol;
|
||||
c9x.extendedLimits = extendedLimits;
|
||||
c9x.extendedTrims = extendedTrims;
|
||||
for (int i=0; i<O9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<O9X_MAX_FLIGHT_MODES; i++) {
|
||||
c9x.phaseData[i] = phaseData[i];
|
||||
for (int j=0; j<NUM_STICKS; j++) {
|
||||
if (c9x.phaseData[i].trim[j] > 500) {
|
||||
|
|
|
@ -482,7 +482,7 @@ PACK(typedef struct t_Open9xTimerDataExtra {
|
|||
}) Open9xTimerDataExtra;
|
||||
|
||||
#define O9X_MAX_TIMERS 2
|
||||
#define O9X_MAX_PHASES 5
|
||||
#define O9X_MAX_FLIGHT_MODES 5
|
||||
#define O9X_MAX_MIXERS 32
|
||||
#define O9X_MAX_EXPOS 14
|
||||
#define O9X_NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
|
@ -520,7 +520,7 @@ PACK(typedef struct t_Open9xModelData_v201 {
|
|||
Open9xSafetySwData safetySw[O9X_NUM_CHNOUT];
|
||||
Open9xFuncSwData_v201 funcSw[12];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v201 frsky;
|
||||
|
||||
operator ModelData();
|
||||
|
@ -551,7 +551,7 @@ PACK(typedef struct t_Open9xModelData_v202 {
|
|||
Open9xSafetySwData safetySw[O9X_NUM_CHNOUT];
|
||||
Open9xFuncSwData_v201 funcSw[12];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v202 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -584,7 +584,7 @@ PACK(typedef struct t_Open9xModelData_v203 {
|
|||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v202 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -617,7 +617,7 @@ PACK(typedef struct t_Open9xModelData_v204 {
|
|||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v204 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -650,7 +650,7 @@ PACK(typedef struct t_Open9xModelData_v205 {
|
|||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v205 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -685,7 +685,7 @@ PACK(typedef struct t_Open9xModelData_v208 {
|
|||
Open9xLogicalSwitchData_v208 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v208 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -724,7 +724,7 @@ PACK(typedef struct t_Open9xModelData_v209 {
|
|||
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v203 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
Open9xFrSkyData_v208 frsky;
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -764,7 +764,7 @@ PACK(typedef struct t_Open9xModelData_v210 {
|
|||
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -802,7 +802,7 @@ PACK(typedef struct t_Open9xModelData_v211 {
|
|||
Open9xLogicalSwitchData_v209 customSw[O9X_NUM_CSW];
|
||||
Open9xFuncSwData_v210 funcSw[O9X_NUM_FSW];
|
||||
Open9xSwashRingData_v209 swashR;
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_PHASES];
|
||||
Open9xPhaseData_v201 phaseData[O9X_MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5msec increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define EEPROM_VARIANT 3
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@
|
|||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define EEPROM_VARIANT SIMU_M128_VARIANTS
|
||||
#define GAUGES
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define NUM_POTS 3
|
||||
#define EEPROM_VARIANT 3
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#define MAX_SWITCHES(board) (IS_TARANIS(board) ? 8 : 7)
|
||||
#define MAX_SWITCHES_POSITION(board) (IS_TARANIS(board) ? 22 : 9)
|
||||
#define MAX_ROTARY_ENCODERS(board) (board==BOARD_GRUVIN9X ? 2 : (board==BOARD_SKY9X ? 1 : 0))
|
||||
#define MAX_PHASES(board, version) (IS_ARM(board) ? 9 : (IS_DBLRAM(board, version) ? 6 : 5))
|
||||
#define MAX_FLIGHT_MODES(board, version) (IS_ARM(board) ? 9 : (IS_DBLRAM(board, version) ? 6 : 5))
|
||||
#define MAX_MIXERS(board, version) (IS_ARM(board) ? 64 : 32)
|
||||
#define MAX_CHANNELS(board, version) (IS_ARM(board) ? 32 : 16)
|
||||
#define MAX_EXPOS(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 64 : 32) : (IS_DBLRAM(board, version) ? 16 : 14))
|
||||
|
@ -91,6 +91,13 @@ class SwitchesConversionTable: public ConversionTable {
|
|||
addConversion(RawSwitch(SWITCH_TYPE_ON), val++);
|
||||
}
|
||||
|
||||
if (IS_ARM(board)) {
|
||||
for (int i=1; i<=MAX_FLIGHT_MODES(board, version); i++) {
|
||||
addConversion(RawSwitch(SWITCH_TYPE_FLIGHT_MODE, -i), -val+offset);
|
||||
addConversion(RawSwitch(SWITCH_TYPE_FLIGHT_MODE, i), val++);
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 216) {
|
||||
// previous "moment" switches
|
||||
for (int i=1; i<=MAX_SWITCHES_POSITION(board); i++) {
|
||||
|
@ -250,15 +257,17 @@ class SourcesConversionTable: public ConversionTable {
|
|||
|
||||
for (int i=0; i<TELEMETRY_SOURCE_ACC; i++) {
|
||||
if (version < 216) {
|
||||
if (i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPD || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
|
||||
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR || i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_ASPD || i==TELEMETRY_SOURCE_DTE || i==TELEMETRY_SOURCE_CELL_MIN || i==TELEMETRY_SOURCE_CELLS_MIN || i==TELEMETRY_SOURCE_VFAS_MIN)
|
||||
continue;
|
||||
}
|
||||
if (!IS_ARM(board)) {
|
||||
if (i==TELEMETRY_SOURCE_SWR|| i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_A3_MIN || i==TELEMETRY_SOURCE_A4_MIN)
|
||||
if (i==TELEMETRY_SOURCE_TX_TIME || i==TELEMETRY_SOURCE_SWR|| i==TELEMETRY_SOURCE_RX_BATT || i==TELEMETRY_SOURCE_A3 || i==TELEMETRY_SOURCE_A4 || i==TELEMETRY_SOURCE_A3_MIN || i==TELEMETRY_SOURCE_A4_MIN)
|
||||
continue;
|
||||
}
|
||||
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, i), val++);
|
||||
if (version >= 216 && IS_ARM(board)) {
|
||||
if (i==TELEMETRY_SOURCE_TX_TIME)
|
||||
val += 5;
|
||||
if (i==TELEMETRY_SOURCE_DTE)
|
||||
val += 5;
|
||||
if (i==TELEMETRY_SOURCE_POWER_MAX)
|
||||
|
@ -777,7 +786,7 @@ class FlightModeField: public TransformedField {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (phase.swtch == RawSwitch(SWITCH_TYPE_NONE)) {
|
||||
if (phase.swtch == RawSwitch(SWITCH_TYPE_NONE) && index > 0) {
|
||||
phase.trimRef[i] = 0;
|
||||
phase.trimMode[i] = 0;
|
||||
phase.trim[i] = 0;
|
||||
|
@ -1590,7 +1599,7 @@ class CustomFunctionsConversionTable: public ConversionTable {
|
|||
int val=0;
|
||||
|
||||
if (version >= 216) {
|
||||
for (int i=0; i<32; i++) {
|
||||
for (int i=0; i<MAX_CHANNELS(board, version); i++) {
|
||||
addConversion(i, val);
|
||||
}
|
||||
val++;
|
||||
|
@ -1750,11 +1759,11 @@ class ArmCustomFunctionField: public TransformedField {
|
|||
internalField.Append(new CharField<6>(_param, false));
|
||||
|
||||
if (version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(_active));
|
||||
internalField.Append(new SignedField<8>(_active));
|
||||
}
|
||||
else if (version >= 214) {
|
||||
internalField.Append(new UnsignedField<2>(_mode));
|
||||
internalField.Append(new UnsignedField<6>(_active));
|
||||
internalField.Append(new UnsignedField<6>((unsigned int &)_active));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new UnsignedField<8>((unsigned int &)_active));
|
||||
|
@ -1915,7 +1924,7 @@ class ArmCustomFunctionField: public TransformedField {
|
|||
CustomFunctionsConversionTable functionsConversionTable;
|
||||
SourcesConversionTable * sourcesConversionTable;
|
||||
char _param[10];
|
||||
unsigned int _active;
|
||||
int _active;
|
||||
unsigned int _mode;
|
||||
};
|
||||
|
||||
|
@ -2401,7 +2410,7 @@ OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigne
|
|||
internalField.Append(new AvrCustomFunctionField(modelData.funcSw[i], board, version, variant));
|
||||
}
|
||||
internalField.Append(new HeliField(modelData.swashRingData, board, version, variant));
|
||||
for (int i=0; i<MAX_PHASES(board, version); i++)
|
||||
for (int i=0; i<MAX_FLIGHT_MODES(board, version); i++)
|
||||
internalField.Append(new FlightModeField(modelData.phaseData[i], i, board, version));
|
||||
|
||||
if (!IS_ARM(board) || version < 216) {
|
||||
|
@ -2639,7 +2648,15 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
|||
internalField.Append(new UnsignedField<8>(generalData.templateSetup));
|
||||
internalField.Append(new SignedField<8>(generalData.PPM_Multiplier));
|
||||
internalField.Append(new SignedField<8>(generalData.hapticLength));
|
||||
|
||||
if (version < 216 || !IS_9X(board)) {
|
||||
internalField.Append(new UnsignedField<8>(generalData.reNavigation));
|
||||
}
|
||||
|
||||
if (version >= 216 && !IS_TARANIS(board)) {
|
||||
internalField.Append(new UnsignedField<4>(generalData.stickReverse));
|
||||
internalField.Append(new SpareBitsField<4>());
|
||||
}
|
||||
|
||||
internalField.Append(new SignedField<3>(generalData.beeperLength));
|
||||
internalField.Append(new UnsignedField<3>(generalData.hapticStrength));
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#define SIMU_M128_VARIANTS (M128_VARIANT|SIMU_STOCK_VARIANTS)
|
||||
|
||||
#define O9X_MAX_TIMERS 2
|
||||
#define O9X_MAX_PHASES 5
|
||||
#define O9X_MAX_FLIGHT_MODES 5
|
||||
#define O9X_MAX_MIXERS 32
|
||||
#define O9X_MAX_EXPOS 14
|
||||
#define O9X_NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
|
@ -41,7 +41,7 @@
|
|||
#define O9X_MAX_CURVES 8
|
||||
#define O9X_NUM_POINTS (112-O9X_MAX_CURVES)
|
||||
|
||||
#define O9X_ARM_MAX_PHASES 9
|
||||
#define O9X_ARM_MAX_FLIGHT_MODES 9
|
||||
#define O9X_ARM_MAX_MIXERS 64
|
||||
#define O9X_ARM_MAX_EXPOS 32
|
||||
#define O9X_ARM_NUM_CHNOUT 32 // number of real output channels CH1-CH16
|
||||
|
|
|
@ -482,14 +482,14 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
|||
return 1;
|
||||
case PPMFrameLength:
|
||||
return 40;
|
||||
case FlightPhases:
|
||||
case FlightModes:
|
||||
if (IS_ARM(board))
|
||||
return 9;
|
||||
else if (board==BOARD_GRUVIN9X)
|
||||
return 6;
|
||||
else
|
||||
return 5;
|
||||
case FlightPhasesHaveFades:
|
||||
case FlightModesHaveFades:
|
||||
return 1;
|
||||
case Gvars:
|
||||
return IS_ARM(board) ? 9 : 5;
|
||||
|
@ -503,7 +503,7 @@ int OpenTxFirmware::getCapability(const Capability capability)
|
|||
case HasFAIMode:
|
||||
return 1;
|
||||
case GvarsAreNamed:
|
||||
case GvarsFlightPhases:
|
||||
case GvarsFlightModes:
|
||||
return ((IS_ARM(board)||(board==BOARD_GRUVIN9X)) ? 1 : 0);
|
||||
case Mixes:
|
||||
return (IS_ARM(board) ? O9X_ARM_MAX_MIXERS : O9X_MAX_MIXERS);
|
||||
|
@ -806,7 +806,7 @@ bool OpenTxEepromInterface::checkVersion(unsigned int version)
|
|||
break;
|
||||
// case 206:
|
||||
case 207:
|
||||
// V4: Rotary Encoders position in FlightPhases
|
||||
// V4: Rotary Encoders position in FlightModes
|
||||
break;
|
||||
case 208:
|
||||
// Trim value in 16bits
|
||||
|
@ -1059,6 +1059,7 @@ void registerOpenTxFirmwares()
|
|||
openTx->addOption("nogps", QObject::tr("No GPS support"));
|
||||
openTx->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
openTx->addOption("fasoffset", QObject::tr("Allow compensating for offset errors in FrSky FAS current sensors"));
|
||||
openTx->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
|
@ -1125,6 +1126,7 @@ void registerOpenTxFirmwares()
|
|||
openTx->addOption("novario", QObject::tr("No vario support"));
|
||||
openTx->addOption("nogps", QObject::tr("No GPS support"));
|
||||
openTx->addOption("nogauges", QObject::tr("No gauges in the custom telemetry screen"));
|
||||
openTx->addOption("stickrev", QObject::tr("Add support for reversing stick inputs (e.g. needed for FrSky gimbals)"));
|
||||
openTx->addOptions(fai_options);
|
||||
firmwares.push_back(openTx);
|
||||
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#define GAUGES
|
||||
#define GPS
|
||||
#define FAI_CHOICE
|
||||
#define FRSKY_STICKS
|
||||
|
||||
#define EEPROM_VARIANT SIMU_STOCK_VARIANTS
|
||||
#define GAUGES
|
||||
|
|
|
@ -279,6 +279,24 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
|||
ui->serialPortLabel->hide();
|
||||
}
|
||||
|
||||
if (!IS_TARANIS(eepromInterface->getBoard())) {
|
||||
ui->stickReverse1->setChecked(g_eeGeneral.stickReverse & (1 << 0));
|
||||
ui->stickReverse2->setChecked(g_eeGeneral.stickReverse & (1 << 1));
|
||||
ui->stickReverse3->setChecked(g_eeGeneral.stickReverse & (1 << 2));
|
||||
ui->stickReverse4->setChecked(g_eeGeneral.stickReverse & (1 << 3));
|
||||
connect(ui->stickReverse1, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
|
||||
connect(ui->stickReverse2, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
|
||||
connect(ui->stickReverse3, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
|
||||
connect(ui->stickReverse4, SIGNAL(toggled(bool)), this, SLOT(stickReverseEdited()));
|
||||
}
|
||||
else {
|
||||
ui->stickReverseLB->hide();
|
||||
ui->stickReverse1->hide();
|
||||
ui->stickReverse2->hide();
|
||||
ui->stickReverse3->hide();
|
||||
ui->stickReverse4->hide();
|
||||
}
|
||||
|
||||
if (IS_TARANIS_PLUS(eepromInterface->getBoard())) {
|
||||
ui->backlightColor_SL->setValue(g_eeGeneral.backlightColor);
|
||||
}
|
||||
|
@ -295,6 +313,12 @@ GeneralEdit::~GeneralEdit()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
void GeneralEdit::stickReverseEdited()
|
||||
{
|
||||
g_eeGeneral.stickReverse = ((int)ui->stickReverse1->isChecked()) | ((int)ui->stickReverse2->isChecked()<<1) | ((int)ui->stickReverse3->isChecked()<<2) | ((int)ui->stickReverse4->isChecked()<<3);
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
void GeneralEdit::on_pot1Type_currentIndexChanged(int index)
|
||||
{
|
||||
g_eeGeneral.potsType[0] = index;
|
||||
|
|
|
@ -131,6 +131,7 @@ private slots:
|
|||
void unlockSwitchEdited();
|
||||
void setValues();
|
||||
void shrink();
|
||||
void stickReverseEdited();
|
||||
};
|
||||
|
||||
#endif // GENERALEDIT_H
|
||||
|
|
|
@ -1932,6 +1932,51 @@ p, li { white-space: pre-wrap; }
|
|||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="31" column="0">
|
||||
<widget class="QLabel" name="stickReverseLB">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Stick reverse (order as above)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="31" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="stickReverse1">
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="stickReverse2">
|
||||
<property name="text">
|
||||
<string notr="true">2</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="stickReverse3">
|
||||
<property name="text">
|
||||
<string notr="true">3</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="stickReverse4">
|
||||
<property name="text">
|
||||
<string notr="true">4</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tabTrainer">
|
||||
|
|
|
@ -40,7 +40,7 @@ const QColor colors[C9X_MAX_CURVES] = {
|
|||
QColor(255,127,0),
|
||||
};
|
||||
|
||||
QString getPhaseName(int val, char * phasename)
|
||||
QString getPhaseName(int val, const char * phasename)
|
||||
{
|
||||
if (!val) return "---";
|
||||
if (!phasename) {
|
||||
|
@ -63,8 +63,11 @@ QString getInputStr(ModelData & model, int index)
|
|||
QString result;
|
||||
|
||||
if (GetCurrentFirmware()->getCapability(VirtualInputs)) {
|
||||
result = model.inputNames[index];
|
||||
if (result.isEmpty()) {
|
||||
if (strlen(model.inputNames[index]) > 0) {
|
||||
result = QObject::tr("[I%1]").arg(index+1);
|
||||
result += QString(model.inputNames[index]);
|
||||
}
|
||||
else {
|
||||
result = QObject::tr("Input%1").arg(index+1, 2, 10, QChar('0'));
|
||||
}
|
||||
}
|
||||
|
@ -126,7 +129,7 @@ QString getProtocolStr(const int proto)
|
|||
|
||||
void populatePhasesCB(QComboBox *b, int value)
|
||||
{
|
||||
for (int i=-GetCurrentFirmware()->getCapability(FlightPhases); i<=GetCurrentFirmware()->getCapability(FlightPhases); i++) {
|
||||
for (int i=-GetCurrentFirmware()->getCapability(FlightModes); i<=GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
if (i < 0)
|
||||
b->addItem(QObject::tr("!Flight mode %1").arg(-i-1), i);
|
||||
else if (i > 0)
|
||||
|
@ -134,7 +137,7 @@ void populatePhasesCB(QComboBox *b, int value)
|
|||
else
|
||||
b->addItem(QObject::tr("----"), 0);
|
||||
}
|
||||
b->setCurrentIndex(value + GetCurrentFirmware()->getCapability(FlightPhases));
|
||||
b->setCurrentIndex(value + GetCurrentFirmware()->getCapability(FlightModes));
|
||||
}
|
||||
|
||||
bool gvarsEnabled()
|
||||
|
@ -341,7 +344,7 @@ void CurveGroup::valuesChanged()
|
|||
void populateGvarUseCB(QComboBox *b, unsigned int phase)
|
||||
{
|
||||
b->addItem(QObject::tr("Own value"));
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
if (i != (int)phase) {
|
||||
b->addItem(QObject::tr("Flight mode %1 value").arg(i));
|
||||
}
|
||||
|
@ -397,6 +400,13 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
|
|||
b->clear();
|
||||
|
||||
if (attr & POPULATE_ONOFF) {
|
||||
if (IS_ARM(GetCurrentFirmware()->getBoard())) {
|
||||
for (int i=-GetCurrentFirmware()->getCapability(FlightModes); i<0; i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_FLIGHT_MODE, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
}
|
||||
item = RawSwitch(SWITCH_TYPE_OFF);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
|
@ -487,6 +497,13 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
|
|||
item = RawSwitch(SWITCH_TYPE_ON);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
if (IS_ARM(GetCurrentFirmware()->getBoard())) {
|
||||
for (int i=1; i<=GetCurrentFirmware()->getCapability(FlightModes); i++) {
|
||||
item = RawSwitch(SWITCH_TYPE_FLIGHT_MODE, i);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == value) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
b->setMaxVisibleItems(10);
|
||||
|
@ -545,11 +562,13 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
|
|||
if (flags & POPULATE_VIRTUAL_INPUTS) {
|
||||
int virtualInputs = GetCurrentFirmware()->getCapability(VirtualInputs);
|
||||
for (int i=0; i<virtualInputs; i++) {
|
||||
if (model.isInputValid(i)) {
|
||||
item = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i, &model);
|
||||
b->addItem(item.toString(), item.toValue());
|
||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (flags & POPULATE_SOURCES) {
|
||||
for (int i=0; i<4+GetCurrentFirmware()->getCapability(Pots); i++) {
|
||||
|
@ -830,7 +849,7 @@ QString getProtocol(ModelData * g_model)
|
|||
|
||||
QString getPhasesStr(unsigned int phases, ModelData & model)
|
||||
{
|
||||
int numphases = GetCurrentFirmware()->getCapability(FlightPhases);
|
||||
int numphases = GetCurrentFirmware()->getCapability(FlightModes);
|
||||
|
||||
if (numphases && phases) {
|
||||
QString str;
|
||||
|
|
|
@ -37,6 +37,8 @@ class CompanionIcon: public QIcon {
|
|||
CompanionIcon(QString baseimage);
|
||||
};
|
||||
|
||||
bool gvarsEnabled();
|
||||
|
||||
class GVarGroup : public QObject {
|
||||
|
||||
Q_OBJECT
|
||||
|
@ -105,7 +107,7 @@ QString getPhasesStr(unsigned int phases, ModelData & model);
|
|||
void populateGVCB(QComboBox *b, int value);
|
||||
void populateSourceCB(QComboBox *b, const RawSource &source, const ModelData & model, unsigned int flags);
|
||||
void populateCSWCB(QComboBox *b, int value);
|
||||
QString getPhaseName(int val, char * phasename=NULL);
|
||||
QString getPhaseName(int val, const char * phasename=NULL);
|
||||
QString getInputStr(ModelData & model, int index);
|
||||
QString image2qstring(QImage image);
|
||||
QImage qstring2image(QString imagestr);
|
||||
|
|
|
@ -1563,7 +1563,12 @@ MdiChild *MainWindow::createMdiChild()
|
|||
return child;
|
||||
}
|
||||
|
||||
QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySequence::StandardKey shortcut, const char *slot, QObject *slotObj)
|
||||
QAction * MainWindow::addAct(const QString & icon, const QString & sName, const QString & lName, enum QKeySequence::StandardKey shortcut, const char *slot, QObject *slotObj)
|
||||
{
|
||||
return addAct(icon, sName, lName, QKeySequence(shortcut), slot, slotObj);
|
||||
}
|
||||
|
||||
QAction * MainWindow::addAct(const QString & icon, const QString & sName, const QString & lName, const QKeySequence & shortcut, const char *slot, QObject *slotObj)
|
||||
{
|
||||
QAction * newAction = new QAction( this );
|
||||
if (!icon.isEmpty())
|
||||
|
@ -1572,20 +1577,20 @@ QAction * MainWindow::addAct(QString icon, QString sName, QString lName, QKeySeq
|
|||
newAction->setText(sName);
|
||||
if (!lName.isEmpty())
|
||||
newAction->setStatusTip(lName);
|
||||
if (shortcut != 0)
|
||||
newAction->setShortcuts(shortcut);
|
||||
newAction->setShortcut(shortcut);
|
||||
if (slotObj == NULL)
|
||||
slotObj = this;
|
||||
connect(newAction, SIGNAL(triggered()), slotObj, slot);
|
||||
return newAction;
|
||||
}
|
||||
|
||||
QAction * MainWindow::addAct(QString icon, QString sName, QString lName, const char *slot)
|
||||
|
||||
QAction * MainWindow::addAct(const QString & icon, const QString & sName, const QString & lName, const char *slot)
|
||||
{
|
||||
return addAct(icon, sName, lName, QKeySequence::UnknownKey, slot);
|
||||
}
|
||||
|
||||
QAction * MainWindow::addAct(QActionGroup *aGroup, QString sName, QString lName, const char *slot)
|
||||
QAction * MainWindow::addAct(QActionGroup *aGroup, const QString & sName, const QString & lName, const char *slot)
|
||||
{
|
||||
QAction *action = addAct("", sName, lName, QKeySequence::UnknownKey, slot);
|
||||
action->setCheckable(true);
|
||||
|
@ -1653,8 +1658,8 @@ void MainWindow::createActions()
|
|||
// dutchLangAct = addAct( langAlignGroup, tr("Dutch"), tr("Use Dutch in menus"), SLOT(setNLLanguage()));
|
||||
|
||||
aboutAct = addAct("information.png", tr("About..."), tr("Show the application's About box"), SLOT(about()));
|
||||
printAct = addAct("print.png", tr("Print..."), tr("Print current model"), SLOT(print()));
|
||||
simulateAct = addAct("simulate.png", tr("Simulate..."), tr("Simulate current model"), SLOT(simulate()));
|
||||
printAct = addAct("print.png", tr("Print..."), tr("Print current model"), QKeySequence::Print, SLOT(print()));
|
||||
simulateAct = addAct("simulate.png", tr("Simulate..."), tr("Simulate current model"), QKeySequence(tr("Alt+S")), SLOT(simulate()));
|
||||
loadbackupAct = addAct("open.png", tr("Load Backup..."), tr("Load backup from file"), SLOT(loadBackup()));
|
||||
logsAct = addAct("logs.png", tr("View Log File..."), tr("Open and view log file"), SLOT(logFile()));
|
||||
appPrefsAct = addAct("apppreferences.png",tr("Settings..."), tr("Edit Settings"), SLOT(appPrefs()));
|
||||
|
@ -1683,12 +1688,11 @@ void MainWindow::createActions()
|
|||
}
|
||||
|
||||
void MainWindow::createMenus()
|
||||
|
||||
{
|
||||
QMenu *recentFileMenu=new QMenu(tr("Recent Files"), this);
|
||||
QMenu *languageMenu=new QMenu(tr("Set Menu Language"), this);
|
||||
QMenu *themeMenu=new QMenu(tr("Set Icon Theme"), this);
|
||||
QMenu *iconThemeSizeMenu=new QMenu(tr("Set Icon Size"), this);
|
||||
QMenu *recentFileMenu = new QMenu(tr("Recent Files"), this);
|
||||
QMenu *languageMenu = new QMenu(tr("Set Menu Language"), this);
|
||||
QMenu *themeMenu = new QMenu(tr("Set Icon Theme"), this);
|
||||
QMenu *iconThemeSizeMenu = new QMenu(tr("Set Icon Size"), this);
|
||||
|
||||
fileMenu = menuBar()->addMenu(tr("File"));
|
||||
fileMenu->addAction(newAct);
|
||||
|
|
|
@ -159,9 +159,10 @@ class MainWindow : public QMainWindow
|
|||
|
||||
private:
|
||||
void createActions();
|
||||
QAction * addAct(QString, QString, QString, QKeySequence::StandardKey, const char *, QObject *slotObj=NULL);
|
||||
QAction * addAct(QActionGroup *, QString, QString, const char *);
|
||||
QAction * addAct(QString, QString, QString, const char *);
|
||||
QAction * addAct(const QString &, const QString &, const QString &, enum QKeySequence::StandardKey, const char *, QObject *slotObj=NULL);
|
||||
QAction * addAct(const QString &, const QString &, const QString &, const QKeySequence &, const char *, QObject *slotObj=NULL);
|
||||
QAction * addAct(QActionGroup *, const QString &, const QString &, const char *);
|
||||
QAction * addAct(const QString &, const QString &, const QString &, const char *);
|
||||
|
||||
void createMenus();
|
||||
void createToolBars();
|
||||
|
|
|
@ -386,6 +386,10 @@ void Curves::onNodeMoved(int x, int y)
|
|||
model.curves[currentCurve].points[index].y = y;
|
||||
spnx[index]->setValue(x);
|
||||
spny[index]->setValue(y);
|
||||
if (index > 0)
|
||||
spnx[index-1]->setMaximum(x);
|
||||
if (index < model.curves[currentCurve].count-1)
|
||||
spnx[index+1]->setMinimum(x);
|
||||
emit modified();
|
||||
lock = false;
|
||||
}
|
||||
|
|
|
@ -339,8 +339,14 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
|
|||
if (modified) model.funcSw[i].param = fswtchParam[i]->value();
|
||||
fswtchParam[i]->setDecimals(0);
|
||||
fswtchParam[i]->setSingleStep(1);
|
||||
if (IS_ARM(GetEepromInterface()->getBoard())) {
|
||||
fswtchParam[i]->setMinimum(-500);
|
||||
fswtchParam[i]->setMaximum(500);
|
||||
}
|
||||
else {
|
||||
fswtchParam[i]->setMinimum(-125);
|
||||
fswtchParam[i]->setMaximum(125);
|
||||
}
|
||||
fswtchParam[i]->setValue(model.funcSw[i].param);
|
||||
widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM;
|
||||
}
|
||||
|
@ -676,7 +682,7 @@ void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, const ModelData & m
|
|||
else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) {
|
||||
switch (adjustmode) {
|
||||
case 1:
|
||||
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES);
|
||||
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_TRIMS|POPULATE_SWITCHES);
|
||||
break;
|
||||
case 2:
|
||||
populateSourceCB(b, RawSource(value), model, POPULATE_GVARS);
|
||||
|
|
|
@ -29,7 +29,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
|||
|
||||
ui->sideCB->setCurrentIndex(ed->mode-1);
|
||||
|
||||
if (!firmware->getCapability(FlightPhases)) {
|
||||
if (!firmware->getCapability(FlightModes)) {
|
||||
ui->label_phases->hide();
|
||||
for (int i=0; i<9; i++) {
|
||||
lb_fp[i]->hide();
|
||||
|
@ -44,7 +44,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
|||
}
|
||||
mask <<= 1;
|
||||
}
|
||||
for (int i=firmware->getCapability(FlightPhases); i<9;i++) {
|
||||
for (int i=firmware->getCapability(FlightModes); i<9;i++) {
|
||||
lb_fp[i]->hide();
|
||||
cb_fp[i]->hide();
|
||||
}
|
||||
|
@ -154,11 +154,11 @@ void ExpoDialog::valuesChanged()
|
|||
ed->phases<<=1;
|
||||
}
|
||||
ed->phases>>=1;
|
||||
if (firmware->getCapability(FlightPhases)) {
|
||||
if (firmware->getCapability(FlightModes)) {
|
||||
int zeros=0;
|
||||
int ones=0;
|
||||
int phtemp=ed->phases;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
if (phtemp & 1) {
|
||||
ones++;
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ void ExpoDialog::valuesChanged()
|
|||
}
|
||||
if (zeros==1) {
|
||||
phtemp=ed->phases;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
if ((phtemp & 1)==0) {
|
||||
break;
|
||||
}
|
||||
|
@ -178,7 +178,7 @@ void ExpoDialog::valuesChanged()
|
|||
}
|
||||
else if (ones==1) {
|
||||
phtemp=ed->phases;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
if (phtemp & 1) {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <QComboBox>
|
||||
#include <QGridLayout>
|
||||
|
||||
FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
ModelPanel(parent, model, generalSettings, firmware),
|
||||
ui(new Ui::FlightMode),
|
||||
phaseIdx(phaseIdx),
|
||||
|
@ -16,7 +16,7 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
int modesCount = firmware->getCapability(FlightPhases);
|
||||
int modesCount = firmware->getCapability(FlightModes);
|
||||
|
||||
// Phase name
|
||||
QRegExp rx(CHAR_FOR_NAMES_REGEX);
|
||||
|
@ -39,7 +39,7 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
|||
}
|
||||
|
||||
// FadeIn / FadeOut
|
||||
if (firmware->getCapability(FlightPhasesHaveFades)) {
|
||||
if (firmware->getCapability(FlightModesHaveFades)) {
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
int range = firmware->getCapability(SlowRange);
|
||||
ui->fadeIn->setMaximum(float(range)/scale);
|
||||
|
@ -158,7 +158,7 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
|||
gvLayout->addWidget(gvValues[i], i, col++, 1, 1);
|
||||
|
||||
// Popups
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard()) && (phaseIdx == 0)) {
|
||||
gvPopups[i] = new QCheckBox(ui->gvGB);
|
||||
gvPopups[i]->setProperty("index", i);
|
||||
gvPopups[i]->setText(tr("Popup enabled"));
|
||||
|
@ -174,12 +174,12 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
|||
update();
|
||||
}
|
||||
|
||||
FlightMode::~FlightMode()
|
||||
FlightModePanel::~FlightModePanel()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FlightMode::update()
|
||||
void FlightModePanel::update()
|
||||
{
|
||||
ui->name->setText(phase.name);
|
||||
|
||||
|
@ -205,7 +205,7 @@ void FlightMode::update()
|
|||
gvValues[i]->setDisabled(false);
|
||||
int idx = phase.gvars[i];
|
||||
PhaseData *phasegvar = &phase;
|
||||
while (idx >= 1024) {
|
||||
while (idx > 1024) {
|
||||
idx -= 1025;
|
||||
phasegvar = &model.phaseData[idx];
|
||||
idx = phasegvar->gvars[i];
|
||||
|
@ -213,6 +213,7 @@ void FlightMode::update()
|
|||
}
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
gvValues[i]->setValue(phasegvar->gvars[i]);
|
||||
if (phaseIdx == 0)
|
||||
gvPopups[i]->setChecked(model.gvars_popups[i]);
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +222,7 @@ void FlightMode::update()
|
|||
reValues[i]->setDisabled(false);
|
||||
int idx = phase.rotaryEncoders[i];
|
||||
PhaseData *phasere = &phase;
|
||||
while (idx >= 1024) {
|
||||
while (idx > 1024) {
|
||||
idx -= 1025;
|
||||
phasere = &model.phaseData[idx];
|
||||
idx = phasere->rotaryEncoders[i];
|
||||
|
@ -231,7 +232,7 @@ void FlightMode::update()
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseName_editingFinished()
|
||||
void FlightModePanel::phaseName_editingFinished()
|
||||
{
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit*>(sender());
|
||||
strcpy(phase.name, lineEdit->text().toAscii());
|
||||
|
@ -239,14 +240,14 @@ void FlightMode::phaseName_editingFinished()
|
|||
emit nameModified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseSwitch_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseSwitch_currentIndexChanged(int index)
|
||||
{
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
phase.swtch = RawSwitch(comboBox->itemData(index).toInt());
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseFadeIn_editingFinished()
|
||||
void FlightModePanel::phaseFadeIn_editingFinished()
|
||||
{
|
||||
QDoubleSpinBox *spinBox = qobject_cast<QDoubleSpinBox*>(sender());
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
|
@ -254,7 +255,7 @@ void FlightMode::phaseFadeIn_editingFinished()
|
|||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseFadeOut_editingFinished()
|
||||
void FlightModePanel::phaseFadeOut_editingFinished()
|
||||
{
|
||||
QDoubleSpinBox *spinBox = qobject_cast<QDoubleSpinBox*>(sender());
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
|
@ -262,7 +263,7 @@ void FlightMode::phaseFadeOut_editingFinished()
|
|||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::trimUpdate(unsigned int trim)
|
||||
void FlightModePanel::trimUpdate(unsigned int trim)
|
||||
{
|
||||
lock = true;
|
||||
int chn = CONVERT_MODE(trim+1)-1;
|
||||
|
@ -282,7 +283,7 @@ void FlightMode::trimUpdate(unsigned int trim)
|
|||
lock = false;
|
||||
}
|
||||
|
||||
void FlightMode::phaseGVValue_editingFinished()
|
||||
void FlightModePanel::phaseGVValue_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
QSpinBox *spinBox = qobject_cast<QSpinBox*>(sender());
|
||||
|
@ -292,7 +293,7 @@ void FlightMode::phaseGVValue_editingFinished()
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::GVName_editingFinished()
|
||||
void FlightModePanel::GVName_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
QLineEdit *lineedit = qobject_cast<QLineEdit*>(sender());
|
||||
|
@ -303,7 +304,7 @@ void FlightMode::GVName_editingFinished()
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::GVSource_currentIndexChanged(int index)
|
||||
void FlightModePanel::GVSource_currentIndexChanged(int index)
|
||||
{
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
int gvar = comboBox->property("index").toInt();
|
||||
|
@ -311,7 +312,7 @@ void FlightMode::GVSource_currentIndexChanged(int index)
|
|||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseGVUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
lock = true;
|
||||
|
@ -321,7 +322,7 @@ void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
|||
phase.gvars[gvar]=0;
|
||||
}
|
||||
else {
|
||||
phase.gvars[gvar] = 1024+index;
|
||||
phase.gvars[gvar] = 1024+index+(index>phaseIdx?1:0);
|
||||
}
|
||||
update();
|
||||
emit modified();
|
||||
|
@ -329,14 +330,14 @@ void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseGVPopupToggled(bool checked)
|
||||
void FlightModePanel::phaseGVPopupToggled(bool checked)
|
||||
{
|
||||
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
|
||||
int gvar = cb->property("index").toInt();
|
||||
model.gvars_popups[gvar] = checked;
|
||||
}
|
||||
|
||||
void FlightMode::phaseREValue_editingFinished()
|
||||
void FlightModePanel::phaseREValue_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
QSpinBox *spinBox = qobject_cast<QSpinBox*>(sender());
|
||||
|
@ -346,7 +347,7 @@ void FlightMode::phaseREValue_editingFinished()
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseREUse_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseREUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
lock = true;
|
||||
|
@ -364,7 +365,7 @@ void FlightMode::phaseREUse_currentIndexChanged(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseTrimUse_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseTrimUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
|
@ -386,7 +387,7 @@ void FlightMode::phaseTrimUse_currentIndexChanged(int index)
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseTrim_valueChanged()
|
||||
void FlightModePanel::phaseTrim_valueChanged()
|
||||
{
|
||||
if (!lock) {
|
||||
QSpinBox *spinBox = qobject_cast<QSpinBox*>(sender());
|
||||
|
@ -401,7 +402,7 @@ void FlightMode::phaseTrim_valueChanged()
|
|||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseTrimSlider_valueChanged()
|
||||
void FlightModePanel::phaseTrimSlider_valueChanged()
|
||||
{
|
||||
if (!lock) {
|
||||
QSlider *slider = qobject_cast<QSlider*>(sender());
|
||||
|
@ -418,14 +419,14 @@ void FlightMode::phaseTrimSlider_valueChanged()
|
|||
|
||||
/**********************************************************/
|
||||
|
||||
FlightModes::FlightModes(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
FlightModesPanel::FlightModesPanel(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
ModelPanel(parent, model, generalSettings, firmware),
|
||||
modesCount(firmware->getCapability(FlightPhases))
|
||||
modesCount(firmware->getCapability(FlightModes))
|
||||
{
|
||||
QGridLayout * gridLayout = new QGridLayout(this);
|
||||
tabWidget = new QTabWidget(this);
|
||||
for (int i=0; i<modesCount; i++) {
|
||||
FlightMode *tab = new FlightMode(tabWidget, model, i, generalSettings, firmware);
|
||||
FlightModePanel *tab = new FlightModePanel(tabWidget, model, i, generalSettings, firmware);
|
||||
tab->setProperty("index", i);
|
||||
panels << tab;
|
||||
connect(tab, SIGNAL(modified()), this, SLOT(onPhaseModified()));
|
||||
|
@ -436,16 +437,16 @@ FlightModes::FlightModes(QWidget * parent, ModelData & model, GeneralSettings &
|
|||
connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int)));
|
||||
}
|
||||
|
||||
FlightModes::~FlightModes()
|
||||
FlightModesPanel::~FlightModesPanel()
|
||||
{
|
||||
}
|
||||
|
||||
void FlightModes::onPhaseModified()
|
||||
void FlightModesPanel::onPhaseModified()
|
||||
{
|
||||
emit modified();
|
||||
}
|
||||
|
||||
QString FlightModes::getTabName(int index)
|
||||
QString FlightModesPanel::getTabName(int index)
|
||||
{
|
||||
QString result = tr("Flight Mode %1").arg(index);
|
||||
const char *name = model.phaseData[index].name;
|
||||
|
@ -459,18 +460,18 @@ QString FlightModes::getTabName(int index)
|
|||
return result;
|
||||
}
|
||||
|
||||
void FlightModes::onPhaseNameChanged()
|
||||
void FlightModesPanel::onPhaseNameChanged()
|
||||
{
|
||||
int index = sender()->property("index").toInt();
|
||||
tabWidget->setTabText(index, getTabName(index));
|
||||
}
|
||||
|
||||
void FlightModes::update()
|
||||
void FlightModesPanel::update()
|
||||
{
|
||||
on_tabWidget_currentChanged(tabWidget->currentIndex());
|
||||
}
|
||||
|
||||
void FlightModes::on_tabWidget_currentChanged(int index)
|
||||
void FlightModesPanel::on_tabWidget_currentChanged(int index)
|
||||
{
|
||||
panels[index]->update();
|
||||
}
|
||||
|
|
|
@ -13,13 +13,13 @@ namespace Ui {
|
|||
class FlightMode;
|
||||
}
|
||||
|
||||
class FlightMode : public ModelPanel
|
||||
class FlightModePanel : public ModelPanel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightMode(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightMode();
|
||||
FlightModePanel(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightModePanel();
|
||||
|
||||
virtual void update();
|
||||
|
||||
|
@ -61,13 +61,13 @@ class FlightMode : public ModelPanel
|
|||
|
||||
};
|
||||
|
||||
class FlightModes : public ModelPanel
|
||||
class FlightModesPanel : public ModelPanel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightModes(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightModes();
|
||||
FlightModesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightModesPanel();
|
||||
|
||||
virtual void update();
|
||||
|
||||
|
@ -80,7 +80,7 @@ class FlightModes : public ModelPanel
|
|||
int modesCount;
|
||||
QTabWidget *tabWidget;
|
||||
QString getTabName(int index);
|
||||
QVector<FlightMode *> panels;
|
||||
QVector<FlightModePanel *> panels;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
|
|||
if ((dest == 0) || (model.expoData[dest-1].chn != md->chn)) {
|
||||
if (new_ch) *new_ch = 1;
|
||||
if (firmware->getCapability(VirtualInputs))
|
||||
str = QString("%1").arg(getInputStr(model, md->chn), -8, ' ');
|
||||
str = QString("%1").arg(getInputStr(model, md->chn), -10, ' ');
|
||||
else
|
||||
str = getInputStr(model, md->chn);
|
||||
}
|
||||
|
@ -155,16 +155,6 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
|
|||
str = " ";
|
||||
}
|
||||
|
||||
if (firmware->getCapability(VirtualInputs)) {
|
||||
str += " " + tr("Source(%1)").arg(md->srcRaw.toString());
|
||||
if (md->carryTrim>0) {
|
||||
str += " " + tr("No Trim");
|
||||
}
|
||||
else if (md->carryTrim<0) {
|
||||
str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
|
||||
}
|
||||
}
|
||||
|
||||
switch (md->mode) {
|
||||
case (1): str += " <-"; break;
|
||||
case (2): str += " ->"; break;
|
||||
|
@ -173,7 +163,17 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
|
|||
|
||||
str += " " + tr("Weight(%1)").arg(getGVarString(md->weight));
|
||||
|
||||
if (md->curve.value) str += " " + md->curve.toString();
|
||||
if (firmware->getCapability(VirtualInputs)) {
|
||||
str += " " + tr("Source(%1)").arg(md->srcRaw.toString());
|
||||
if (md->carryTrim>0) {
|
||||
str += " " + tr("NoTrim");
|
||||
}
|
||||
else if (md->carryTrim<0) {
|
||||
str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
|
||||
}
|
||||
}
|
||||
|
||||
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
|
||||
|
||||
QString phasesStr = getPhasesStr(md->phases, model);
|
||||
if (!phasesStr.isEmpty()) str += " " + phasesStr;
|
||||
|
|
|
@ -55,7 +55,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
|
|||
ui->mixerName->setValidator(new QRegExpValidator(rx, this));
|
||||
ui->mixerName->setText(md->name);
|
||||
|
||||
if (!firmware->getCapability(FlightPhases)) {
|
||||
if (!firmware->getCapability(FlightModes)) {
|
||||
ui->label_phases->hide();
|
||||
for (int i=0; i<9; i++) {
|
||||
lb_fp[i]->hide();
|
||||
|
@ -70,7 +70,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
|
|||
}
|
||||
mask <<= 1;
|
||||
}
|
||||
for (int i=firmware->getCapability(FlightPhases); i<9;i++) {
|
||||
for (int i=firmware->getCapability(FlightModes); i<9;i++) {
|
||||
lb_fp[i]->hide();
|
||||
cb_fp[i]->hide();
|
||||
}
|
||||
|
|
|
@ -170,6 +170,10 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
|
|||
default: str += " "; break;
|
||||
};
|
||||
|
||||
//set mixer src model if it is unset (srcRaw needs this to generate proper toString() for input source type)
|
||||
if (md->srcRaw.model == 0)
|
||||
md->srcRaw.model = &model;
|
||||
|
||||
//highlight source if needed
|
||||
if ( (md->srcRaw.type == SOURCE_TYPE_CH) && (md->srcRaw.index+1 == (int)highlightedSource) ) {
|
||||
str += " <b>" + Qt::escape(md->srcRaw.toString()) + "</b>";
|
||||
|
@ -187,11 +191,8 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
|
|||
str += " " + Qt::escape(tr("Switch(%1)").arg(md->swtch.toString()));
|
||||
}
|
||||
|
||||
if (md->carryTrim>0) {
|
||||
str += " " + Qt::escape(tr("No Trim"));
|
||||
}
|
||||
else if (md->carryTrim<0) {
|
||||
str += " " + Qt::escape(RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString());
|
||||
if (md->carryTrim) {
|
||||
str += " " + Qt::escape(tr("NoTrim"));
|
||||
}
|
||||
|
||||
if (md->noExpo) str += " " + Qt::escape(tr("No DR/Expo"));
|
||||
|
@ -210,7 +211,7 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
|
|||
QString MixerName;
|
||||
MixerName.append(md->name);
|
||||
if (!MixerName.isEmpty()) {
|
||||
str += Qt::escape(QString("(%1)").arg(MixerName));
|
||||
str += " " + Qt::escape(QString("(%1)").arg(MixerName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, Firmw
|
|||
SetupPanel * setupPanel = new SetupPanel(this, model, generalSettings, firmware);
|
||||
addTab(setupPanel, tr("Setup"));
|
||||
addTab(new HeliPanel(this, model, generalSettings, firmware), tr("Heli"));
|
||||
addTab(new FlightModes(this, model, generalSettings, firmware), tr("Flight Modes"));
|
||||
addTab(new FlightModesPanel(this, model, generalSettings, firmware), tr("Flight Modes"));
|
||||
addTab(new InputsPanel(this, model, generalSettings, firmware), tr("Inputs"));
|
||||
addTab(new MixesPanel(this, model, generalSettings, firmware), tr("Mixes"));
|
||||
Channels * chnPanel = new Channels(this, model, generalSettings, firmware);
|
||||
|
|
|
@ -97,7 +97,7 @@ void ModelsListWidget::ShowContextMenu(const QPoint& pos)
|
|||
contextMenu.addSeparator();
|
||||
contextMenu.addAction(CompanionIcon("currentmodel.png"), tr("&Use as default"),this,SLOT(setdefault()));
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addAction(CompanionIcon("print.png"), tr("P&rint model"),this, SLOT(print()),tr("Alt+R"));
|
||||
contextMenu.addAction(CompanionIcon("print.png"), tr("P&rint model"),this, SLOT(print()),QKeySequence(tr("Ctrl+P")));
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addAction(CompanionIcon("simulate.png"), tr("&Simulate model"),this, SLOT(simulate()),tr("Alt+S"));
|
||||
contextMenu.exec(globalPos);
|
||||
|
|
|
@ -20,14 +20,20 @@ PrintDialog::PrintDialog(QWidget *parent, FirmwareInterface * firmware, GeneralS
|
|||
g_eeGeneral(gg),
|
||||
g_model(gm),
|
||||
printfilename(filename),
|
||||
ui(new Ui::PrintDialog)
|
||||
ui(new Ui::PrintDialog),
|
||||
gvars(gvarsEnabled()),
|
||||
gvarnum (0)
|
||||
{
|
||||
if (gvars) {
|
||||
gvarnum=firmware->getCapability(Gvars);
|
||||
}
|
||||
|
||||
ui->setupUi(this);
|
||||
this->setWindowIcon(CompanionIcon("print.png"));
|
||||
te = ui->textEdit;
|
||||
|
||||
setWindowTitle(tr("Setup for: ") + g_model->name);
|
||||
ui->textEdit->clear();
|
||||
te->clear();
|
||||
QString modelname=g_model->name;
|
||||
if (modelname.isEmpty()) {
|
||||
curvefile5=QString("%1/curve5.png").arg(qd->tempPath());
|
||||
|
@ -38,20 +44,10 @@ PrintDialog::PrintDialog(QWidget *parent, FirmwareInterface * firmware, GeneralS
|
|||
curvefile9=QString("%1/%2-curve9.png").arg(qd->tempPath()).arg(modelname);
|
||||
}
|
||||
printSetup();
|
||||
int gvars=0;
|
||||
if (firmware->getCapability(HasVariants)) {
|
||||
if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) {
|
||||
gvars=1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
gvars=1;
|
||||
}
|
||||
|
||||
if (gvars) {
|
||||
te->append(printPhases()+"<br>");
|
||||
te->append(printFlightModes()+"<br>");
|
||||
}
|
||||
printExpo();
|
||||
printInputs();
|
||||
printMixes();
|
||||
printLimits();
|
||||
printCurves();
|
||||
|
@ -115,16 +111,8 @@ QString PrintDialog::fv(const QString name, const QString value)
|
|||
|
||||
void PrintDialog::printSetup()
|
||||
{
|
||||
int gvars=0;
|
||||
if (firmware->getCapability(HasVariants)) {
|
||||
if ((GetCurrentFirmwareVariant() & GVARS_VARIANT)) {
|
||||
gvars=1;
|
||||
}
|
||||
} else {
|
||||
gvars=1;
|
||||
}
|
||||
QString str = "<a name=1></a><table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append(QString("<tr><td colspan=%1 ><table border=0 width=\"100%\"><tr><td><h1>").arg((firmware->getCapability(FlightPhases) && gvars==0) ? 2 : 1));
|
||||
str.append(QString("<tr><td colspan=%1 ><table border=0 width=\"100%\"><tr><td><h1>").arg((firmware->getCapability(FlightModes) && !gvars) ? 2 : 1));
|
||||
str.append(g_model->name);
|
||||
str.append(" (");
|
||||
str.append(firmware->getEepromInterface()->getName());
|
||||
|
@ -132,7 +120,7 @@ void PrintDialog::printSetup()
|
|||
str.append("<tr><td><h2>"+tr("General Model Settings")+"</h2></td></tr>");
|
||||
str.append("<tr><td>");
|
||||
str.append(fv(tr("Name"), g_model->name));
|
||||
str.append("<b>"+tr("EEprom Size")+QString(": </b><font color=green>%1</font><br>").arg(firmware->getEepromInterface()->getSize(*g_model)));
|
||||
str.append(fv(tr("EEprom Size"), QString("%1").arg(firmware->getEepromInterface()->getSize(*g_model))));
|
||||
str.append(fv(tr("Timer1"), getTimerStr(g_model->timers[0]))); //value, mode, count up/down
|
||||
str.append(fv(tr("Timer2"), getTimerStr(g_model->timers[1]))); //value, mode, count up/down
|
||||
str.append(fv(tr("Protocol"), getProtocol(g_model))); //proto, numch, delay,
|
||||
|
@ -145,27 +133,18 @@ void PrintDialog::printSetup()
|
|||
str.append("</td></tr></table></td>");
|
||||
if (!gvars) {
|
||||
str.append("<td width=\"380\">");
|
||||
str.append(printPhases());
|
||||
str.append(printFlightModes());
|
||||
str.append("</td>");
|
||||
}
|
||||
str.append("</tr></table><br>");
|
||||
te->append(str);
|
||||
}
|
||||
|
||||
QString PrintDialog::printPhases()
|
||||
QString PrintDialog::printFlightModes()
|
||||
{
|
||||
int gvars=0;
|
||||
int gvarnum=0;
|
||||
if ((GetCurrentFirmwareVariant() & GVARS_VARIANT ) || (!firmware->getCapability(HasVariants) && firmware->getCapability(Gvars))) {
|
||||
if (firmware->getCapability(GvarsFlightPhases)) {
|
||||
gvars=1;
|
||||
gvarnum=firmware->getCapability(Gvars);
|
||||
}
|
||||
}
|
||||
|
||||
QString str="";
|
||||
str.append(QString("<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td colspan=%1><h2>").arg(gvars==0 ? 8+firmware->getCapability(RotaryEncoders) : 8+gvarnum+firmware->getCapability(RotaryEncoders)));
|
||||
str.append(tr("Flight modes Settings"));
|
||||
str.append(QString("<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td colspan=%1><h2>").arg(!gvars ? 8+firmware->getCapability(RotaryEncoders) : 8+gvarnum+firmware->getCapability(RotaryEncoders)));
|
||||
str.append(tr("Flight modes"));
|
||||
str.append("</h2></td></tr><tr><td style=\"border-style:none;\"> </td><td colspan=2 align=center><b>");
|
||||
str.append(tr("Fades")+"</b></td>");
|
||||
str.append("<td colspan=4 align=center><b>"+tr("Trims")+"</b></td>");
|
||||
|
@ -175,39 +154,44 @@ QString PrintDialog::printPhases()
|
|||
if (firmware->getCapability(RotaryEncoders)) {
|
||||
str.append(QString("<td colspan=%1 align=center><b>").arg(firmware->getCapability(RotaryEncoders))+tr("Rot.Enc.")+"</b></td>");
|
||||
}
|
||||
str.append("<td rowspan=2 align=\"center\" valign=\"bottom\"><b>"+tr("Switch")+"</b></td></tr><tr><td align=center width=\"90\"><b>"+tr("Flight mode name"));
|
||||
str.append("</b></td><td align=center width=\"30\"><b>"+tr("IN")+"</b></td><td align=center width=\"30\"><b>"+tr("OUT")+"</b></td>");
|
||||
str.append("<td rowspan=2 align=\"center\" valign=\"bottom\"><b>"+tr("Switch")+"</b></td></tr><tr><td align=center nowrap><b>"+tr("Flight mode name"));
|
||||
str.append("</b></td><td align=center ><b>"+tr("IN")+"</b></td><td align=center ><b>"+tr("OUT")+"</b></td>");
|
||||
QString labels[] = { tr("Rud"), tr("Ele"), tr("Thr"), tr("Ail") }; // TODO is elsewhere for sure
|
||||
for (int i=0; i<4; i++) {
|
||||
str.append(QString("<td width=\"40\" align=\"center\"><b>%1</b></td>").arg(getInputStr(*g_model, i)));
|
||||
GeneralSettings generalSettings = *g_eeGeneral;
|
||||
str.append(QString("<td align=\"center\" nowrap><b>%1</b></td>").arg(labels[CONVERT_MODE(i+1)-1]));
|
||||
}
|
||||
if (gvars==1) {
|
||||
for (int i=0; i<gvarnum; i++) {
|
||||
str.append(QString("<td width=\"40\" align=\"center\"><b>GV%1</b><br>%2</td>").arg(i+1).arg(g_model->gvars_names[i]));
|
||||
if (gvars) {
|
||||
for (unsigned int i=0; i<gvarnum; i++) {
|
||||
str.append(QString("<td align=\"center\" nowrap><b>GV%1</b><br>%2</td>").arg(i+1).arg(g_model->gvars_names[i]));
|
||||
}
|
||||
}
|
||||
for (int i=0; i<firmware->getCapability(RotaryEncoders); i++) {
|
||||
str.append(QString("<td align=\"center\"><b>RE%1</b></td>").arg((i==0 ? 'A': 'B')));
|
||||
}
|
||||
str.append("</tr>");
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
PhaseData *pd=&g_model->phaseData[i];
|
||||
str.append("<tr><td><b>"+tr("FM")+QString("%1</b> <font size=+1 face='Courier New' color=green>%2</font></td><td width=\"30\" align=\"right\"><font size=+1 face='Courier New' color=green>%3</font></td><td width=\"30\" align=\"right\"><font size=+1 face='Courier New' color=green>%4</font></td>").arg(i).arg(pd->name).arg(pd->fadeIn).arg(pd->fadeOut));
|
||||
str.append("<tr><td><b>"+tr("FM")+QString("%1</b> <font size=+1 face='Courier New' color=green>%2</font></td>").arg(i).arg(pd->name));
|
||||
str.append(QString("<td align=\"right\"><font size=+1 face='Courier New' color=green>%1</font></td>").arg((qreal)pd->fadeIn/firmware->getCapability(SlowScale)));
|
||||
str.append(QString("<td width=\"30\" align=\"right\"><font size=+1 face='Courier New' color=green>%1</font></td>").arg((qreal)pd->fadeOut/firmware->getCapability(SlowScale)));
|
||||
for (int k=0; k<4; k++) {
|
||||
//TODO trim values
|
||||
if (pd->trimRef[k]==-1) {
|
||||
str.append(QString("<td align=\"right\" width=\"30\"><font size=+1 face='Courier New' color=green>%1</font></td>").arg(pd->trim[k]));
|
||||
str.append(QString("<td align=\"right\"><font size=+1 face='Courier New' color=green>%1</font></td>").arg(pd->trim[k]));
|
||||
} else {
|
||||
str.append("<td align=\"right\" width=\"30\"><font size=+1 face='Courier New' color=green>"+tr("FM")+QString("%1</font></td>").arg(pd->trimRef[k]));
|
||||
str.append("<td align=\"right\" ><font size=+1 face='Courier New' color=green>"+tr("FM")+QString("%1</font></td>").arg(pd->trimRef[k]));
|
||||
}
|
||||
}
|
||||
if (gvars==1) {
|
||||
for (int k=0; k<gvarnum; k++) {
|
||||
if (gvars) {
|
||||
for (unsigned int k=0; k<gvarnum; k++) {
|
||||
if (pd->gvars[k]<=1024) {
|
||||
str.append(QString("<td align=\"right\" width=\"30\"><font size=+1 face='Courier New' color=green>%1").arg(pd->gvars[k])+"</font></td>");
|
||||
str.append(QString("<td align=\"right\"><font size=+1 face='Courier New' color=green>%1").arg(pd->gvars[k])+"</font></td>");
|
||||
}
|
||||
else {
|
||||
int num = pd->gvars[k] - 1025;
|
||||
if (num>=i) num++;
|
||||
str.append("<td align=\"right\" width=\"30\"><font size=+1 face='Courier New' color=green>"+tr("FM")+QString("%1</font></td>").arg(num));
|
||||
str.append("<td align=\"right\" ><font size=+1 face='Courier New' color=green>"+tr("FM")+QString("%1</font></td>").arg(num));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -228,10 +212,10 @@ QString PrintDialog::printPhases()
|
|||
return(str);
|
||||
}
|
||||
|
||||
void PrintDialog::printExpo()
|
||||
void PrintDialog::printInputs()
|
||||
{
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\"><tr><td><h2>";
|
||||
str.append(tr("Expo/Dr Settings"));
|
||||
str.append(tr("Inputs"));
|
||||
str.append("</h2></td></tr><tr><td><table border=0 cellspacing=0 cellpadding=3>");
|
||||
int ec=0;
|
||||
unsigned int lastCHN = 255;
|
||||
|
@ -245,72 +229,61 @@ void PrintDialog::printExpo()
|
|||
lastCHN=ed->chn;
|
||||
str.append("<b>"+getInputStr(*g_model, ed->chn)+"</b>");
|
||||
}
|
||||
else
|
||||
str.append("<b> </b>");
|
||||
str.append("</font></td>");
|
||||
str.append("<td><font size=+1 face='Courier New' color=green>");
|
||||
|
||||
switch(ed->mode) {
|
||||
case (1):
|
||||
str += "<- ";
|
||||
str += "<-";
|
||||
break;
|
||||
case (2):
|
||||
str += "-> ";
|
||||
str += "->";
|
||||
break;
|
||||
default:
|
||||
str += " ";
|
||||
str += " ";
|
||||
break;
|
||||
};
|
||||
|
||||
str += tr("Weight") + QString("%1").arg(getGVarString(ed->weight,true)).rightJustified(6, ' ');
|
||||
str += ed->curve.toString().replace("<", "<").replace(">", ">");
|
||||
str += " " + tr("Weight") + QString("(%1)").arg(getGVarString(ed->weight,true));
|
||||
|
||||
if (firmware->getCapability(FlightPhases)) {
|
||||
if (firmware->getCapability(VirtualInputs)) {
|
||||
str += " " + tr("Source") + QString("(%1)").arg(ed->srcRaw.toString());
|
||||
if (ed->carryTrim>0) str += " " + tr("NoTrim");
|
||||
else if (ed->carryTrim<0) str += " " + RawSource(SOURCE_TYPE_TRIM, (-(ed->carryTrim)-1)).toString();
|
||||
}
|
||||
if (ed->curve.value) str += " " + Qt::escape(ed->curve.toString());
|
||||
|
||||
if (firmware->getCapability(FlightModes)) {
|
||||
if(ed->phases) {
|
||||
if (ed->phases!=(unsigned int)(1<<firmware->getCapability(FlightPhases))-1) {
|
||||
int mask=1;
|
||||
int first=0;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases);i++) {
|
||||
if (ed->phases!=(unsigned int)(1<<firmware->getCapability(FlightModes))-1) {
|
||||
unsigned int mask=1;
|
||||
bool first = true;
|
||||
bool multiple = false;
|
||||
QString strModes;
|
||||
for (int j=0; j<firmware->getCapability(FlightModes);j++) {
|
||||
if (!(ed->phases & mask)) {
|
||||
first++;
|
||||
}
|
||||
mask <<=1;
|
||||
}
|
||||
if (first>1) {
|
||||
str += " " + tr("Flight modes") + QString("(");
|
||||
//PhaseData *pd = &g_model->phaseData[j];
|
||||
const char * pdName = g_model->phaseData[j].name;
|
||||
if (first) {
|
||||
strModes += Qt::escape(QString("%1").arg(getPhaseName(j+1,pdName)));
|
||||
first = false;
|
||||
} else {
|
||||
str += " " + tr("Flight mode") + QString("(");
|
||||
}
|
||||
mask=1;
|
||||
first=1;
|
||||
for (int j=0; j<firmware->getCapability(FlightPhases);j++) {
|
||||
if (!(ed->phases & mask)) {
|
||||
PhaseData *pd = &g_model->phaseData[j];
|
||||
if (!first) {
|
||||
str += QString(", ")+ QString("%1").arg(getPhaseName(j+1, pd->name));
|
||||
} else {
|
||||
str += QString("%1").arg(getPhaseName(j+1,pd->name));
|
||||
first=0;
|
||||
strModes += Qt::escape(QString(", %1").arg(getPhaseName(j+1, pdName)));
|
||||
multiple = true;
|
||||
}
|
||||
}
|
||||
mask <<=1;
|
||||
mask <<= 1;
|
||||
}
|
||||
if (!strModes.isEmpty()) {
|
||||
str += " " + tr(multiple?"Flight modes":"Flight mode") + "(" + strModes + ")";
|
||||
}
|
||||
str += QString(")");
|
||||
} else {
|
||||
str += tr("DISABLED")+QString(" !!!");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ed->swtch.type)
|
||||
str += " " + tr("Switch") + QString("(%1)").arg(ed->swtch.toString());
|
||||
str += ed->curve.toString().replace("<", "<").replace(">", ">");
|
||||
if (firmware->getCapability(HasExpoNames)) {
|
||||
QString ExpoName;
|
||||
ExpoName.append(ed->name);
|
||||
if (!ExpoName.isEmpty()) {
|
||||
str+=QString(" (%1)").arg(ExpoName);
|
||||
}
|
||||
}
|
||||
if (ed->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(ed->swtch.toString());
|
||||
if (firmware->getCapability(HasExpoNames) && ed->name[0]) str += Qt::escape(QString(" [%1]").arg(ed->name));
|
||||
str += "</font></td></tr>";
|
||||
}
|
||||
str += "</table></td></tr></table><br>";
|
||||
|
@ -332,16 +305,22 @@ void PrintDialog::printMixes()
|
|||
str.append("<tr><td><font size=+1 face='Courier New'><b>");
|
||||
if(lastCHN!=md->destCh) {
|
||||
lastCHN=md->destCh;
|
||||
QString chname=tr("CH")+QString("%1 ").arg(lastCHN,2,10,QChar('0'));
|
||||
|
||||
QString chname = QObject::tr("CH%1").arg(lastCHN);
|
||||
// TODO not nice, Qt brings a function for that, I don't remember right now
|
||||
(chname.length() < 4) ? chname.append(" ") : chname.append(" ");
|
||||
if (firmware->getCapability(HasChNames)) {
|
||||
QString name=g_model->limitData[md->destCh-1].name;
|
||||
QString name = g_model->limitData[lastCHN-1].name;
|
||||
if (!name.isEmpty()) {
|
||||
name = QString("(") + name + QString(")");
|
||||
}
|
||||
name.append(" ");
|
||||
chname=name.left(6);
|
||||
chname += name.left(8);
|
||||
}
|
||||
chname = Qt::escape(chname);
|
||||
str.append(chname.replace(" ", " "));
|
||||
}
|
||||
str.append(chname);
|
||||
} else {
|
||||
else {
|
||||
str.append(" ");
|
||||
}
|
||||
str.append("</b></font></td>");
|
||||
|
@ -351,57 +330,42 @@ void PrintDialog::printMixes()
|
|||
case (2): str += " R"; break;
|
||||
default: str += " "; break;
|
||||
};
|
||||
str += QString(" %1").arg(getGVarString(md->weight, true)).rightJustified(6, ' ');
|
||||
str += md->srcRaw.toString();
|
||||
if (md->swtch.type) str += " " + tr("Switch") + QString("(%1)").arg(md->swtch.toString());
|
||||
if (md->carryTrim) str += " " + tr("noTrim");
|
||||
if (md->sOffset) str += " "+ tr("Offset") + QString(" %1").arg(getGVarString(md->sOffset));
|
||||
str += md->curve.toString().replace("<", "<").replace(">", ">");
|
||||
float scale=firmware->getCapability(SlowScale);
|
||||
if (md->delayDown || md->delayUp) str += tr(" Delay(u%1:d%2)").arg(md->delayUp/scale).arg(md->delayDown/scale);
|
||||
if (md->speedDown || md->speedUp) str += tr(" Slow(u%1:d%2)").arg(md->speedUp/scale).arg(md->speedDown/scale);
|
||||
if (md->mixWarn) str += " "+tr("Warn")+QString("(%1)").arg(md->mixWarn);
|
||||
if (firmware->getCapability(FlightPhases)) {
|
||||
if(md->phases) {
|
||||
if (md->phases!=(unsigned int)(1<<firmware->getCapability(FlightPhases))-1) {
|
||||
int mask=1;
|
||||
int first=0;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
if (!(md->phases & mask)) {
|
||||
first++;
|
||||
}
|
||||
mask <<=1;
|
||||
}
|
||||
if (first>1) {
|
||||
str += " " + tr("Flight modes") + QString("(");
|
||||
} else {
|
||||
str += " " + tr("Flight mode") + QString("(");
|
||||
}
|
||||
mask=1;
|
||||
first=1;
|
||||
for (int j=0; j<firmware->getCapability(FlightPhases);j++) {
|
||||
if (!(md->phases & mask)) {
|
||||
PhaseData *pd = &g_model->phaseData[j];
|
||||
if (!first) {
|
||||
str += QString(", ")+ QString("%1").arg(getPhaseName(j+1, pd->name));
|
||||
} else {
|
||||
str += QString("%1").arg(getPhaseName(j+1,pd->name));
|
||||
first=0;
|
||||
}
|
||||
}
|
||||
mask <<=1;
|
||||
}
|
||||
str += QString(")");
|
||||
} else {
|
||||
str += tr("DISABLED")+QString(" !!!");
|
||||
}
|
||||
//set mixer src model if it is unset (srcRaw needs this to generate proper toString() for input source type)
|
||||
if (md->srcRaw.model == 0)
|
||||
md->srcRaw.model = g_model;
|
||||
str += " " + md->srcRaw.toString();
|
||||
|
||||
str += " " + Qt::escape(tr("Weight(%1)").arg(getGVarString(md->weight, true)));
|
||||
|
||||
QString phasesStr = getPhasesStr(md->phases, *g_model);
|
||||
if (!phasesStr.isEmpty()) str += " " + Qt::escape(phasesStr);
|
||||
|
||||
if (md->swtch.type != SWITCH_TYPE_NONE) {
|
||||
str += " " + Qt::escape(tr("Switch(%1)").arg(md->swtch.toString()));
|
||||
}
|
||||
|
||||
if (md->carryTrim) {
|
||||
str += " " + Qt::escape(tr("NoTrim"));
|
||||
}
|
||||
|
||||
if (md->noExpo) str += " " + Qt::escape(tr("No DR/Expo"));
|
||||
if (md->sOffset) str += " " + Qt::escape(tr("Offset(%1)").arg(getGVarString(md->sOffset)));
|
||||
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
|
||||
|
||||
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
if (scale == 0)
|
||||
scale = 1;
|
||||
if (md->delayDown || md->delayUp)
|
||||
str += Qt::escape(tr(" Delay(u%1:d%2)").arg((double)md->delayUp/scale).arg((double)md->delayDown/scale));
|
||||
if (md->speedDown || md->speedUp)
|
||||
str += Qt::escape(tr(" Slow(u%1:d%2)").arg((double)md->speedUp/scale).arg((double)md->speedDown/scale));
|
||||
if (md->mixWarn) str += Qt::escape(tr(" Warn(%1)").arg(md->mixWarn));
|
||||
if (firmware->getCapability(HasMixerNames)) {
|
||||
QString MixerName;
|
||||
MixerName.append(md->name);
|
||||
if (!MixerName.isEmpty()) {
|
||||
str+=QString(" (%1)").arg(MixerName);
|
||||
str += " " + Qt::escape(QString("(%1)").arg(MixerName));
|
||||
}
|
||||
}
|
||||
str.append("</font></td></tr>");
|
||||
|
@ -435,12 +399,12 @@ void PrintDialog::printLimits()
|
|||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Min")+"</b></td>");
|
||||
for(int i=0; i<firmware->getCapability(Outputs); i++) {
|
||||
str.append(doTR(QString::number(g_model->limitData[i].min),"green"));
|
||||
str.append(doTR(QString::number((qreal)g_model->limitData[i].min/10),"green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Max")+"</b></td>");
|
||||
for(int i=0; i<firmware->getCapability(Outputs); i++) {
|
||||
str.append(doTR(QString::number(g_model->limitData[i].max),"green"));
|
||||
str.append(doTR(QString::number((qreal)g_model->limitData[i].max/10),"green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Invert")+"</b></td>");
|
||||
|
@ -465,12 +429,12 @@ void PrintDialog::printLimits()
|
|||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Min")+"</b></td>");
|
||||
for(int i=0; i<16; i++) {
|
||||
str.append(doTR(QString::number(g_model->limitData[i].min),"green"));
|
||||
str.append(doTR(QString::number((qreal)g_model->limitData[i].min/10),"green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Max")+"</b></td>");
|
||||
for(int i=0; i<16; i++) {
|
||||
str.append(doTR(QString::number(g_model->limitData[i].max),"green"));
|
||||
str.append(doTR(QString::number((qreal)g_model->limitData[i].max/10),"green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Invert")+"</b></td>");
|
||||
|
@ -497,12 +461,12 @@ void PrintDialog::printLimits()
|
|||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Min")+"</b></td>");
|
||||
for(int i=16; i<firmware->getCapability(Outputs); i++) {
|
||||
str.append(doTR(QString::number(g_model->limitData[i].min),"green"));
|
||||
str.append(doTR(QString::number((qreal)g_model->limitData[i].min/10),"green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Max")+"</b></td>");
|
||||
for(int i=16; i<firmware->getCapability(Outputs); i++) {
|
||||
str.append(doTR(QString::number(g_model->limitData[i].max),"green"));
|
||||
str.append(doTR(QString::number((qreal)g_model->limitData[i].max/10),"green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr><td><b>"+tr("Invert")+"</b></td>");
|
||||
|
@ -633,13 +597,9 @@ void PrintDialog::printSwitches()
|
|||
for (int i=0; i<firmware->getCapability(LogicalSwitches); i++) {
|
||||
if (g_model->customSw[i].func) {
|
||||
str.append("<tr>");
|
||||
if (i<9) {
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("LS")+QString("%1</b></td>").arg(i+1));
|
||||
} else {
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("LS")+('A'+(i-9))+"</b></td>");
|
||||
}
|
||||
str.append("<td width=\"60\"><b>"+tr("L")+QString("%1</b></td>").arg(i+1));
|
||||
QString tstr = g_model->customSw[i].toString(*g_model);
|
||||
str.append(doTC(tstr,"green"));
|
||||
str.append(doTL(tstr,"green"));
|
||||
str.append("</tr>");
|
||||
sc++;
|
||||
}
|
||||
|
@ -652,25 +612,19 @@ void PrintDialog::printSwitches()
|
|||
|
||||
void PrintDialog::printGvars()
|
||||
{
|
||||
int gvars=0;
|
||||
int gvarnum=0;
|
||||
if ((GetCurrentFirmwareVariant() & GVARS_VARIANT ) || (!firmware->getCapability(HasVariants) && firmware->getCapability(Gvars))) {
|
||||
gvars=1;
|
||||
gvarnum=firmware->getCapability(Gvars);
|
||||
}
|
||||
if (!firmware->getCapability(GvarsFlightPhases) && (gvars==1 && firmware->getCapability(Gvars))) {
|
||||
if (!firmware->getCapability(GvarsFlightModes) && (gvars && firmware->getCapability(Gvars))) {
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append("<tr><td><h2>"+tr("Global Variables")+"</h2></td></tr>");
|
||||
str.append("<tr><td><table border=1 cellspacing=0 cellpadding=3 width=100>");
|
||||
PhaseData *pd=&g_model->phaseData[0];
|
||||
int width=100/gvarnum;
|
||||
str.append("<tr>");
|
||||
for(int i=0; i<gvarnum; i++) {
|
||||
for(unsigned int i=0; i<gvarnum; i++) {
|
||||
str.append(QString("<td width=\"%1%\" align=\"center\"><b>").arg(width)+tr("GV")+QString("%1</b></td>").arg(i+1));
|
||||
}
|
||||
str.append("</tr>");
|
||||
str.append("<tr>");
|
||||
for(int i=0; i<gvarnum; i++) {
|
||||
for(unsigned int i=0; i<gvarnum; i++) {
|
||||
str.append(QString("<td width=\"%1%\" align=\"center\"><font color=green>").arg(width)+QString("%1</font></td>").arg(pd->gvars[i]));
|
||||
}
|
||||
str.append("</tr>");
|
||||
|
@ -686,7 +640,8 @@ void PrintDialog::printFSwitches()
|
|||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
str.append("<tr><td><h2>"+tr("Special Functions")+"</h2></td></tr>");
|
||||
str.append("<tr><td><table border=0 cellspacing=0 cellpadding=3><tr>");
|
||||
str.append(doTC(tr("Switch"), "", true));
|
||||
str.append("<td width=\"60\"><b>#</b></td>");
|
||||
str.append(doTL(tr("Switch"), "", true));
|
||||
str.append(doTL(tr("Function"), "", true));
|
||||
str.append(doTL(tr("Parameter"), "", true));
|
||||
str.append(doTL(tr("Repeat"), "", true));
|
||||
|
@ -695,19 +650,21 @@ void PrintDialog::printFSwitches()
|
|||
for(int i=0; i<firmware->getCapability(CustomFunctions); i++) {
|
||||
if (g_model->funcSw[i].swtch.type!=SWITCH_TYPE_NONE) {
|
||||
str.append("<tr>");
|
||||
str.append(doTC(g_model->funcSw[i].swtch.toString(),"green"));
|
||||
str.append(doTC(g_model->funcSw[i].funcToString(),"green"));
|
||||
str.append(doTC(g_model->funcSw[i].paramToString(),"green"));
|
||||
str.append(doTL(tr("SF%1").arg(i+1),"", true));
|
||||
str.append(doTL(g_model->funcSw[i].swtch.toString(),"green"));
|
||||
str.append(doTL(g_model->funcSw[i].funcToString(),"green"));
|
||||
str.append(doTL(g_model->funcSw[i].paramToString(),"green"));
|
||||
int index=g_model->funcSw[i].func;
|
||||
if (index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic) {
|
||||
str.append(doTC(QString("%1").arg(g_model->funcSw[i].repeatParam),"green"));
|
||||
if ((g_model->funcSw[i].repeatParam>0) &&
|
||||
(index==FuncPlaySound || index==FuncPlayHaptic || index==FuncPlayValue || index==FuncPlayPrompt || index==FuncPlayBoth || index==FuncBackgroundMusic)) {
|
||||
str.append(doTL(QString("%1").arg(g_model->funcSw[i].repeatParam),"green"));
|
||||
} else {
|
||||
str.append(doTC( " ","green"));
|
||||
str.append(doTL( " ","green"));
|
||||
}
|
||||
if ((index<=FuncInstantTrim) || (index>FuncBackgroundMusicPause)) {
|
||||
str.append(doTC((g_model->funcSw[i].enabled ? "ON" : "OFF"),"green"));
|
||||
str.append(doTL((g_model->funcSw[i].enabled ? "ON" : "OFF"),"green"));
|
||||
} else {
|
||||
str.append(doTC( "---","green"));
|
||||
str.append(doTL( "---","green"));
|
||||
}
|
||||
str.append("</tr>");
|
||||
sc++;
|
||||
|
@ -723,6 +680,60 @@ void PrintDialog::printFrSky()
|
|||
{
|
||||
int tc=0;
|
||||
QString str = "<table border=1 cellspacing=0 cellpadding=3 width=\"100%\">";
|
||||
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
str.append("<tr><td colspan=3><h2>"+tr("Telemetry Settings")+"</h2></td></tr>");
|
||||
str.append("<tr>");
|
||||
str.append(doTC(tr("Analog"),"", true));
|
||||
str.append(doTC(tr("Range"),"", true));
|
||||
str.append(doTC(tr("Offset"),"", true));
|
||||
str.append("</tr>");
|
||||
|
||||
FrSkyData *fd=&g_model->frsky;
|
||||
for (int i=0; i<2; i++) {
|
||||
if (fd->channels[i].ratio!=0) {
|
||||
tc++;
|
||||
float ratio=(fd->channels[i].ratio/(fd->channels[i].type==0 ?10.0:1));
|
||||
QString unit = " " + getFrSkyUnits(fd->channels[i].type);
|
||||
str.append("<tr>");
|
||||
str.append(doTL(tr("A%1").arg(i+1), "", true));
|
||||
str.append(doTC(QString::number(ratio,10,(fd->channels[i].type==0 ? 1:0))+unit, "green"));
|
||||
str.append(doTC(QString::number((fd->channels[i].offset*ratio)/255,10,(fd->channels[i].type==0 ? 1:0))+unit, "green"));
|
||||
str.append("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
str.append("<tr><td colspan=3 align=\"Left\" height=\"4px\"></td></tr>");
|
||||
str.append("<tr>");
|
||||
str.append(doTC(tr("Alarms"),"", true));
|
||||
str.append(doTC(tr("Low Alarm"),"", true));
|
||||
str.append(doTC(tr("Critical Alarm"),"", true));
|
||||
str.append("</tr>");
|
||||
str.append("<tr>");
|
||||
str.append(doTL(tr("RSSI"),"", true));
|
||||
str.append(doTC(QString::number(fd->rssiAlarms[0].value,10),"green"));
|
||||
str.append(doTC(QString::number(fd->rssiAlarms[1].value,10),"green"));
|
||||
str.append("</tr>");
|
||||
for (int i=0; i<2; i++) {
|
||||
if (fd->channels[i].ratio!=0) {
|
||||
float ratio=(fd->channels[i].ratio/(fd->channels[i].type==0 ?10.0:1));
|
||||
QString unit = " " + getFrSkyUnits(fd->channels[i].type);
|
||||
str.append("<tr>");
|
||||
str.append(doTL(tr("A%1").arg(i+1), "", true));
|
||||
str.append(doTC(QString::number(ratio*(fd->channels[i].alarms[0].value/255.0+fd->channels[i].offset/255.0),10,(fd->channels[i].type==0 ? 1:0))+unit, "green"));
|
||||
str.append(doTC(QString::number(ratio*(fd->channels[i].alarms[1].value/255.0+fd->channels[i].offset/255.0),10,(fd->channels[i].type==0 ? 1:0))+unit, "green"));
|
||||
str.append("</tr>");
|
||||
}
|
||||
}
|
||||
|
||||
//TODO preferrably in new tables
|
||||
str.append("<tr><td colspan=3 align=\"Left\" height=\"4px\"></td></tr>");
|
||||
//str.append("<tr><td align=\"Left\"><b>"+tr("Frsky serial protocol")+"</b></td><td colspan=2 align=\"left\">"+getFrSkyProtocol(fd->usrProto)+"</td></tr>");
|
||||
//str.append("<tr><td align=\"Left\"><b>"+tr("Units system")+"</b></td><td colspan=2 align=\"left\">"+getFrSkyMeasure(fd->imperial)+"</td></tr>");
|
||||
str.append("<tr><td align=\"Left\"><b>"+tr("Blades")+"</b></td><td colspan=2 align=\"left\">"+QString("%1").arg(fd->blades)+"</td></tr>");
|
||||
str.append("<tr><td align=\"Left\" height=\"4px\"></td></tr></table>");
|
||||
}
|
||||
else { //other boards
|
||||
str.append("<tr><td colspan=10><h2>"+tr("Telemetry Settings")+"</h2></td></tr>");
|
||||
str.append("<tr><td colspan=4 align=\"center\"> </td><td colspan=3 align=\"center\"><b>"+tr("Alarm 1")+"</b></td><td colspan=3 align=\"center\"><b>"+tr("Alarm 2")+"</b></td></tr>");
|
||||
str.append("<tr><td align=\"center\"><b>"+tr("Analog")+"</b></td><td align=\"center\"><b>"+tr("Unit")+"</b></td><td align=\"center\"><b>"+tr("Scale")+"</b></td><td align=\"center\"><b>"+tr("Offset")+"</b></td>");
|
||||
|
@ -756,6 +767,7 @@ void PrintDialog::printFrSky()
|
|||
str.append("<tr><td colspan=2 align=\"Left\"><b>"+tr("Units system")+"</b></td><td colspan=8 align=\"left\">"+getFrSkyMeasure(fd->imperial)+"</td></tr>");
|
||||
str.append("<tr><td colspan=2 align=\"Left\"><b>"+tr("Blades")+"</b></td><td colspan=8 align=\"left\">"+fd->blades+"</td></tr>");
|
||||
str.append("<tr><td colspan=10 align=\"Left\" height=\"4px\"></td></tr></table>");
|
||||
}
|
||||
#if 0
|
||||
if (firmware->getCapability(TelemetryBars) || (firmware->getCapability(TelemetryCSFields))) {
|
||||
int cols=firmware->getCapability(TelemetryColsCSFields);
|
||||
|
|
|
@ -28,10 +28,12 @@ public:
|
|||
|
||||
private:
|
||||
Ui::PrintDialog *ui;
|
||||
bool gvars;
|
||||
unsigned int gvarnum;
|
||||
|
||||
void printSetup();
|
||||
QString printPhases();
|
||||
void printExpo();
|
||||
QString printFlightModes();
|
||||
void printInputs();
|
||||
void printMixes();
|
||||
void printLimits();
|
||||
void printCurves();
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<connection>
|
||||
<sender>closeButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>printDialog</receiver>
|
||||
<receiver>PrintDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
|
|
@ -25,6 +25,8 @@ SimulatorDialog::SimulatorDialog(QWidget * parent, unsigned int flags):
|
|||
{
|
||||
}
|
||||
|
||||
uint32_t SimulatorDialog9X::switchstatus = 0;
|
||||
|
||||
SimulatorDialog9X::SimulatorDialog9X(QWidget * parent, unsigned int flags):
|
||||
SimulatorDialog(parent, flags),
|
||||
ui(new Ui::SimulatorDialog9X),
|
||||
|
@ -35,8 +37,7 @@ SimulatorDialog9X::SimulatorDialog9X(QWidget * parent, unsigned int flags):
|
|||
|
||||
initUi<Ui::SimulatorDialog9X>(ui);
|
||||
|
||||
QSettings settings;
|
||||
backLight = settings.value("backLight", 0).toInt();
|
||||
backLight = g.backLight();
|
||||
if (backLight > 4) backLight = 0;
|
||||
switch (backLight) {
|
||||
case 1:
|
||||
|
@ -56,6 +57,10 @@ SimulatorDialog9X::SimulatorDialog9X(QWidget * parent, unsigned int flags):
|
|||
break;
|
||||
}
|
||||
|
||||
//restore switches
|
||||
if (g.simuSW())
|
||||
restoreSwitches();
|
||||
|
||||
ui->trimHR_L->setText(QString::fromUtf8(leftArrow));
|
||||
ui->trimHR_R->setText(QString::fromUtf8(rightArrow));
|
||||
ui->trimVR_U->setText(QString::fromUtf8(upArrow));
|
||||
|
@ -90,9 +95,12 @@ SimulatorDialog9X::SimulatorDialog9X(QWidget * parent, unsigned int flags):
|
|||
|
||||
SimulatorDialog9X::~SimulatorDialog9X()
|
||||
{
|
||||
saveSwitches();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
uint32_t SimulatorDialogTaranis::switchstatus = 0;
|
||||
|
||||
SimulatorDialogTaranis::SimulatorDialogTaranis(QWidget * parent, unsigned int flags):
|
||||
SimulatorDialog(parent, flags),
|
||||
ui(new Ui::SimulatorDialogTaranis)
|
||||
|
@ -105,6 +113,10 @@ SimulatorDialogTaranis::SimulatorDialogTaranis(QWidget * parent, unsigned int fl
|
|||
|
||||
ui->lcd->setBackgroundColor(47, 123, 227);
|
||||
|
||||
//restore switches
|
||||
if (g.simuSW())
|
||||
restoreSwitches();
|
||||
|
||||
ui->trimHR_L->setText(QString::fromUtf8(leftArrow));
|
||||
ui->trimHR_R->setText(QString::fromUtf8(rightArrow));
|
||||
ui->trimVR_U->setText(QString::fromUtf8(upArrow));
|
||||
|
@ -136,6 +148,7 @@ SimulatorDialogTaranis::SimulatorDialogTaranis(QWidget * parent, unsigned int fl
|
|||
|
||||
SimulatorDialogTaranis::~SimulatorDialogTaranis()
|
||||
{
|
||||
saveSwitches();
|
||||
delete ui;
|
||||
}
|
||||
|
||||
|
@ -282,31 +295,26 @@ void SimulatorDialog::initUi(T * ui)
|
|||
setFixedSize(width(), height());
|
||||
|
||||
#ifdef JOYSTICKS
|
||||
QSettings settings;
|
||||
bool js_enable = settings.value("js_support",false).toBool();
|
||||
int js_ctrl=settings.value("js_ctrl",-1).toInt();
|
||||
if (js_enable) {
|
||||
settings.beginGroup("JsCalibration");
|
||||
if (g.jsSupport()) {
|
||||
int count=0;
|
||||
for (int j=0; j<8;j++){
|
||||
int axe=settings.value(QString("stick%1_axe").arg(j),-1).toInt();
|
||||
for (int j=0; j<8; j++){
|
||||
int axe = g.joystick[j].stick_axe();
|
||||
if (axe>=0 && axe<8) {
|
||||
jsmap[axe]=j;
|
||||
jscal[axe][0]=settings.value(QString("stick%1_min").arg(j),-32767).toInt();
|
||||
jscal[axe][1]=settings.value(QString("stick%1_med").arg(j),0).toInt();
|
||||
jscal[axe][2]=settings.value(QString("stick%1_max").arg(j),0).toInt();
|
||||
jscal[axe][3]=settings.value(QString("stick%1_inv").arg(j),0).toInt();
|
||||
jscal[axe][0] = g.joystick[j].stick_min();
|
||||
jscal[axe][1] = g.joystick[j].stick_med();
|
||||
jscal[axe][2] = g.joystick[j].stick_max();
|
||||
jscal[axe][3] = g.joystick[j].stick_inv();
|
||||
count++;
|
||||
}
|
||||
}
|
||||
settings.endGroup();
|
||||
if (count<3) {
|
||||
QMessageBox::critical(this, tr("Warning"), tr("Joystick enabled but not configured correctly"));
|
||||
}
|
||||
if (js_ctrl!=-1) {
|
||||
if (g.jsCtrl()!=-1) {
|
||||
joystick = new Joystick(this);
|
||||
if (joystick) {
|
||||
if (joystick->open(js_ctrl)) {
|
||||
if (joystick->open(g.jsCtrl())) {
|
||||
int numAxes=std::min(joystick->numAxes,8);
|
||||
for (int j=0; j<numAxes; j++) {
|
||||
joystick->sensitivities[j] = 0;
|
||||
|
@ -418,10 +426,8 @@ void SimulatorDialog::initUi(T * ui)
|
|||
void SimulatorDialog::onButtonPressed(int value)
|
||||
{
|
||||
if (value == Qt::Key_Print) {
|
||||
QSettings settings;
|
||||
bool toclipboard = settings.value("snapshot_to_clipboard", false).toBool();
|
||||
QString fileName = "";
|
||||
if (!toclipboard) {
|
||||
if (!g.snapToClpbrd()) {
|
||||
fileName = QString("screenshot-%1.png").arg(++screenshotIdx);
|
||||
}
|
||||
lcd->makeScreenshot(fileName);
|
||||
|
@ -592,6 +598,46 @@ void SimulatorDialog9X::getValues()
|
|||
simulator->setValues(inputs);
|
||||
}
|
||||
|
||||
void SimulatorDialog9X::saveSwitches(void)
|
||||
{
|
||||
// qDebug() << "SimulatorDialog9X::saveSwitches()";
|
||||
switchstatus=ui->switchTHR->isChecked();
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchRUD->isChecked()&0x1);
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchID2->isChecked()&0x1);
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchID1->isChecked()&0x1);
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchID0->isChecked()&0x1);
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchGEA->isChecked()&0x1);
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchELE->isChecked()&0x1);
|
||||
switchstatus<<=1;
|
||||
switchstatus+=(ui->switchAIL->isChecked()&0x1);
|
||||
}
|
||||
|
||||
void SimulatorDialog9X::restoreSwitches(void)
|
||||
{
|
||||
// qDebug() << "SimulatorDialog9X::restoreSwitches()";
|
||||
ui->switchAIL->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchELE->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchGEA->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchID0->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchID1->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchID2->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchRUD->setChecked(switchstatus & 0x1);
|
||||
switchstatus >>=1;
|
||||
ui->switchTHR->setChecked(switchstatus & 0x1);
|
||||
}
|
||||
|
||||
void SimulatorDialogTaranis::resetSH()
|
||||
{
|
||||
ui->switchH->setValue(0);
|
||||
|
@ -657,6 +703,46 @@ void SimulatorDialogTaranis::getValues()
|
|||
simulator->setValues(inputs);
|
||||
}
|
||||
|
||||
void SimulatorDialogTaranis::saveSwitches(void)
|
||||
{
|
||||
// qDebug() << "SimulatorDialogTaranis::saveSwitches()";
|
||||
switchstatus=ui->switchA->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchB->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchC->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchD->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchE->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchF->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchG->value();
|
||||
switchstatus<<=2;
|
||||
switchstatus+=ui->switchH->value();
|
||||
}
|
||||
|
||||
void SimulatorDialogTaranis::restoreSwitches(void)
|
||||
{
|
||||
// qDebug() << "SimulatorDialogTaranis::restoreSwitches()";
|
||||
ui->switchH->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchG->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchF->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchE->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchD->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchC->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchB->setValue(switchstatus & 0x3);
|
||||
switchstatus>>=2;
|
||||
ui->switchA->setValue(switchstatus & 0x3);
|
||||
}
|
||||
|
||||
inline int chVal(int val)
|
||||
{
|
||||
return qMin(1024, qMax(-1024, val));
|
||||
|
|
|
@ -141,12 +141,15 @@ class SimulatorDialog9X: public SimulatorDialog
|
|||
virtual void getValues();
|
||||
virtual void setLightOn(bool enable);
|
||||
virtual void updateBeepButton();
|
||||
void saveSwitches(void);
|
||||
void restoreSwitches(void);
|
||||
|
||||
private slots:
|
||||
void dialChanged();
|
||||
|
||||
private:
|
||||
Ui::SimulatorDialog9X * ui;
|
||||
static uint32_t switchstatus;
|
||||
int beepShow;
|
||||
|
||||
};
|
||||
|
@ -161,9 +164,12 @@ class SimulatorDialogTaranis: public SimulatorDialog
|
|||
|
||||
protected:
|
||||
virtual void getValues();
|
||||
void saveSwitches(void);
|
||||
void restoreSwitches(void);
|
||||
|
||||
private:
|
||||
Ui::SimulatorDialogTaranis * ui;
|
||||
static uint32_t switchstatus;
|
||||
|
||||
private slots:
|
||||
void resetSH();
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include <QString>
|
||||
#include <QDir>
|
||||
#include <QFileInfo>
|
||||
#include <QSettings>
|
||||
#include <QSplashScreen>
|
||||
#include <QThread>
|
||||
#include <iostream>
|
||||
|
@ -114,7 +113,9 @@ int main(int argc, char *argv[])
|
|||
msgBox.setText("Which radio type do you want to simulate?");
|
||||
msgBox.setIcon(QMessageBox::Question);
|
||||
QAbstractButton *taranisButton = msgBox.addButton("Taranis", QMessageBox::ActionRole);
|
||||
msgBox.addButton("9X", QMessageBox::ActionRole);
|
||||
QAbstractButton *sky9xButton = msgBox.addButton("9X-Sky9X", QMessageBox::ActionRole);
|
||||
QAbstractButton *gruvinButton = msgBox.addButton("9X-Gruvin9X", QMessageBox::ActionRole);
|
||||
msgBox.addButton("9X-M128", QMessageBox::ActionRole);
|
||||
QPushButton *exitButton = msgBox.addButton(QMessageBox::Close);
|
||||
|
||||
eedir = QDir(QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation));
|
||||
|
@ -128,14 +129,29 @@ int main(int argc, char *argv[])
|
|||
if (msgBox.clickedButton() == exitButton)
|
||||
return 0;
|
||||
else if (msgBox.clickedButton() == taranisButton) {
|
||||
current_firmware_variant = GetFirmwareVariant("opentx-taranis-en");
|
||||
current_firmware_variant = GetFirmwareVariant("opentx-taranis-haptic-en");
|
||||
fileName = eedir.filePath("eeprom-taranis.bin");
|
||||
path = fileName.toAscii();
|
||||
eepromFileName = path.data();
|
||||
dialog = new SimulatorDialogTaranis();
|
||||
}
|
||||
else if (msgBox.clickedButton() == sky9xButton) {
|
||||
current_firmware_variant = GetFirmwareVariant("opentx-sky9x-heli-templates-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-bluetooth-en");
|
||||
fileName = eedir.filePath("eeprom-sky9x.bin");
|
||||
path = fileName.toAscii();
|
||||
eepromFileName = path.data();
|
||||
dialog = new SimulatorDialog9X();
|
||||
}
|
||||
else if (msgBox.clickedButton() == gruvinButton) {
|
||||
current_firmware_variant = GetFirmwareVariant("opentx-gruvin9x-heli-templates-sdcard-voice-DSM2PPM-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-ttsen-en");
|
||||
fileName = eedir.filePath("eeprom-gruvin9x.bin");
|
||||
path = fileName.toAscii();
|
||||
eepromFileName = path.data();
|
||||
dialog = new SimulatorDialog9X();
|
||||
}
|
||||
else {
|
||||
fileName = eedir.filePath("eeprom-9x.bin");
|
||||
current_firmware_variant = GetFirmwareVariant("opentx-9x128-frsky-heli-templates-audio-voice-haptic-DSM2-ppmca-gvars-symlimits-autosource-autoswitch-battgraph-thrtrace-en");
|
||||
fileName = eedir.filePath("eeprom-9x128.bin");
|
||||
path = fileName.toAscii();
|
||||
eepromFileName = path.data();
|
||||
dialog = new SimulatorDialog9X();
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -12,6 +12,7 @@
|
|||
*
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "eeprominterface.h"
|
||||
#include "wizarddata.h"
|
||||
|
||||
Channel::Channel()
|
||||
|
@ -67,13 +68,13 @@ void WizMix::addMix(ModelData &model, Input input, int weight, int channel, int
|
|||
}
|
||||
else if (input==FLAPS_INPUT){
|
||||
// There ought to be some kind of constants for switches somewhere...
|
||||
maxMixSwitch((char *)"Flaps Up", model.mixData[mixIndex++], channel+1, isTaranis ? 1 :-3 , weight); //Taranis SA-UP, 9X ELE-UP
|
||||
maxMixSwitch((char *)"Flaps Down", model.mixData[mixIndex++], channel+1, isTaranis ? 3 : 3 , -weight); //Taranis SA-DOWN, 9X ELE-DOWN
|
||||
maxMixSwitch((char *)"Flaps Up", model.mixData[mixIndex++], channel+1, isTaranis ? SWITCH_SA0 :-SWITCH_ELE , weight); //Taranis SA-UP, 9X ELE-UP
|
||||
maxMixSwitch((char *)"Flaps Down", model.mixData[mixIndex++], channel+1, isTaranis ? SWITCH_SA2 : SWITCH_ELE , -weight); //Taranis SA-DOWN, 9X ELE-DOWN
|
||||
|
||||
}
|
||||
else if (input==AIRBRAKES_INPUT){
|
||||
maxMixSwitch((char *)"Airbrk Off", model.mixData[mixIndex++], channel+1, isTaranis ? 13 :-2 , -weight); //Taranis SE-UP, 9X RUD-UP
|
||||
maxMixSwitch((char *)"Airbrk On", model.mixData[mixIndex++], channel+1, isTaranis ? 15 : 2 , weight); //Tatanis SE-DOWN, 9X RUD-DOWN
|
||||
maxMixSwitch((char *)"Airbrk Off", model.mixData[mixIndex++], channel+1, isTaranis ? SWITCH_SE0 :-SWITCH_RUD , -weight); //Taranis SE-UP, 9X RUD-UP
|
||||
maxMixSwitch((char *)"Airbrk On", model.mixData[mixIndex++], channel+1, isTaranis ? SWITCH_SE2 : SWITCH_RUD , weight); //Tatanis SE-DOWN, 9X RUD-DOWN
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +111,7 @@ WizMix::operator ModelData()
|
|||
// Add the Throttle Cut option
|
||||
if( options[THROTTLE_CUT_OPTION] && throttleChannel >=0 ){
|
||||
model.funcSw[switchIndex].swtch.type = SWITCH_TYPE_SWITCH;
|
||||
model.funcSw[switchIndex].swtch.index = isTaranis ? 16 : 1; // Taranis SF-UP, 9X THR-UP
|
||||
model.funcSw[switchIndex].swtch.index = isTaranis ? SWITCH_SF0 : SWITCH_THR;
|
||||
model.funcSw[switchIndex].enabled = 1;
|
||||
model.funcSw[switchIndex].func = (AssignFunc)throttleChannel;
|
||||
model.funcSw[switchIndex].param = -100;
|
||||
|
@ -119,7 +120,7 @@ WizMix::operator ModelData()
|
|||
// Add the Throttle Timer option
|
||||
if (options[THROTTLE_TIMER_OPTION] && throttleChannel >=0 ){
|
||||
model.timers[timerIndex].mode.type = SWITCH_TYPE_SWITCH;
|
||||
model.timers[timerIndex].mode.index = isTaranis ? -16 : -1; // Taranis !SF-UP, 9X THR-DOWN
|
||||
model.timers[timerIndex].mode.index = isTaranis ? -SWITCH_SF0 : -SWITCH_THR; // Taranis !SF-UP, 9X THR-DOWN
|
||||
timerIndex++;
|
||||
}
|
||||
return model;
|
||||
|
|
|
@ -155,7 +155,7 @@ void saveModel(ModelData & m, model & xm)
|
|||
|
||||
phases xphases;
|
||||
phases::phase_sequence & phases_sequence (xphases.phase());
|
||||
for (int i=0; i<C9X_MAX_PHASES; i++) {
|
||||
for (int i=0; i<C9X_MAX_FLIGHT_MODES; i++) {
|
||||
PhaseData & p = m.phaseData[i];
|
||||
if (i == 0 || p.swtch.type!=SWITCH_TYPE_NONE) {
|
||||
TrimType xtrim[4];
|
||||
|
|
|
@ -97,10 +97,9 @@ NAVIGATION = NO
|
|||
# Values = YES, NO
|
||||
AUTOSWITCH = NO
|
||||
|
||||
# Swap Stick Inputs for AIL,ELE,RUD,THR
|
||||
# Used in some scenarios where stick/pot entries
|
||||
# cannot be changed by soldering the pots.
|
||||
|
||||
# Stock sticks replaced by FrSky ones
|
||||
# Values = YES, NO
|
||||
FRSKY_STICKS = NO
|
||||
|
||||
# Sources automatic selection
|
||||
# Values = YES, NO
|
||||
|
@ -806,8 +805,8 @@ ifeq ($(AUTOSOURCE), YES)
|
|||
CPPDEFS += -DAUTOSOURCE
|
||||
endif
|
||||
|
||||
ifeq ($(TARANIS_STICKS), YES)
|
||||
CPPDEFS += -DTARANIS_STICKS
|
||||
ifeq ($(FRSKY_STICKS), YES)
|
||||
CPPDEFS += -DFRSKY_STICKS
|
||||
endif
|
||||
|
||||
|
||||
|
@ -1082,7 +1081,7 @@ MSG_CLEANING = Cleaning project:
|
|||
# Combine all necessary flags and optional flags.
|
||||
# Add target processor to flags.
|
||||
|
||||
ARMCPPFLAGS = -c -mcpu=$(MCU) -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=opentx.lst -DRUN_FROM_FLASH=1 -O$(OPT) $(CPPFLAGS) $(INCFLAGS) $(EXTRAINCFLAGS) $(GENDEPFLAGS)
|
||||
ARMCPPFLAGS = -c -mcpu=$(MCU) -mthumb -fomit-frame-pointer -fverbose-asm -Wa,-ahlms=opentx.lst -DRUN_FROM_FLASH=1 -O$(OPT) $(CPPFLAGS) -fdata-sections -ffunction-sections $(INCFLAGS) $(EXTRAINCFLAGS) $(GENDEPFLAGS)
|
||||
AVRCPPFLAGS = -mmcu=$(MCU) -I. -x c++ -O$(OPT) $(CPPFLAGS) $(INCFLAGS) $(EXTRAINCFLAGS) $(GENDEPFLAGS) -fwhole-program
|
||||
|
||||
ifeq ($(ARCH), AVR)
|
||||
|
@ -1353,7 +1352,7 @@ OBJS = $(TMP:.s=.o)
|
|||
@echo
|
||||
@echo $(MSG_COMPILING) $@
|
||||
$(CC) $(ARMCPPFLAGS) $< -o allsrc.o
|
||||
$(CC) $(OBJS) allsrc.o -mcpu=cortex-m3 -mthumb -nostartfiles -lm -T$(LDSCRIPT) -Wl,-Map=$(TARGET).map,--cref,--no-warn-mismatch -o $@
|
||||
$(CC) $(OBJS) allsrc.o -mcpu=cortex-m3 -mthumb -nostartfiles -lm -T$(LDSCRIPT) -Wl,-Map=$(TARGET).map,--cref,--no-warn-mismatch,--gc-sections -o $@
|
||||
endif
|
||||
|
||||
# Target: clean project.
|
||||
|
|
|
@ -333,7 +333,7 @@ void getLogicalSwitchAudioFile(char * filename, int index, unsigned int event)
|
|||
{
|
||||
char * str = getModelPath(filename);
|
||||
int len = STR_VSWITCHES[0];
|
||||
strncpy(str, &STR_VSWITCHES[1+len*(index+SWSRC_FIRST_CSW-1)], len);
|
||||
strncpy(str, &STR_VSWITCHES[1+len*(index+SWSRC_FIRST_LOGICAL_SWITCH-1)], len);
|
||||
str += len;
|
||||
strcpy(str, suffixes[event]);
|
||||
strcat(str, SOUNDS_EXT);
|
||||
|
@ -369,7 +369,7 @@ void referenceModelAudioFiles()
|
|||
if (len < 5 || strcasecmp(fn+len-4, SOUNDS_EXT) || (fno.fattrib & AM_DIR)) continue;
|
||||
|
||||
// Phases Audio Files <phasename>-[on|off].wav
|
||||
for (int i=0; i<MAX_PHASES && !found; i++) {
|
||||
for (int i=0; i<MAX_FLIGHT_MODES && !found; i++) {
|
||||
for (int event=0; event<2; event++) {
|
||||
getPhaseAudioFile(path, i, event);
|
||||
if (!strcasecmp(filename, fn)) {
|
||||
|
@ -879,16 +879,6 @@ void AudioQueue::playFile(const char *filename, uint8_t flags, uint8_t id)
|
|||
strcpy(fragment.file, filename);
|
||||
fragment.id = id;
|
||||
}
|
||||
else if (flags & PLAY_NOW) {
|
||||
AudioFragment & fragment = priorityContext.fragment;
|
||||
if (fragment.type == FRAGMENT_EMPTY) {
|
||||
priorityContext.clear();
|
||||
fragment.type = FRAGMENT_FILE;
|
||||
strcpy(fragment.file, filename);
|
||||
fragment.repeat = flags & 0x0f;
|
||||
fragment.id = id;
|
||||
}
|
||||
}
|
||||
else {
|
||||
uint8_t next_widx = (widx + 1) % AUDIO_QUEUE_LENGTH;
|
||||
if (next_widx != ridx) {
|
||||
|
@ -922,13 +912,13 @@ void AudioQueue::stopPlay(uint8_t id)
|
|||
void AudioQueue::stopSD()
|
||||
{
|
||||
sdAvailableSystemAudioFiles = 0;
|
||||
reset();
|
||||
stopAll();
|
||||
playTone(0, 0, 100, PLAY_NOW); // insert a 100ms pause
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void AudioQueue::reset()
|
||||
void AudioQueue::stopAll()
|
||||
{
|
||||
CoEnterMutexSection(audioMutex);
|
||||
widx = ridx; // clean the queue
|
||||
|
|
|
@ -161,6 +161,8 @@ class AudioQueue {
|
|||
|
||||
void stopPlay(uint8_t id);
|
||||
|
||||
void stopAll();
|
||||
|
||||
void pause(uint16_t tLen);
|
||||
|
||||
void stopSD();
|
||||
|
@ -177,8 +179,6 @@ class AudioQueue {
|
|||
return ridx == widx;
|
||||
}
|
||||
|
||||
void reset();
|
||||
|
||||
inline AudioBuffer * getNextFilledBuffer()
|
||||
{
|
||||
if (buffers[bufferRIdx].state == AUDIO_BUFFER_PLAYING) {
|
||||
|
@ -251,7 +251,7 @@ void audioStart();
|
|||
|
||||
#if defined(VOICE)
|
||||
#define AUDIO_ERROR_MESSAGE(e) audioEvent(e)
|
||||
#define AUDIO_TIMER_MINUTE(t) playDuration(t, 0)
|
||||
#define AUDIO_TIMER_MINUTE(t) playDuration(t, 0, 0)
|
||||
#else
|
||||
#define AUDIO_ERROR_MESSAGE(e) audioEvent(AU_ERROR)
|
||||
#define AUDIO_TIMER_MINUTE(t) audioDefevent(AU_WARNING1)
|
||||
|
@ -317,12 +317,15 @@ void pushPrompt(uint16_t prompt, uint8_t id=0);
|
|||
#define PLAY_FUNCTION(x, ...) void x(__VA_ARGS__, uint8_t id)
|
||||
#define PUSH_NUMBER_PROMPT(p) pushPrompt((p), id)
|
||||
#define PLAY_NUMBER(n, u, a) playNumber((n), (u), (a), id)
|
||||
#define PLAY_DURATION(d) playDuration((d), id)
|
||||
#define PLAY_DURATION(d, att) playDuration((d), (att), id)
|
||||
#define PLAY_DURATION_ATT , uint8_t flags
|
||||
#define PLAY_TIME 1
|
||||
#define IS_PLAY_TIME() (flags&PLAY_TIME)
|
||||
#define IS_PLAYING(id) audioQueue.isPlaying((id))
|
||||
#define PLAY_VALUE(v, id) playValue((v), (id))
|
||||
#define PLAY_FILE(f, flags, id) audioQueue.playFile((f), (flags), (id))
|
||||
#define STOP_PLAY(id) audioQueue.stopPlay((id))
|
||||
#define AUDIO_RESET() audioQueue.reset()
|
||||
#define AUDIO_RESET() audioQueue.stopAll()
|
||||
|
||||
#if defined(SDCARD)
|
||||
extern tmr10ms_t timeAutomaticPromptsSilence;
|
||||
|
|
|
@ -225,7 +225,7 @@ PACK(typedef struct {
|
|||
LogicalSwitchData_v215 customSw[NUM_LOGICAL_SWITCH];
|
||||
CustomFnData_v215 funcSw[32];
|
||||
SwashRingData swashR;
|
||||
PhaseData_v215 phaseData[MAX_PHASES];
|
||||
PhaseData_v215 phaseData[MAX_FLIGHT_MODES];
|
||||
|
||||
int8_t ppmFrameLength; // 0=22.5ms (10ms-30ms) 0.5ms increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
@ -332,6 +332,9 @@ void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
|
|||
|
||||
int ConvertTelemetrySource_215_to_216(int source)
|
||||
{
|
||||
// TELEM_TX_TIME and 5 spare added
|
||||
if (source >= TELEM_TX_TIME)
|
||||
source += 6;
|
||||
// TELEM_RSSI_TX added
|
||||
if (source >= TELEM_RSSI_TX)
|
||||
source += 1;
|
||||
|
@ -387,8 +390,8 @@ int ConvertSwitch_215_to_216(int swtch)
|
|||
return -ConvertSwitch_215_to_216(-swtch);
|
||||
else if (swtch <= SWSRC_LAST_SWITCH)
|
||||
return swtch;
|
||||
else if (swtch > SWSRC_LAST_SWITCH + 32) {
|
||||
swtch -= (22+32);
|
||||
else if (swtch > SWSRC_LAST_SWITCH + 32 + 1) {
|
||||
swtch -= (SWSRC_LAST_SWITCH + 32 + 1);
|
||||
if (swtch > SWSRC_ON)
|
||||
swtch = 0;
|
||||
return swtch;
|
||||
|
|
|
@ -629,13 +629,13 @@ TEST(Mixer, SlowOnPhase)
|
|||
g_model.mixData[0].speedDown = SLOW_STEP*5;
|
||||
|
||||
s_mixer_first_run_done = true;
|
||||
s_perout_flight_phase = 0;
|
||||
s_perout_flight_mode = 0;
|
||||
perOut(e_perout_mode_normal, 0);
|
||||
EXPECT_EQ(chans[0], 0);
|
||||
|
||||
CHECK_SLOW_MOVEMENT(0, +1, 250);
|
||||
|
||||
s_perout_flight_phase = 1;
|
||||
s_perout_flight_mode = 1;
|
||||
CHECK_SLOW_MOVEMENT(0, -1, 250);
|
||||
}
|
||||
|
||||
|
@ -663,11 +663,11 @@ TEST(Mixer, SlowOnSwitchAndPhase)
|
|||
EXPECT_EQ(chans[0], 0);
|
||||
|
||||
simuSetSwitch(0, 1);
|
||||
s_perout_flight_phase = 0;
|
||||
s_perout_flight_mode = 0;
|
||||
CHECK_SLOW_MOVEMENT(0, +1, 250);
|
||||
|
||||
simuSetSwitch(0, -1);
|
||||
s_perout_flight_phase = 1;
|
||||
s_perout_flight_mode = 1;
|
||||
CHECK_SLOW_MOVEMENT(0, -1, 250);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -184,6 +184,12 @@ enum menuGeneralSetupItems {
|
|||
ITEM_SETUP_MAX
|
||||
};
|
||||
|
||||
#if defined(FRSKY_STICKS)
|
||||
#define COL_TX_MODE 0
|
||||
#else
|
||||
#define COL_TX_MODE LABEL(TX_MODE)
|
||||
#endif
|
||||
|
||||
void menuGeneralSetup(uint8_t event)
|
||||
{
|
||||
#if defined(RTCLOCK)
|
||||
|
@ -206,7 +212,7 @@ void menuGeneralSetup(uint8_t event)
|
|||
}
|
||||
#endif
|
||||
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, IF_RTCLOCK(2) IF_RTCLOCK(2) IF_BATTGRAPH(1) LABEL(SOUND), IF_AUDIO(0) IF_BUZZER(0) IF_VOICE(0) IF_CPUARM(0) IF_CPUARM(0) IF_CPUARM(0) 0, IF_AUDIO(0) IF_VARIO_CPUARM(LABEL(VARIO)) IF_VARIO_CPUARM(0) IF_VARIO_CPUARM(0) IF_VARIO_CPUARM(0) IF_VARIO_CPUARM(0) IF_HAPTIC(LABEL(HAPTIC)) IF_HAPTIC(0) IF_HAPTIC(0) IF_HAPTIC(0) 0, LABEL(ALARMS), 0, CASE_PCBSKY9X(0) CASE_PCBSKY9X(0) 0, 0, 0, IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, IF_CPUARM(0) IF_REVPLUS(0) CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, IF_SPLASH_PARAM(0) IF_GPS(0) IF_GPS(0) IF_PXX(0) IF_CPUARM(0) IF_CPUARM(0) IF_FAI_CHOICE(0) 0, LABEL(TX_MODE), CASE_PCBTARANIS(0) 1/*to force edit mode*/});
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, IF_RTCLOCK(2) IF_RTCLOCK(2) IF_BATTGRAPH(1) LABEL(SOUND), IF_AUDIO(0) IF_BUZZER(0) IF_VOICE(0) IF_CPUARM(0) IF_CPUARM(0) IF_CPUARM(0) 0, IF_AUDIO(0) IF_VARIO_CPUARM(LABEL(VARIO)) IF_VARIO_CPUARM(0) IF_VARIO_CPUARM(0) IF_VARIO_CPUARM(0) IF_VARIO_CPUARM(0) IF_HAPTIC(LABEL(HAPTIC)) IF_HAPTIC(0) IF_HAPTIC(0) IF_HAPTIC(0) 0, LABEL(ALARMS), 0, CASE_PCBSKY9X(0) CASE_PCBSKY9X(0) 0, 0, 0, IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, IF_CPUARM(0) IF_REVPLUS(0) CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, IF_SPLASH_PARAM(0) IF_GPS(0) IF_GPS(0) IF_PXX(0) IF_CPUARM(0) IF_CPUARM(0) IF_FAI_CHOICE(0) 0, COL_TX_MODE, CASE_PCBTARANIS(0) 1/*to force edit mode*/});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
|
|
|
@ -1059,7 +1059,7 @@ void menuModelSetup(uint8_t event)
|
|||
else {
|
||||
putsStrIdx(0*FW, y, STR_TIMER, k>=ITEM_MODEL_TIMER2 ? 2 : 1);
|
||||
putsTimerMode(MODEL_SETUP_2ND_COLUMN, y, timer->mode, m_posHorz==0 ? attr : 0);
|
||||
putsTime(MODEL_SETUP_2ND_COLUMN+5*FW-2+5*FWNUM+1, y, timer->start, m_posHorz==1 ? attr : 0, m_posHorz==2 ? attr : 0);
|
||||
putsTimer(MODEL_SETUP_2ND_COLUMN+5*FW-2+5*FWNUM+1, y, timer->start, m_posHorz==1 ? attr : 0, m_posHorz==2 ? attr : 0);
|
||||
#if defined(PCBTARANIS)
|
||||
if (attr && m_posHorz < 0) lcd_filled_rect(MODEL_SETUP_2ND_COLUMN, y, LCD_W-MODEL_SETUP_2ND_COLUMN-MENUS_SCROLLBAR_WIDTH, 8);
|
||||
#endif
|
||||
|
@ -1067,7 +1067,7 @@ void menuModelSetup(uint8_t event)
|
|||
div_t qr = div(timer->start, 60);
|
||||
switch (m_posHorz) {
|
||||
case 0:
|
||||
CHECK_INCDEC_MODELVAR(event, timer->mode, SWSRC_FIRST, TMR_VAROFS+SWSRC_LAST-1/*--- which is OFF*/);
|
||||
CHECK_INCDEC_MODELVAR(event, timer->mode, SWSRC_FIRST, TMR_VAROFS+SWSRC_LAST-1);
|
||||
break;
|
||||
case 1:
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, qr.quot, 59);
|
||||
|
@ -1108,7 +1108,7 @@ void menuModelSetup(uint8_t event)
|
|||
s_editMode = 0;
|
||||
if (event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
s_noHi = NO_HI_LEN;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
memclear(&g_model.phaseData[i], TRIMS_ARRAY_SIZE);
|
||||
}
|
||||
eeDirty(EE_MODEL);
|
||||
|
@ -1757,7 +1757,7 @@ uint8_t editDelay(const uint8_t y, const uint8_t event, const uint8_t attr, cons
|
|||
|
||||
void displayFlightModes(uint8_t x, uint8_t y, FlightModesType value)
|
||||
{
|
||||
uint8_t p = MAX_PHASES;
|
||||
uint8_t p = MAX_FLIGHT_MODES;
|
||||
do {
|
||||
--p;
|
||||
if (!(value & (1<<p)))
|
||||
|
@ -1781,7 +1781,7 @@ FlightModesType editFlightModes(uint8_t x, uint8_t y, uint8_t event, FlightModes
|
|||
bool expoMenu = (x==EXPO_ONE_2ND_COLUMN-5*FW);
|
||||
#endif
|
||||
|
||||
for (uint8_t p=0; p<MAX_PHASES; p++) {
|
||||
for (uint8_t p=0; p<MAX_FLIGHT_MODES; p++) {
|
||||
#if defined(CPUARM) && LCD_W < 212
|
||||
if (expoMenu && ((attr && p < posHorz-4) || (x > EXPO_ONE_2ND_COLUMN-FW)))
|
||||
continue;
|
||||
|
@ -1835,14 +1835,14 @@ bool isTrimModeAvailable(int mode)
|
|||
|
||||
void menuModelFlightModesAll(uint8_t event)
|
||||
{
|
||||
MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_PHASES+1, {0, NAVIGATION_LINE_BY_LINE|(ITEM_PHASES_LAST-5), NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, 0});
|
||||
MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_FLIGHT_MODES+1, {0, NAVIGATION_LINE_BY_LINE|(ITEM_PHASES_LAST-5), NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, NAVIGATION_LINE_BY_LINE|ITEM_PHASES_LAST, 0});
|
||||
|
||||
int8_t sub = m_posVert - 1;
|
||||
|
||||
horzpos_t posHorz = m_posHorz;
|
||||
if (sub==0 && posHorz > 0) { posHorz += 5; }
|
||||
|
||||
if (sub<MAX_PHASES && posHorz>=0) {
|
||||
if (sub<MAX_FLIGHT_MODES && posHorz>=0) {
|
||||
displayColumnHeader(STR_PHASES_HEADERS, posHorz);
|
||||
}
|
||||
|
||||
|
@ -1850,11 +1850,11 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
uint8_t y = 1 + (i+1)*FH;
|
||||
uint8_t k = i+s_pgOfs;
|
||||
|
||||
if (k==MAX_PHASES) {
|
||||
if (k==MAX_FLIGHT_MODES) {
|
||||
// last line available - add the "check trims" line
|
||||
lcd_putsLeft((LCD_LINES-1)*FH+1, STR_CHECKTRIMS);
|
||||
putsFlightPhase(OFS_CHECKTRIMS, (LCD_LINES-1)*FH+1, s_perout_flight_phase+1);
|
||||
if (sub==MAX_PHASES && !trimsCheckTimer) {
|
||||
putsFlightMode(OFS_CHECKTRIMS, (LCD_LINES-1)*FH+1, s_perout_flight_mode+1);
|
||||
if (sub==MAX_FLIGHT_MODES && !trimsCheckTimer) {
|
||||
lcd_status_line();
|
||||
}
|
||||
return;
|
||||
|
@ -1862,7 +1862,7 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
|
||||
PhaseData *p = phaseAddress(k);
|
||||
|
||||
putsFlightPhase(0, y, k+1, (getFlightPhase()==k ? BOLD : 0) | ((sub==k && m_posHorz<0) ? INVERS : 0));
|
||||
putsFlightMode(0, y, k+1, (getFlightPhase()==k ? BOLD : 0) | ((sub==k && m_posHorz<0) ? INVERS : 0));
|
||||
|
||||
for (uint8_t j=0; j<ITEM_PHASES_COUNT; j++) {
|
||||
uint8_t attr = ((sub==k && posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
|
@ -1878,7 +1878,7 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
}
|
||||
else {
|
||||
putsSwitches((5+LEN_FP_NAME)*FW+FW/2, y, p->swtch, attr);
|
||||
if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, SWSRC_FIRST, SWSRC_LAST);
|
||||
if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, SWSRC_FIRST_SHORT_LIST, SWSRC_LAST_SHORT_LIST);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1891,7 +1891,7 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
putsTrimMode((4+LEN_FP_NAME)*FW+j*(5*FW/2), y, k, t, attr);
|
||||
if (active) {
|
||||
trim_t & v = p->trim[t];
|
||||
v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, 2*MAX_PHASES-1, EE_MODEL, isTrimModeAvailable);
|
||||
v.mode = checkIncDec(event, v.mode==TRIM_MODE_NONE ? -1 : v.mode, -1, 2*MAX_FLIGHT_MODES-1, EE_MODEL, isTrimModeAvailable);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1933,7 +1933,7 @@ enum menuModelPhaseItems {
|
|||
void menuModelPhaseOne(uint8_t event)
|
||||
{
|
||||
PhaseData *phase = phaseAddress(s_currIdx);
|
||||
putsFlightPhase(13*FW, 0, s_currIdx+1, (getFlightPhase()==s_currIdx ? BOLD : 0));
|
||||
putsFlightMode(13*FW, 0, s_currIdx+1, (getFlightPhase()==s_currIdx ? BOLD : 0));
|
||||
|
||||
#if defined(GVARS) && !defined(PCBSTD)
|
||||
static const pm_uint8_t mstate_tab_phase1[] PROGMEM = {0, 0, 0, (uint8_t)-1, 1, 1, 1, 1, 1};
|
||||
|
@ -1979,7 +1979,7 @@ void menuModelPhaseOne(uint8_t event)
|
|||
if (attr && m_posHorz==t && ((editMode>0) || p1valdiff)) {
|
||||
int16_t v = getRawTrimValue(s_currIdx, t);
|
||||
if (v < TRIM_EXTENDED_MAX) v = TRIM_EXTENDED_MAX;
|
||||
v = checkIncDec(event, v, TRIM_EXTENDED_MAX, TRIM_EXTENDED_MAX+MAX_PHASES-1, EE_MODEL);
|
||||
v = checkIncDec(event, v, TRIM_EXTENDED_MAX, TRIM_EXTENDED_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
|
||||
if (checkIncDec_Ret) {
|
||||
if (v == TRIM_EXTENDED_MAX) v = 0;
|
||||
setTrimValue(s_currIdx, t, v);
|
||||
|
@ -2004,7 +2004,7 @@ void menuModelPhaseOne(uint8_t event)
|
|||
int16_t v = phaseAddress(s_currIdx)->rotaryEncoders[t];
|
||||
#endif
|
||||
if (v < ROTARY_ENCODER_MAX) v = ROTARY_ENCODER_MAX;
|
||||
v = checkIncDec(event, v, ROTARY_ENCODER_MAX, ROTARY_ENCODER_MAX+MAX_PHASES-1, EE_MODEL);
|
||||
v = checkIncDec(event, v, ROTARY_ENCODER_MAX, ROTARY_ENCODER_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
|
||||
if (checkIncDec_Ret) {
|
||||
if (v == ROTARY_ENCODER_MAX) v = 0;
|
||||
#if ROTARY_ENCODERS > 2
|
||||
|
@ -2048,14 +2048,14 @@ void menuModelPhaseOne(uint8_t event)
|
|||
if (v > GVAR_MAX) {
|
||||
uint8_t p = v - GVAR_MAX - 1;
|
||||
if (p >= s_currIdx) p++;
|
||||
putsFlightPhase(11*FW, y, p+1, posHorz==1 ? attr : 0);
|
||||
putsFlightMode(11*FW, y, p+1, posHorz==1 ? attr : 0);
|
||||
}
|
||||
else {
|
||||
lcd_putsAtt(11*FW, y, STR_OWN, posHorz==1 ? attr : 0);
|
||||
}
|
||||
if (attr && s_currIdx>0 && posHorz==1 && (editMode>0 || p1valdiff)) {
|
||||
if (v < GVAR_MAX) v = GVAR_MAX;
|
||||
v = checkIncDec(event, v, GVAR_MAX, GVAR_MAX+MAX_PHASES-1, EE_MODEL);
|
||||
v = checkIncDec(event, v, GVAR_MAX, GVAR_MAX+MAX_FLIGHT_MODES-1, EE_MODEL);
|
||||
if (checkIncDec_Ret) {
|
||||
if (v == GVAR_MAX) v = 0;
|
||||
phase->gvars[idx] = v;
|
||||
|
@ -2095,20 +2095,20 @@ void menuModelPhaseOne(uint8_t event)
|
|||
|
||||
void menuModelFlightModesAll(uint8_t event)
|
||||
{
|
||||
SIMPLE_MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_PHASES+1);
|
||||
SIMPLE_MENU(STR_MENUFLIGHTPHASES, menuTabModel, e_FlightModesAll, 1+MAX_FLIGHT_MODES+1);
|
||||
|
||||
int8_t sub = m_posVert - 1;
|
||||
|
||||
switch (event) {
|
||||
CASE_EVT_ROTARY_BREAK
|
||||
case EVT_KEY_FIRST(KEY_ENTER):
|
||||
if (sub == MAX_PHASES) {
|
||||
if (sub == MAX_FLIGHT_MODES) {
|
||||
s_editMode = 0;
|
||||
trimsCheckTimer = 200; // 2 seconds
|
||||
}
|
||||
// no break
|
||||
case EVT_KEY_FIRST(KEY_RIGHT):
|
||||
if (sub >= 0 && sub < MAX_PHASES) {
|
||||
if (sub >= 0 && sub < MAX_FLIGHT_MODES) {
|
||||
s_currIdx = sub;
|
||||
pushMenu(menuModelPhaseOne);
|
||||
}
|
||||
|
@ -2116,7 +2116,7 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
}
|
||||
|
||||
uint8_t att;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
#if defined(CPUARM)
|
||||
int8_t y = 1 + (1+i-s_pgOfs)*FH;
|
||||
if (y<1*FH+1 || y>(LCD_LINES-1)*FH+1) continue;
|
||||
|
@ -2126,9 +2126,9 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
att = (i==sub ? INVERS : 0);
|
||||
PhaseData *p = phaseAddress(i);
|
||||
#if ROTARY_ENCODERS > 2
|
||||
putsFlightPhase(0, y, i+1, att|CONDENSED|(getFlightPhase()==i ? BOLD : 0));
|
||||
putsFlightMode(0, y, i+1, att|CONDENSED|(getFlightPhase()==i ? BOLD : 0));
|
||||
#else
|
||||
putsFlightPhase(0, y, i+1, att|(getFlightPhase()==i ? BOLD : 0));
|
||||
putsFlightMode(0, y, i+1, att|(getFlightPhase()==i ? BOLD : 0));
|
||||
#endif
|
||||
|
||||
lcd_putsnAtt(4*FW+NAME_OFS, y, p->name, sizeof(p->name), ZCHAR);
|
||||
|
@ -2153,12 +2153,12 @@ void menuModelFlightModesAll(uint8_t event)
|
|||
}
|
||||
|
||||
#if defined(CPUARM)
|
||||
if (s_pgOfs != MAX_PHASES-(LCD_LINES-2)) return;
|
||||
if (s_pgOfs != MAX_FLIGHT_MODES-(LCD_LINES-2)) return;
|
||||
#endif
|
||||
|
||||
lcd_putsLeft((LCD_LINES-1)*FH+1, STR_CHECKTRIMS);
|
||||
putsFlightPhase(OFS_CHECKTRIMS, (LCD_LINES-1)*FH+1, s_perout_flight_phase+1);
|
||||
if (sub==MAX_PHASES && !trimsCheckTimer) {
|
||||
putsFlightMode(OFS_CHECKTRIMS, (LCD_LINES-1)*FH+1, s_perout_flight_mode+1);
|
||||
if (sub==MAX_FLIGHT_MODES && !trimsCheckTimer) {
|
||||
lcd_status_line();
|
||||
}
|
||||
}
|
||||
|
@ -2808,7 +2808,7 @@ bool swapExpoMix(uint8_t expo, uint8_t &idx, uint8_t up)
|
|||
}
|
||||
|
||||
if (tgt_idx == MAX_EXPOS) {
|
||||
if (((ExpoData *)x)->chn == NUM_STICKS-1)
|
||||
if (((ExpoData *)x)->chn == NUM_INPUTS-1)
|
||||
return false;
|
||||
((ExpoData *)x)->chn++;
|
||||
return true;
|
||||
|
@ -2821,7 +2821,7 @@ bool swapExpoMix(uint8_t expo, uint8_t &idx, uint8_t up)
|
|||
else return false;
|
||||
}
|
||||
else {
|
||||
if (((ExpoData *)x)->chn<NUM_STICKS-1) ((ExpoData *)x)->chn++;
|
||||
if (((ExpoData *)x)->chn<NUM_INPUTS-1) ((ExpoData *)x)->chn++;
|
||||
else return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -2910,7 +2910,7 @@ void menuModelExpoOne(uint8_t event)
|
|||
putsMixerSource(7*FW+FW/2, 0, MIXSRC_Rud+ed->chn, 0);
|
||||
#endif
|
||||
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {CASE_PCBTARANIS(0) IF_CPUARM(0) CASE_PCBTARANIS(0) CASE_PCBTARANIS((ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW)) 0, CASE_PCBTARANIS(0) CASE_9X(0) IF_CURVES(CURVE_ROWS) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
SUBMENU(STR_MENUINPUTS, EXPO_FIELD_MAX, {CASE_PCBTARANIS(0) IF_CPUARM(0) CASE_PCBTARANIS(0) CASE_PCBTARANIS((ed->srcRaw >= MIXSRC_FIRST_TELEM ? (uint8_t)0 : (uint8_t)HIDDEN_ROW)) 0, CASE_PCBTARANIS(0) CASE_9X(0) IF_CURVES(CURVE_ROWS) IF_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0 /*, ...*/});
|
||||
|
||||
SET_SCROLLBAR_X(EXPO_ONE_2ND_COLUMN+10*FW);
|
||||
|
||||
|
@ -3111,11 +3111,11 @@ void menuModelMixOne(uint8_t event)
|
|||
#else
|
||||
if (m_posVert == MIX_FIELD_TRIM && md2->srcRaw > NUM_STICKS)
|
||||
#endif
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, CASE_9X(0) IF_CURVES(0) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, CASE_9X(0) IF_CURVES(0) IF_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/})
|
||||
else
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, CASE_9X(1) IF_CURVES(1) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, CASE_9X(1) IF_CURVES(1) IF_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
#else
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, CASE_9X(1) CASE_PCBTARANIS(0) IF_CURVES(1) IF_FLIGHT_MODES((MAX_PHASES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
SUBMENU_NOTITLE(MIX_FIELD_COUNT, {IF_CPUARM(0) 0, 0, 0, CASE_9X(1) CASE_PCBTARANIS(0) IF_CURVES(1) IF_FLIGHT_MODES((MAX_FLIGHT_MODES-1) | NAVIGATION_LINE_BY_LINE) 0, 0 /*, ...*/});
|
||||
#endif
|
||||
|
||||
#if MENU_COLUMNS > 1
|
||||
|
@ -3314,7 +3314,7 @@ static uint8_t s_copySrcCh;
|
|||
#define EXPO_LINE_WEIGHT_POS 7*FW+1
|
||||
#define EXPO_LINE_EXPO_POS 11*FW
|
||||
#define EXPO_LINE_SWITCH_POS 11*FW+4
|
||||
#if MAX_PHASES == 6
|
||||
#if MAX_FLIGHT_MODES == 6
|
||||
#define EXPO_LINE_SIDE_POS 15*FW
|
||||
#else
|
||||
#define EXPO_LINE_SIDE_POS 15*FW+2
|
||||
|
@ -4102,7 +4102,7 @@ void onGVARSMenu(const char *result)
|
|||
eeDirty(EE_MODEL);
|
||||
}
|
||||
else if (result == STR_CLEAR) {
|
||||
for (int i=0; i<MAX_PHASES; i++) {
|
||||
for (int i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
g_model.phaseData[i].gvars[sub] = 0;
|
||||
}
|
||||
eeDirty(EE_MODEL);
|
||||
|
@ -4127,7 +4127,7 @@ void menuModelGVars(uint8_t event)
|
|||
menuTitle = STR_MENUGLOBALVARS;
|
||||
}
|
||||
|
||||
MENU_FLAGS(menuTitle, menuTabModel, e_GVars, first2seconds ? CHECK_FLAG_NO_SCREEN_INDEX : 0, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES, NAVIGATION_LINE_BY_LINE|MAX_PHASES});
|
||||
MENU_FLAGS(menuTitle, menuTabModel, e_GVars, first2seconds ? CHECK_FLAG_NO_SCREEN_INDEX : 0, 1+MAX_GVARS, {0, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES, NAVIGATION_LINE_BY_LINE|MAX_FLIGHT_MODES});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
|
@ -4146,7 +4146,7 @@ void menuModelGVars(uint8_t event)
|
|||
if (g_model.gvars[i].popup) lcd_putc(3*FW, y, '!');
|
||||
putsStrIdx(0, y, STR_GV, i+1, (sub==i && m_posHorz<0) ? INVERS : 0);
|
||||
|
||||
for (uint8_t j=0; j<1+MAX_PHASES; j++) {
|
||||
for (uint8_t j=0; j<1+MAX_FLIGHT_MODES; j++) {
|
||||
LcdFlags attr = ((sub==i && m_posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
xcoord_t x = GVARS_FM_COLUMN(j-1);
|
||||
|
||||
|
@ -4170,8 +4170,8 @@ void menuModelGVars(uint8_t event)
|
|||
if (v > GVAR_MAX) {
|
||||
uint8_t p = v - GVAR_MAX - 1;
|
||||
if (p >= j-1) p++;
|
||||
putsFlightPhase(x-15, y, p+1, attr|SMLSIZE);
|
||||
vmin = GVAR_MAX+1; vmax = GVAR_MAX+MAX_PHASES-1;
|
||||
putsFlightMode(x-15, y, p+1, attr|SMLSIZE);
|
||||
vmin = GVAR_MAX+1; vmax = GVAR_MAX+MAX_FLIGHT_MODES-1;
|
||||
}
|
||||
else {
|
||||
if (abs(v) >= 100)
|
||||
|
@ -4348,7 +4348,7 @@ void menuModelLogicalSwitchOne(uint8_t event)
|
|||
CHECK_INCDEC_MODELVAR(event, cs->v3, 0, 222 - cs->v2);
|
||||
break;
|
||||
}
|
||||
v2_min=-129; v2_max = 122;
|
||||
v2_min = -129; v2_max = 122;
|
||||
}
|
||||
else if (cstate == LS_FAMILY_COMP) {
|
||||
putsMixerSource(CSWONE_2ND_COLUMN, y, cs->v2, attr);
|
||||
|
@ -4646,6 +4646,7 @@ void menuModelLogicalSwitches(uint8_t event)
|
|||
v2_max = maxTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1);
|
||||
#if defined(CPUARM)
|
||||
v2_min = minTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1);
|
||||
if (horz == 2 && v2_max-v2_min > 1000)
|
||||
INCDEC_SET_FLAG(INCDEC_REP10 | NO_INCDEC_MARKS);
|
||||
if (cs->v2 < v2_min || cs->v2 > v2_max) {
|
||||
cs->v2 = 0;
|
||||
|
@ -4967,10 +4968,11 @@ void menuModelCustomFunctions(uint8_t event)
|
|||
{
|
||||
INCDEC_DECLARE_VARS();
|
||||
int16_t val_displayed = CFN_PARAM(sd);
|
||||
int8_t val_min = 0;
|
||||
#if defined(CPUARM)
|
||||
int16_t val_min = 0;
|
||||
int16_t val_max = 255;
|
||||
#else
|
||||
int8_t val_min = 0;
|
||||
uint8_t val_max = 255;
|
||||
#endif
|
||||
if (func == FUNC_SAFETY_CHANNEL) {
|
||||
|
@ -4981,7 +4983,7 @@ void menuModelCustomFunctions(uint8_t event)
|
|||
#if defined(CPUARM)
|
||||
else if (func == FUNC_SET_TIMER) {
|
||||
val_max = 59*60+59;
|
||||
putsTime(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT, attr);
|
||||
putsTimer(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT, attr);
|
||||
}
|
||||
#endif
|
||||
#if defined(AUDIO)
|
||||
|
@ -5092,7 +5094,7 @@ void menuModelCustomFunctions(uint8_t event)
|
|||
switch (CFN_GVAR_MODE(sd)) {
|
||||
case FUNC_ADJUST_GVAR_CONSTANT:
|
||||
val_displayed = (int8_t)CFN_PARAM(sd);
|
||||
val_min = -125; val_max = 125;
|
||||
val_min = -CFN_GVAR_CST_MAX; val_max = +CFN_GVAR_CST_MAX;
|
||||
lcd_outdezAtt(MODEL_CUSTOM_FUNC_3RD_COLUMN, y, val_displayed, attr|LEFT);
|
||||
break;
|
||||
case FUNC_ADJUST_GVAR_SOURCE:
|
||||
|
|
|
@ -123,13 +123,13 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
|
|||
else if (DBLKEYS_PRESSED_RGT_UP(in)) {
|
||||
newval = (i_max > 100 ? 100 : i_max);
|
||||
#if defined(CPUARM)
|
||||
if(i_flags & DBLKEYS_1000) newval *= 10;
|
||||
if (i_flags & DBLKEYS_1000) newval *= 10;
|
||||
#endif
|
||||
}
|
||||
else if (DBLKEYS_PRESSED_LFT_DWN(in)) {
|
||||
newval = (i_min < -100 ? -100 : i_min);
|
||||
#if defined(CPUARM)
|
||||
if(i_flags & DBLKEYS_1000) newval *= 10;
|
||||
if (i_flags & DBLKEYS_1000) newval *= 10;
|
||||
#endif
|
||||
}
|
||||
else if (DBLKEYS_PRESSED_UP_DWN(in))
|
||||
|
@ -141,7 +141,6 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
|
|||
|
||||
#endif
|
||||
|
||||
|
||||
if (dblkey) {
|
||||
killEvents(KEY_UP);
|
||||
killEvents(KEY_DOWN);
|
||||
|
@ -1132,7 +1131,7 @@ int8_t switchMenuItem(uint8_t x, uint8_t y, int8_t value, LcdFlags attr, uint8_t
|
|||
{
|
||||
lcd_putsColumnLeft(x, y, STR_SWITCH);
|
||||
putsSwitches(x, y, value, attr);
|
||||
if (attr) CHECK_INCDEC_MODELSWITCH(event, value, SWSRC_FIRST, SWSRC_LAST);
|
||||
if (attr) CHECK_INCDEC_MODELSWITCH(event, value, SWSRC_FIRST_SHORT_LIST, SWSRC_LAST_SHORT_LIST);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
@ -1168,11 +1167,11 @@ int16_t gvarMenuItem(uint8_t x, uint8_t y, int16_t value, int16_t min, int16_t m
|
|||
s_editMode = !s_editMode;
|
||||
#if defined(CPUARM)
|
||||
if (attr & PREC1)
|
||||
value = (GV_IS_GV_VALUE(value, min, max) ? GET_GVAR(value, min, max, s_perout_flight_phase)*10 : delta);
|
||||
value = (GV_IS_GV_VALUE(value, min, max) ? GET_GVAR(value, min, max, s_perout_flight_mode)*10 : delta);
|
||||
else
|
||||
value = (GV_IS_GV_VALUE(value, min, max) ? GET_GVAR(value, min, max, s_perout_flight_phase) : delta);
|
||||
value = (GV_IS_GV_VALUE(value, min, max) ? GET_GVAR(value, min, max, s_perout_flight_mode) : delta);
|
||||
#else
|
||||
value = (GV_IS_GV_VALUE(value, min, max) ? GET_GVAR(value, min, max, s_perout_flight_phase) : delta);
|
||||
value = (GV_IS_GV_VALUE(value, min, max) ? GET_GVAR(value, min, max, s_perout_flight_mode) : delta);
|
||||
#endif
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
|
@ -1376,7 +1375,15 @@ bool isSourceAvailable(int source)
|
|||
{
|
||||
#if defined(PCBTARANIS)
|
||||
if (source>=MIXSRC_FIRST_INPUT && source<=MIXSRC_LAST_INPUT) {
|
||||
return ZEXIST(g_model.inputNames[source-MIXSRC_FIRST_INPUT]);
|
||||
int input = source - MIXSRC_FIRST_INPUT;
|
||||
for (int i=0; i<MAX_EXPOS; i++) {
|
||||
ExpoData * expo = expoAddress(i);
|
||||
if (!EXPO_VALID(expo))
|
||||
break;
|
||||
if (expo->chn == input)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1437,12 +1444,20 @@ bool isTelemetrySourceAvailable(int source)
|
|||
return false;
|
||||
#endif
|
||||
|
||||
#if !defined(RTCLOCK)
|
||||
if (source == TELEM_TX_TIME)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (source >= TELEM_RESERVE1 && source <= TELEM_RESERVE5)
|
||||
return false;
|
||||
|
||||
if (source >= TELEM_RESERVE6 && source <= TELEM_RESERVE10)
|
||||
return false;
|
||||
|
||||
if (source >= TELEM_RESERVE11 && source <= TELEM_RESERVE15)
|
||||
return false;
|
||||
|
||||
if (source == TELEM_DTE)
|
||||
return false;
|
||||
|
||||
|
@ -1508,8 +1523,8 @@ bool isSwitchAvailable(int swtch)
|
|||
swtch = -swtch;
|
||||
}
|
||||
|
||||
if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) {
|
||||
LogicalSwitchData * cs = cswAddress(swtch-SWSRC_FIRST_CSW);
|
||||
if (swtch >= SWSRC_FIRST_LOGICAL_SWITCH && swtch <= SWSRC_LAST_LOGICAL_SWITCH) {
|
||||
LogicalSwitchData * cs = cswAddress(swtch-SWSRC_FIRST_LOGICAL_SWITCH);
|
||||
return (cs->func != LS_FUNC_NONE);
|
||||
}
|
||||
|
||||
|
|
|
@ -318,11 +318,7 @@ void displayTopBar()
|
|||
/* RTC time */
|
||||
struct gtm t;
|
||||
gettime(&t);
|
||||
if (t.tm_sec % 2) {
|
||||
lcd_putcAtt(BAR_TIME_X+1, BAR_Y+1, ':', 0);
|
||||
}
|
||||
lcd_outdezNAtt(BAR_TIME_X+1, BAR_Y+1, t.tm_hour, LEADING0, 2);
|
||||
lcd_outdezNAtt(BAR_TIME_X+3*FWNUM-1, BAR_Y+1, t.tm_min, LEADING0, 2);
|
||||
putsTime(BAR_TIME_X+1, BAR_Y+1, t, TIMEBLINK);
|
||||
|
||||
/* The background */
|
||||
lcd_filled_rect(BAR_X, BAR_Y, BAR_W, BAR_H, SOLID, FILL_WHITE|GREY_DEFAULT|ROUND);
|
||||
|
@ -344,7 +340,7 @@ void displayTimers()
|
|||
// Main timer
|
||||
if (g_model.timers[0].mode) {
|
||||
TimerState & timerState = timersStates[0];
|
||||
putsTime(TIMERS_X, TIMER1_Y, timerState.val, MIDSIZE|LEFT, MIDSIZE|LEFT);
|
||||
putsTimer(TIMERS_X, TIMER1_Y, timerState.val, MIDSIZE|LEFT, MIDSIZE|LEFT);
|
||||
putsTimerMode(TIMERS_X, TIMER1_Y-6, g_model.timers[0].mode, SMLSIZE);
|
||||
if (g_model.timers[0].persistent) lcd_putcAtt(TIMERS_R, TIMER1_Y+1, 'P', SMLSIZE);
|
||||
if (timerState.val < 0) {
|
||||
|
@ -357,7 +353,7 @@ void displayTimers()
|
|||
// Second timer
|
||||
if (g_model.timers[1].mode) {
|
||||
TimerState & timerState = timersStates[1];
|
||||
putsTime(TIMERS_X, TIMER2_Y, timerState.val, MIDSIZE|LEFT, MIDSIZE|LEFT);
|
||||
putsTimer(TIMERS_X, TIMER2_Y, timerState.val, MIDSIZE|LEFT, MIDSIZE|LEFT);
|
||||
putsTimerMode(TIMERS_X, TIMER2_Y-6, g_model.timers[1].mode, SMLSIZE);
|
||||
if (g_model.timers[1].persistent) lcd_putcAtt(TIMERS_R, TIMER2_Y+1, 'P', SMLSIZE);
|
||||
if (timerState.val < 0) {
|
||||
|
@ -374,7 +370,7 @@ void displayTimers()
|
|||
if (g_model.timers[0].mode) {
|
||||
TimerState & timerState = timersStates[0];
|
||||
uint8_t att = DBLSIZE | (timerState.val<0 ? BLINK|INVERS : 0);
|
||||
putsTime(12*FW+2+10*FWNUM-4, FH*2, timerState.val, att, att);
|
||||
putsTimer(12*FW+2+10*FWNUM-4, FH*2, timerState.val, att, att);
|
||||
putsTimerMode(timerState.val >= 0 ? 9*FW-FW/2+3 : 9*FW-FW/2-4, FH*3, g_model.timers[0].mode);
|
||||
}
|
||||
}
|
||||
|
@ -650,7 +646,7 @@ void menuMainView(uint8_t event)
|
|||
|
||||
{
|
||||
// Flight Phase Name
|
||||
uint8_t phase = s_perout_flight_phase;
|
||||
uint8_t phase = s_perout_flight_mode;
|
||||
lcd_putsnAtt(PHASE_X, PHASE_Y, g_model.phaseData[phase].name, sizeof(g_model.phaseData[phase].name), ZCHAR|PHASE_FLAGS);
|
||||
|
||||
// Model Name
|
||||
|
@ -840,7 +836,7 @@ void menuMainView(uint8_t event)
|
|||
}
|
||||
}
|
||||
else { // timer2
|
||||
putsTime(33+FW+2+10*FWNUM-4, FH*5, timersStates[1].val, DBLSIZE, DBLSIZE);
|
||||
putsTimer(33+FW+2+10*FWNUM-4, FH*5, timersStates[1].val, DBLSIZE, DBLSIZE);
|
||||
putsTimerMode(timersStates[1].val >= 0 ? 20-FW/2+5 : 20-FW/2-2, FH*6, g_model.timers[1].mode);
|
||||
// lcd_outdezNAtt(33+11*FW, FH*6, s_timerVal_10ms[1], LEADING0, 2); // 1/100s
|
||||
}
|
||||
|
@ -862,13 +858,13 @@ void menuMainView(uint8_t event)
|
|||
putsStrIdx(BITMAP_X+FW, BITMAP_Y+FH-1, STR_GV, s_gvar_last+1);
|
||||
lcd_putsnAtt(BITMAP_X+4*FW+FW/2, BITMAP_Y+FH-1, g_model.gvars[s_gvar_last].name, LEN_GVAR_NAME, ZCHAR);
|
||||
lcd_putsAtt(BITMAP_X+FW, BITMAP_Y+2*FH+3, PSTR("[\010]"), BOLD);
|
||||
lcd_outdezAtt(BITMAP_X+5*FW+FW/2, BITMAP_Y+2*FH+3, GVAR_VALUE(s_gvar_last, s_perout_flight_phase), BOLD);
|
||||
lcd_outdezAtt(BITMAP_X+5*FW+FW/2, BITMAP_Y+2*FH+3, GVAR_VALUE(s_gvar_last, s_perout_flight_mode), BOLD);
|
||||
#else
|
||||
s_warning = STR_GLOBAL_VAR;
|
||||
displayBox();
|
||||
lcd_putsnAtt(16, 5*FH, g_model.gvars[s_gvar_last].name, LEN_GVAR_NAME, ZCHAR);
|
||||
lcd_putsAtt(16+7*FW, 5*FH, PSTR("[\010]"), BOLD);
|
||||
lcd_outdezAtt(16+7*FW+4*FW+FW/2, 5*FH, GVAR_VALUE(s_gvar_last, s_perout_flight_phase), BOLD);
|
||||
lcd_outdezAtt(16+7*FW+4*FW+FW/2, 5*FH, GVAR_VALUE(s_gvar_last, s_perout_flight_mode), BOLD);
|
||||
s_warning = NULL;
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -58,16 +58,16 @@ void menuStatisticsView(uint8_t event)
|
|||
}
|
||||
|
||||
lcd_puts( 1*FW, FH*0, STR_TOTTM1TM2THRTHP);
|
||||
putsTime( 5*FW+5*FWNUM+1, FH*1, timersStates[0].val, 0, 0);
|
||||
putsTime( 12*FW+5*FWNUM+1, FH*1, timersStates[1].val, 0, 0);
|
||||
putsTimer( 5*FW+5*FWNUM+1, FH*1, timersStates[0].val, 0, 0);
|
||||
putsTimer( 12*FW+5*FWNUM+1, FH*1, timersStates[1].val, 0, 0);
|
||||
|
||||
putsTime( 5*FW+5*FWNUM+1, FH*2, s_timeCumThr, 0, 0);
|
||||
putsTime( 12*FW+5*FWNUM+1, FH*2, s_timeCum16ThrP/16, 0, 0);
|
||||
putsTimer( 5*FW+5*FWNUM+1, FH*2, s_timeCumThr, 0, 0);
|
||||
putsTimer( 12*FW+5*FWNUM+1, FH*2, s_timeCum16ThrP/16, 0, 0);
|
||||
|
||||
putsTime( 12*FW+5*FWNUM+1, FH*0, s_timeCumTot, 0, 0);
|
||||
putsTimer( 12*FW+5*FWNUM+1, FH*0, s_timeCumTot, 0, 0);
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
putsTime(21*FW+5*FWNUM+1, 0*FH, g_eeGeneral.globalTimer + sessionTimer, 0, 0);
|
||||
putsTimer(21*FW+5*FWNUM+1, 0*FH, g_eeGeneral.globalTimer + sessionTimer, 0, 0);
|
||||
#endif
|
||||
|
||||
#if defined(THRTRACE)
|
||||
|
@ -147,7 +147,7 @@ void menuStatisticsDebug(uint8_t event)
|
|||
|
||||
lcd_putsLeft(2*FH, STR_CPU_MAH);
|
||||
putsTelemetryValue(MENU_DEBUG_COL_OFS, 2*FH, g_eeGeneral.mAhUsed + Current_used*current_scale/8192/36, UNIT_MAH, PREC1);
|
||||
putsTime(17*FW+5*FWNUM+1, 2*FH, g_eeGeneral.globalTimer + sessionTimer, 0, 0);
|
||||
putsTimer(17*FW+5*FWNUM+1, 2*FH, g_eeGeneral.globalTimer + sessionTimer, 0, 0);
|
||||
#endif
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
#include "../opentx.h"
|
||||
|
||||
#define TEXT_FILENAME_MAXLEN 40
|
||||
#define TEXT_FILE_MAXSIZE 1000
|
||||
#define TEXT_FILE_MAXSIZE 2048
|
||||
|
||||
char s_text_file[TEXT_FILENAME_MAXLEN];
|
||||
char s_text_screen[LCD_LINES-1][LCD_COLS+1];
|
||||
|
@ -72,15 +72,23 @@ void readTextFile(int & lines_count)
|
|||
escape_chars[escape-1] = c;
|
||||
if (escape == 2 && !strncmp(escape_chars, "up", 2)) {
|
||||
c = '\300';
|
||||
escape = 0;
|
||||
}
|
||||
else if (escape == 2 && !strncmp(escape_chars, "dn", 2)) {
|
||||
c = '\301';
|
||||
escape = 0;
|
||||
}
|
||||
else {
|
||||
escape++;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if (c=='~') {
|
||||
c = 'z'+1;
|
||||
}
|
||||
else if (c=='\t') {
|
||||
c = 0x1D; //tab
|
||||
}
|
||||
escape = 0;
|
||||
s_text_screen[current_line-s_pgOfs][line_length++] = c;
|
||||
}
|
||||
|
|
|
@ -368,13 +368,13 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
|
|||
if (y >= LCD_H) break;
|
||||
}
|
||||
#if defined(CPUARM)
|
||||
else if (c == 0x1D) { //TAB
|
||||
else if (c == 0x1D) { // TAB
|
||||
x |= 0x3F;
|
||||
x += 1;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
x += (c*FW/2); //EXTENDED SPACE
|
||||
x += (c*FW/2); // EXTENDED SPACE
|
||||
}
|
||||
s++;
|
||||
}
|
||||
|
@ -842,12 +842,12 @@ void lcdDrawTelemetryTopBar()
|
|||
putsVBat(16*FW+1,0,att);
|
||||
if (g_model.timers[0].mode) {
|
||||
att = (timersStates[0].val<0 ? BLINK : 0);
|
||||
putsTime(22*FW+5*FWNUM+3, 0, timersStates[0].val, att, att);
|
||||
putsTimer(22*FW+5*FWNUM+3, 0, timersStates[0].val, att, att);
|
||||
lcd_putsiAtt(18*FW+2, 1, STR_VTELEMCHNS, TELEM_TM1, SMLSIZE);
|
||||
}
|
||||
if (g_model.timers[1].mode) {
|
||||
att = (timersStates[1].val<0 ? BLINK : 0);
|
||||
putsTime(31*FW+5*FWNUM+3, 0, timersStates[1].val, att, att);
|
||||
putsTimer(31*FW+5*FWNUM+3, 0, timersStates[1].val, att, att);
|
||||
lcd_putsiAtt(27*FW+2, 1, STR_VTELEMCHNS, TELEM_TM2, SMLSIZE);
|
||||
}
|
||||
lcd_invert_line(0);
|
||||
|
@ -860,13 +860,25 @@ void lcdDrawTelemetryTopBar()
|
|||
putsVBat(14*FW,0,att);
|
||||
if (g_model.timers[0].mode) {
|
||||
att = (timersStates[0].val<0 ? BLINK : 0);
|
||||
putsTime(17*FW+5*FWNUM+1, 0, timersStates[0].val, att, att);
|
||||
putsTimer(17*FW+5*FWNUM+1, 0, timersStates[0].val, att, att);
|
||||
}
|
||||
lcd_invert_line(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2)
|
||||
#if defined(CPUARM) && defined(RTCLOCK)
|
||||
void putsTime(xcoord_t x, uint8_t y, struct gtm t, LcdFlags att)
|
||||
{
|
||||
LcdFlags att2 = (att & (INVERS|BLINK)) | LEADING0;
|
||||
lcd_outdezNAtt(x, y, t.tm_hour, att2, 2);
|
||||
if (!(att&TIMEBLINK) || (t.tm_sec%2)) {
|
||||
lcd_putcAtt(x, y, ':', att);
|
||||
}
|
||||
lcd_outdezNAtt(x+3*FWNUM-2, y, t.tm_min, att2, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
void putsTimer(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2)
|
||||
{
|
||||
div_t qr;
|
||||
|
||||
|
@ -1020,11 +1032,16 @@ void putsSwitches(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
|
|||
lcd_putcAtt(x-2, y, '!', att);
|
||||
idx = -idx;
|
||||
}
|
||||
#if defined(CPUARM) && defined(FLIGHT_MODES)
|
||||
if (idx >= SWSRC_FIRST_FLIGHT_MODE)
|
||||
putsStrIdx(x, y, STR_FP, idx-SWSRC_FIRST_FLIGHT_MODE, att);
|
||||
else
|
||||
#endif
|
||||
lcd_putsiAtt(x, y, STR_VSWITCHES, idx-1, att);
|
||||
}
|
||||
|
||||
#if defined(FLIGHT_MODES)
|
||||
void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
|
||||
void putsFlightMode(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att)
|
||||
{
|
||||
if (idx==0) { lcd_putsiAtt(x, y, STR_MMMINV, 0, att); return; }
|
||||
if (idx < 0) { lcd_putcAtt(x-2, y, '!', att); idx = -idx; }
|
||||
|
@ -1181,10 +1198,20 @@ const pm_uint8_t bchunit_ar[] PROGMEM = {
|
|||
void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val, uint8_t att)
|
||||
{
|
||||
switch (channel) {
|
||||
#if defined(CPUARM) && defined(RTCLOCK)
|
||||
case TELEM_TX_TIME-1:
|
||||
{
|
||||
gtm t;
|
||||
t.tm_hour = val / 60;
|
||||
t.tm_min = val % 60;
|
||||
putsTime(x+2*FWNUM, y, t, att);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case TELEM_TM1-1:
|
||||
case TELEM_TM2-1:
|
||||
att &= ~NO_UNIT;
|
||||
putsTime(x, y, val, att, att);
|
||||
putsTimer(x, y, val, att, att);
|
||||
break;
|
||||
#if defined(FRSKY)
|
||||
case TELEM_MIN_A1-1:
|
||||
|
@ -1306,7 +1333,7 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val,
|
|||
case TELEM_TM1-1:
|
||||
case TELEM_TM2-1:
|
||||
att &= ~NO_UNIT;
|
||||
putsTime(x, y, val, att, att);
|
||||
putsTimer(x, y, val, att, att);
|
||||
break;
|
||||
|
||||
case TELEM_TX_VOLTAGE-1:
|
||||
|
|
|
@ -113,6 +113,7 @@
|
|||
#define SMLSIZE 0x0200
|
||||
#define TINSIZE 0x0400
|
||||
#define STREXPANDED 0x0800
|
||||
#define TIMEBLINK 0x1000
|
||||
#else
|
||||
#define MIDSIZE DBLSIZE
|
||||
#define SMLSIZE 0x00
|
||||
|
@ -178,7 +179,7 @@ void putsStrIdx(xcoord_t x, uint8_t y, const pm_char *str, uint8_t idx, LcdFlags
|
|||
void putsModelName(xcoord_t x, uint8_t y, char *name, uint8_t id, LcdFlags att);
|
||||
void putsSwitches(xcoord_t x, uint8_t y, int8_t swtch, LcdFlags att=0);
|
||||
void putsMixerSource(xcoord_t x, uint8_t y, uint8_t idx, LcdFlags att=0);
|
||||
void putsFlightPhase(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att=0);
|
||||
void putsFlightMode(xcoord_t x, uint8_t y, int8_t idx, LcdFlags att=0);
|
||||
#if defined(PCBTARANIS) && !defined(BOOT)
|
||||
void putsCurveRef(xcoord_t x, uint8_t y, CurveRef &curve, LcdFlags att);
|
||||
#endif
|
||||
|
@ -202,7 +203,8 @@ void putsTelemetryChannel(xcoord_t x, uint8_t y, uint8_t channel, lcdint_t val,
|
|||
#define putstime_t int16_t
|
||||
#endif
|
||||
|
||||
void putsTime(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2);
|
||||
void putsTime(xcoord_t x, uint8_t y, struct gtm t, LcdFlags att);
|
||||
void putsTimer(xcoord_t x, uint8_t y, putstime_t tme, LcdFlags att, LcdFlags att2);
|
||||
|
||||
#define SOLID 0xff
|
||||
#define DOTTED 0x55
|
||||
|
|
|
@ -741,6 +741,29 @@ static int luaModelSetOutput(lua_State *L)
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int luaModelGetGlobalVariable(lua_State *L)
|
||||
{
|
||||
int idx = luaL_checkunsigned(L, 1);
|
||||
int phase = luaL_checkunsigned(L, 2);
|
||||
if (phase < MAX_FLIGHT_MODES && idx < MAX_GVARS)
|
||||
lua_pushinteger(L, g_model.phaseData[phase].gvars[idx]);
|
||||
else
|
||||
lua_pushnil(L);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int luaModelSetGlobalVariable(lua_State *L)
|
||||
{
|
||||
int idx = luaL_checkunsigned(L, 1);
|
||||
int phase = luaL_checkunsigned(L, 2);
|
||||
int value = luaL_checkinteger(L, 3);
|
||||
if (phase < MAX_FLIGHT_MODES && idx < MAX_GVARS && value >= -GVAR_LIMIT && value <= GVAR_LIMIT) {
|
||||
g_model.phaseData[phase].gvars[idx] = value;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int luaPopupInput(lua_State *L)
|
||||
{
|
||||
uint8_t event = luaL_checkinteger(L, 2);
|
||||
|
@ -849,6 +872,8 @@ static const luaL_Reg modelLib[] = {
|
|||
{ "setCustomFunction", luaModelSetCustomFunction },
|
||||
{ "getOutput", luaModelGetOutput },
|
||||
{ "setOutput", luaModelSetOutput },
|
||||
{ "getGlobalVariable", luaModelGetGlobalVariable },
|
||||
{ "setGlobalVariable", luaModelSetGlobalVariable },
|
||||
{ NULL, NULL } /* sentinel */
|
||||
};
|
||||
|
||||
|
@ -901,7 +926,7 @@ void luaInit()
|
|||
lua_registerint(L, "STICK_ELEVATOR", MIXSRC_Ele);
|
||||
lua_registerint(L, "STICK_THROTTLE", MIXSRC_Thr);
|
||||
lua_registerint(L, "STICK_AILERON", MIXSRC_Ail);
|
||||
lua_registerint(L, "SWITCH_LAST", SWSRC_LAST_CSW);
|
||||
lua_registerint(L, "SWITCH_LAST", SWSRC_LAST_LOGICAL_SWITCH);
|
||||
lua_registerint(L, "EVT_MENU_BREAK", EVT_KEY_BREAK(KEY_MENU));
|
||||
lua_registerint(L, "EVT_PAGE_BREAK", EVT_KEY_BREAK(KEY_PAGE));
|
||||
lua_registerint(L, "EVT_ENTER_BREAK", EVT_KEY_BREAK(KEY_ENTER));
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
#if defined(PCBTARANIS)
|
||||
#define MAX_MODELS 60
|
||||
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
|
||||
#define MAX_PHASES 9
|
||||
#define MAX_FLIGHT_MODES 9
|
||||
#define MAX_MIXERS 64
|
||||
#define MAX_EXPOS 64
|
||||
#define NUM_LOGICAL_SWITCH 32 // number of custom switches
|
||||
|
@ -86,7 +86,7 @@
|
|||
#elif defined(CPUARM)
|
||||
#define MAX_MODELS 60
|
||||
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
|
||||
#define MAX_PHASES 9
|
||||
#define MAX_FLIGHT_MODES 9
|
||||
#define MAX_MIXERS 64
|
||||
#define MAX_EXPOS 32
|
||||
#define NUM_LOGICAL_SWITCH 32 // number of custom switches
|
||||
|
@ -97,7 +97,7 @@
|
|||
#elif defined(CPUM2560) || defined(CPUM2561)
|
||||
#define MAX_MODELS 30
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
#define MAX_PHASES 6
|
||||
#define MAX_FLIGHT_MODES 6
|
||||
#define MAX_MIXERS 32
|
||||
#define MAX_EXPOS 16
|
||||
#define NUM_LOGICAL_SWITCH 15 // number of custom switches
|
||||
|
@ -108,7 +108,7 @@
|
|||
#elif defined(CPUM128)
|
||||
#define MAX_MODELS 30
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
#define MAX_PHASES 5
|
||||
#define MAX_FLIGHT_MODES 5
|
||||
#define MAX_MIXERS 32
|
||||
#define MAX_EXPOS 14
|
||||
#define NUM_LOGICAL_SWITCH 15 // number of custom switches
|
||||
|
@ -119,7 +119,7 @@
|
|||
#else
|
||||
#define MAX_MODELS 16
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
#define MAX_PHASES 5
|
||||
#define MAX_FLIGHT_MODES 5
|
||||
#define MAX_MIXERS 32
|
||||
#define MAX_EXPOS 14
|
||||
#define NUM_LOGICAL_SWITCH 12 // number of custom switches
|
||||
|
@ -364,6 +364,18 @@ PACK(typedef struct {
|
|||
int16_t spanPos;
|
||||
}) CalibData;
|
||||
|
||||
#if defined(PCBSTD)
|
||||
#define N_PCBSTD_FIELD(x)
|
||||
#else
|
||||
#define N_PCBSTD_FIELD(x) x;
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define N_TARANIS_FIELD(x)
|
||||
#else
|
||||
#define N_TARANIS_FIELD(x) x;
|
||||
#endif
|
||||
|
||||
#define ALTERNATE_VIEW 0x10
|
||||
PACK(typedef struct t_EEGeneral {
|
||||
uint8_t version;
|
||||
|
@ -396,7 +408,8 @@ PACK(typedef struct t_EEGeneral {
|
|||
uint8_t templateSetup; // RETA order for receiver channels
|
||||
int8_t PPM_Multiplier;
|
||||
int8_t hapticLength;
|
||||
uint8_t reNavigation; // not used on STOCK board
|
||||
N_PCBSTD_FIELD( uint8_t reNavigation)
|
||||
N_TARANIS_FIELD(uint8_t stickReverse)
|
||||
int8_t beepLength:3;
|
||||
uint8_t hapticStrength:3;
|
||||
uint8_t gpsFormat:1;
|
||||
|
@ -509,9 +522,9 @@ PACK(typedef struct t_ExpoData {
|
|||
#define limit_min_max_t int16_t
|
||||
#define LIMIT_EXT_PERCENT 150
|
||||
#define LIMIT_EXT_MAX (LIMIT_EXT_PERCENT*10)
|
||||
#define LIMIT_MAX(lim) (GV_IS_GV_VALUE(lim->max, -LIMIT_EXT_MAX, LIMIT_EXT_MAX) ? GET_GVAR(lim->max, -LIMIT_EXT_MAX, LIMIT_EXT_MAX, s_perout_flight_phase)*10 : lim->max+1000)
|
||||
#define LIMIT_MIN(lim) (GV_IS_GV_VALUE(lim->min, -LIMIT_EXT_MAX, LIMIT_EXT_MAX) ? GET_GVAR(lim->min, -LIMIT_EXT_MAX, LIMIT_EXT_MAX, s_perout_flight_phase)*10 : lim->min-1000)
|
||||
#define LIMIT_OFS(lim) (GV_IS_GV_VALUE(lim->offset, -1000, 1000) ? GET_GVAR(lim->offset, -1000, 1000, s_perout_flight_phase)*10 : lim->offset)
|
||||
#define LIMIT_MAX(lim) (GV_IS_GV_VALUE(lim->max, -LIMIT_EXT_MAX, LIMIT_EXT_MAX) ? GET_GVAR(lim->max, -LIMIT_EXT_MAX, LIMIT_EXT_MAX, s_perout_flight_mode)*10 : lim->max+1000)
|
||||
#define LIMIT_MIN(lim) (GV_IS_GV_VALUE(lim->min, -LIMIT_EXT_MAX, LIMIT_EXT_MAX) ? GET_GVAR(lim->min, -LIMIT_EXT_MAX, LIMIT_EXT_MAX, s_perout_flight_mode)*10 : lim->min-1000)
|
||||
#define LIMIT_OFS(lim) (GV_IS_GV_VALUE(lim->offset, -1000, 1000) ? GET_GVAR(lim->offset, -1000, 1000, s_perout_flight_mode)*10 : lim->offset)
|
||||
#define LIMIT_MAX_RESX(lim) calc1000toRESX(LIMIT_MAX(lim))
|
||||
#define LIMIT_MIN_RESX(lim) calc1000toRESX(LIMIT_MIN(lim))
|
||||
#define LIMIT_OFS_RESX(lim) calc1000toRESX(LIMIT_OFS(lim))
|
||||
|
@ -903,26 +916,26 @@ PACK(typedef struct t_CustomFnData { // Function Switches data
|
|||
#define CFN_GVAR_MODE(p) ((p)->all.mode)
|
||||
#define CFN_PARAM(p) ((p)->all.val)
|
||||
#define CFN_RESET(p) ((p)->active=0, (p)->clear.val1=0, (p)->clear.val2=0)
|
||||
#define CFN_GVAR_CST_MAX GVAR_LIMIT
|
||||
#else
|
||||
PACK(typedef struct t_CustomFnData {
|
||||
PACK(union {
|
||||
struct {
|
||||
int8_t swtch:6;
|
||||
PACK(struct {
|
||||
int16_t swtch:6;
|
||||
uint16_t func:4;
|
||||
uint8_t mode:2;
|
||||
uint8_t param:3;
|
||||
uint8_t active:1;
|
||||
} gvar;
|
||||
uint16_t mode:2;
|
||||
uint16_t param:3;
|
||||
uint16_t active:1;
|
||||
}) gvar;
|
||||
|
||||
struct {
|
||||
int8_t swtch:6;
|
||||
PACK(struct {
|
||||
int16_t swtch:6;
|
||||
uint16_t func:4;
|
||||
uint8_t param:4;
|
||||
uint8_t spare:1;
|
||||
uint8_t active:1;
|
||||
} all;
|
||||
uint16_t param:4;
|
||||
uint16_t spare:1;
|
||||
uint16_t active:1;
|
||||
}) all;
|
||||
});
|
||||
|
||||
uint8_t value;
|
||||
}) CustomFnData;
|
||||
#define CFN_SWITCH(p) ((p)->all.swtch)
|
||||
|
@ -936,6 +949,7 @@ PACK(typedef struct t_CustomFnData {
|
|||
#define CFN_GVAR_MODE(p) ((p)->gvar.mode)
|
||||
#define CFN_PARAM(p) ((p)->value)
|
||||
#define CFN_RESET(p) ((p)->all.active = 0, CFN_PARAM(p) = 0)
|
||||
#define CFN_GVAR_CST_MAX 125
|
||||
#endif
|
||||
|
||||
enum TelemetryUnit {
|
||||
|
@ -988,6 +1002,14 @@ PACK(typedef struct t_FrSkyChannelData {
|
|||
enum TelemetrySource {
|
||||
TELEM_NONE,
|
||||
TELEM_TX_VOLTAGE,
|
||||
#if defined(CPUARM)
|
||||
TELEM_TX_TIME,
|
||||
TELEM_RESERVE1,
|
||||
TELEM_RESERVE2,
|
||||
TELEM_RESERVE3,
|
||||
TELEM_RESERVE4,
|
||||
TELEM_RESERVE5,
|
||||
#endif
|
||||
TELEM_TM1,
|
||||
TELEM_TM2,
|
||||
#if defined(CPUARM)
|
||||
|
@ -1026,11 +1048,11 @@ enum TelemetrySource {
|
|||
TELEM_ASPEED,
|
||||
TELEM_DTE,
|
||||
#if defined(CPUARM)
|
||||
TELEM_RESERVE1,
|
||||
TELEM_RESERVE2,
|
||||
TELEM_RESERVE3,
|
||||
TELEM_RESERVE4,
|
||||
TELEM_RESERVE5,
|
||||
TELEM_RESERVE6,
|
||||
TELEM_RESERVE7,
|
||||
TELEM_RESERVE8,
|
||||
TELEM_RESERVE9,
|
||||
TELEM_RESERVE10,
|
||||
#endif
|
||||
TELEM_MIN_A1,
|
||||
TELEM_MIN_A2,
|
||||
|
@ -1052,11 +1074,11 @@ enum TelemetrySource {
|
|||
TELEM_MAX_CURRENT,
|
||||
TELEM_MAX_POWER,
|
||||
#if defined(CPUARM)
|
||||
TELEM_RESERVE6,
|
||||
TELEM_RESERVE7,
|
||||
TELEM_RESERVE8,
|
||||
TELEM_RESERVE9,
|
||||
TELEM_RESERVE10,
|
||||
TELEM_RESERVE11,
|
||||
TELEM_RESERVE12,
|
||||
TELEM_RESERVE13,
|
||||
TELEM_RESERVE14,
|
||||
TELEM_RESERVE15,
|
||||
#endif
|
||||
TELEM_ACC,
|
||||
TELEM_GPS_TIME,
|
||||
|
@ -1232,7 +1254,7 @@ PACK(typedef struct t_SwashRingData { // Swash Ring data
|
|||
#define NUM_ROTARY_ENCODERS_EXTRA 2
|
||||
#define NUM_ROTARY_ENCODERS (2+NUM_ROTARY_ENCODERS_EXTRA)
|
||||
#define ROTARY_ENCODER_ARRAY int16_t rotaryEncoders[2];
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA int16_t rotaryEncodersExtra[MAX_PHASES][NUM_ROTARY_ENCODERS_EXTRA];
|
||||
#define ROTARY_ENCODER_ARRAY_EXTRA int16_t rotaryEncodersExtra[MAX_FLIGHT_MODES][NUM_ROTARY_ENCODERS_EXTRA];
|
||||
#elif defined(CPUM2560) && ROTARY_ENCODERS <= 2
|
||||
#define NUM_ROTARY_ENCODERS_EXTRA 0
|
||||
#define NUM_ROTARY_ENCODERS 2
|
||||
|
@ -1357,8 +1379,8 @@ enum SwitchSources {
|
|||
SWSRC_REb,
|
||||
#endif
|
||||
|
||||
SWSRC_FIRST_CSW,
|
||||
SWSRC_SW1 = SWSRC_FIRST_CSW,
|
||||
SWSRC_FIRST_LOGICAL_SWITCH,
|
||||
SWSRC_SW1 = SWSRC_FIRST_LOGICAL_SWITCH,
|
||||
SWSRC_SW2,
|
||||
SWSRC_SW3,
|
||||
SWSRC_SW4,
|
||||
|
@ -1370,13 +1392,24 @@ enum SwitchSources {
|
|||
SWSRC_SWA,
|
||||
SWSRC_SWB,
|
||||
SWSRC_SWC,
|
||||
SWSRC_LAST_CSW = SWSRC_SW1+NUM_LOGICAL_SWITCH-1,
|
||||
SWSRC_LAST_LOGICAL_SWITCH = SWSRC_FIRST_LOGICAL_SWITCH+NUM_LOGICAL_SWITCH-1,
|
||||
|
||||
SWSRC_ON,
|
||||
|
||||
#if defined(CPUARM)
|
||||
SWSRC_FIRST_FLIGHT_MODE,
|
||||
SWSRC_LAST_FLIGHT_MODE = SWSRC_FIRST_FLIGHT_MODE+MAX_FLIGHT_MODES-1,
|
||||
#endif
|
||||
|
||||
SWSRC_COUNT,
|
||||
|
||||
SWSRC_OFF = -SWSRC_ON,
|
||||
|
||||
SWSRC_FIRST = SWSRC_OFF,
|
||||
SWSRC_LAST = SWSRC_ON
|
||||
SWSRC_LAST = SWSRC_COUNT-1,
|
||||
SWSRC_FIRST = -SWSRC_LAST,
|
||||
|
||||
SWSRC_LAST_SHORT_LIST = SWSRC_LAST_LOGICAL_SWITCH,
|
||||
SWSRC_FIRST_SHORT_LIST = -SWSRC_LAST_SHORT_LIST,
|
||||
};
|
||||
|
||||
enum MixSources {
|
||||
|
@ -1668,7 +1701,7 @@ PACK(typedef struct t_ModelData {
|
|||
LogicalSwitchData customSw[NUM_LOGICAL_SWITCH];
|
||||
CustomFnData funcSw[NUM_CFN];
|
||||
SwashRingData swashR;
|
||||
PhaseData phaseData[MAX_PHASES];
|
||||
PhaseData phaseData[MAX_FLIGHT_MODES];
|
||||
|
||||
AVR_FIELD(int8_t ppmFrameLength) // 0=22.5ms (10ms-30ms) 0.5ms increments
|
||||
uint8_t thrTraceSrc;
|
||||
|
|
|
@ -319,7 +319,8 @@ void per10ms()
|
|||
if (lightOffCounter) lightOffCounter--;
|
||||
if (flashCounter) flashCounter--;
|
||||
if (s_noHi) s_noHi--;
|
||||
if (trimsCheckTimer) trimsCheckTimer --;
|
||||
if (trimsCheckTimer) trimsCheckTimer--;
|
||||
if (ppmInValid) ppmInValid--;
|
||||
|
||||
#if defined(RTCLOCK)
|
||||
/* Update global Date/Time every 100 per10ms cycles */
|
||||
|
@ -765,10 +766,10 @@ int intpol(int x, uint8_t idx) // -100, -75, -50, -25, 0 ,25 ,50, 75, 100
|
|||
#if defined(PCBTARANIS)
|
||||
int applyCurve(int x, CurveRef & curve)
|
||||
{
|
||||
switch(curve.type) {
|
||||
switch (curve.type) {
|
||||
case CURVE_REF_DIFF:
|
||||
{
|
||||
int curveParam = calc100to256(GET_GVAR(curve.value, -100, 100, s_perout_flight_phase));
|
||||
int curveParam = calc100to256(GET_GVAR(curve.value, -100, 100, s_perout_flight_mode));
|
||||
if (curveParam > 0 && x < 0)
|
||||
x = (x * (256 - curveParam)) >> 8;
|
||||
else if (curveParam < 0 && x > 0)
|
||||
|
@ -777,10 +778,10 @@ int applyCurve(int x, CurveRef & curve)
|
|||
}
|
||||
|
||||
case CURVE_REF_EXPO:
|
||||
return expo(x, GET_GVAR(curve.value, -100, 100, s_perout_flight_phase));
|
||||
return expo(x, GET_GVAR(curve.value, -100, 100, s_perout_flight_mode));
|
||||
|
||||
case CURVE_REF_FUNC:
|
||||
switch(curve.value) {
|
||||
switch (curve.value) {
|
||||
case CURVE_X_GT0:
|
||||
if (x < 0) x = 0; //x|x>0
|
||||
return x;
|
||||
|
@ -960,7 +961,12 @@ int expo(int x, int k)
|
|||
|
||||
void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
||||
{
|
||||
#if !defined(PCBTARANIS)
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(HELI)
|
||||
int16_t heliAnasCopy[4];
|
||||
memcpy(heliAnasCopy, heliAnas, sizeof(heliAnasCopy));
|
||||
#endif
|
||||
#else
|
||||
int16_t anas2[NUM_INPUTS]; // values before expo, to ensure same expo base when multiple expo lines are used
|
||||
memcpy(anas2, anas, sizeof(anas2));
|
||||
#endif
|
||||
|
@ -975,7 +981,7 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
|||
if (!EXPO_VALID(ed)) break; // end of list
|
||||
if (ed->chn == cur_chn)
|
||||
continue;
|
||||
if (ed->phases & (1<<s_perout_flight_phase))
|
||||
if (ed->phases & (1<<s_perout_flight_mode))
|
||||
continue;
|
||||
if (getSwitch(ed->swtch)) {
|
||||
#if defined(PCBTARANIS)
|
||||
|
@ -984,9 +990,9 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
|||
v = ovwrValue;
|
||||
#if defined(HELI)
|
||||
else if (ed->srcRaw == MIXSRC_Ele)
|
||||
v = heliAnas[ELE_STICK];
|
||||
v = heliAnasCopy[ELE_STICK];
|
||||
else if (ed->srcRaw == MIXSRC_Ail)
|
||||
v = heliAnas[AIL_STICK];
|
||||
v = heliAnasCopy[AIL_STICK];
|
||||
#endif
|
||||
else {
|
||||
v = getValue(ed->srcRaw);
|
||||
|
@ -1014,18 +1020,18 @@ void applyExpos(int16_t *anas, uint8_t mode APPLY_EXPOS_EXTRA_PARAMS)
|
|||
if (ed->curveMode == MODE_CURVE)
|
||||
v = applyCurve(v, curveParam);
|
||||
else
|
||||
v = expo(v, GET_GVAR(curveParam, -100, 100, s_perout_flight_phase));
|
||||
v = expo(v, GET_GVAR(curveParam, -100, 100, s_perout_flight_mode));
|
||||
}
|
||||
#endif
|
||||
|
||||
//========== WEIGHT ===============
|
||||
int16_t weight = GET_GVAR(ed->weight, MIN_EXPO_WEIGHT, 100, s_perout_flight_phase);
|
||||
int16_t weight = GET_GVAR(ed->weight, MIN_EXPO_WEIGHT, 100, s_perout_flight_mode);
|
||||
weight = calc100to256(weight);
|
||||
v = ((int32_t)v * weight) >> 8;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
//========== OFFSET ===============
|
||||
int16_t offset = GET_GVAR(ed->offset, -100, 100, s_perout_flight_phase);
|
||||
int16_t offset = GET_GVAR(ed->offset, -100, 100, s_perout_flight_mode);
|
||||
if (offset) v += calc100toRESX(offset);
|
||||
|
||||
//========== TRIMS ================
|
||||
|
@ -1262,7 +1268,7 @@ getvalue_t getValue(uint8_t i)
|
|||
return 0;
|
||||
#endif
|
||||
|
||||
else if (i<=MIXSRC_TrimAil) return calc1000toRESX((int16_t)8 * getTrimValue(s_perout_flight_phase, i-MIXSRC_TrimRud));
|
||||
else if (i<=MIXSRC_TrimAil) return calc1000toRESX((int16_t)8 * getTrimValue(s_perout_flight_mode, i-MIXSRC_TrimRud));
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
else if (i==MIXSRC_SA) return (switchState(SW_SA0) ? -1024 : (switchState(SW_SA1) ? 0 : 1024));
|
||||
|
@ -1273,7 +1279,7 @@ getvalue_t getValue(uint8_t i)
|
|||
else if (i==MIXSRC_SF) return (switchState(SW_SF0) ? -1024 : 1024);
|
||||
else if (i==MIXSRC_SG) return (switchState(SW_SG0) ? -1024 : (switchState(SW_SG1) ? 0 : 1024));
|
||||
else if (i==MIXSRC_SH) return (switchState(SW_SH0) ? -1024 : 1024);
|
||||
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_FIRST_CSW+i-MIXSRC_FIRST_LOGICAL_SWITCH) ? 1024 : -1024;
|
||||
else if (i<=MIXSRC_LAST_LOGICAL_SWITCH) return getSwitch(SWSRC_FIRST_LOGICAL_SWITCH+i-MIXSRC_FIRST_LOGICAL_SWITCH) ? 1024 : -1024;
|
||||
#else
|
||||
else if (i==MIXSRC_3POS) return (getSwitch(SW_ID0-SW_BASE+1) ? -1024 : (getSwitch(SW_ID1-SW_BASE+1) ? 0 : 1024));
|
||||
// don't use switchState directly to give getSwitch possibility to hack values if needed for switch warning
|
||||
|
@ -1288,10 +1294,17 @@ getvalue_t getValue(uint8_t i)
|
|||
else if (i<=MIXSRC_LAST_CH) return ex_chans[i-MIXSRC_CH1];
|
||||
|
||||
#if defined(GVARS)
|
||||
else if (i<=MIXSRC_LAST_GVAR) return GVAR_VALUE(i-MIXSRC_GVAR1, getGVarFlightPhase(s_perout_flight_phase, i-MIXSRC_GVAR1));
|
||||
else if (i<=MIXSRC_LAST_GVAR) return GVAR_VALUE(i-MIXSRC_GVAR1, getGVarFlightPhase(s_perout_flight_mode, i-MIXSRC_GVAR1));
|
||||
#endif
|
||||
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_TX_VOLTAGE) return g_vbat100mV;
|
||||
#if defined(CPUARM) && defined(RTCLOCK)
|
||||
else if (i==MIXSRC_FIRST_TELEM-1+TELEM_TX_TIME) {
|
||||
struct gtm t;
|
||||
gettime(&t);
|
||||
return t.tm_hour*60 + t.tm_min;
|
||||
}
|
||||
#endif
|
||||
else if (i<=MIXSRC_FIRST_TELEM-1+TELEM_TM2) return timersStates[i-MIXSRC_FIRST_TELEM+1-TELEM_TM1].val;
|
||||
#if defined(FRSKY)
|
||||
#if defined(CPUARM)
|
||||
|
@ -1507,9 +1520,15 @@ bool getSwitch(int8_t swtch)
|
|||
else if (cs_idx == SWSRC_REb) {
|
||||
result = REB_DOWN();
|
||||
}
|
||||
#endif
|
||||
#if defined(CPUARM) && defined(FLIGHT_MODES)
|
||||
else if (cs_idx >= SWSRC_FIRST_FLIGHT_MODE) {
|
||||
uint8_t idx = cs_idx - SWSRC_FIRST_FLIGHT_MODE;
|
||||
result = (idx == s_perout_flight_mode);
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
cs_idx -= SWSRC_FIRST_CSW;
|
||||
cs_idx -= SWSRC_FIRST_LOGICAL_SWITCH;
|
||||
|
||||
GETSWITCH_RECURSIVE_TYPE mask = ((GETSWITCH_RECURSIVE_TYPE)1 << cs_idx);
|
||||
if (s_last_switch_used & mask) {
|
||||
|
@ -1795,7 +1814,7 @@ int8_t getMovedSource(GET_MOVED_SOURCE_PARAMS)
|
|||
#if defined(FLIGHT_MODES)
|
||||
uint8_t getFlightPhase()
|
||||
{
|
||||
for (uint8_t i=1; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=1; i<MAX_FLIGHT_MODES; i++) {
|
||||
PhaseData *phase = &g_model.phaseData[i];
|
||||
if (phase->swtch && getSwitch(phase->swtch)) {
|
||||
return i;
|
||||
|
@ -1819,7 +1838,7 @@ int getTrimValue(uint8_t phase, uint8_t idx)
|
|||
{
|
||||
#if defined(PCBTARANIS)
|
||||
int result = 0;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
trim_t v = getRawTrimValue(phase, idx);
|
||||
if (v.mode == TRIM_MODE_NONE) {
|
||||
return result;
|
||||
|
@ -1846,7 +1865,7 @@ int getTrimValue(uint8_t phase, uint8_t idx)
|
|||
void setTrimValue(uint8_t phase, uint8_t idx, int trim)
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
trim_t & v = phaseAddress(phase)->trim[idx];
|
||||
if (v.mode == TRIM_MODE_NONE)
|
||||
return;
|
||||
|
@ -1878,7 +1897,7 @@ void setTrimValue(uint8_t phase, uint8_t idx, int trim)
|
|||
#if !defined(PCBTARANIS)
|
||||
uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx)
|
||||
{
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
if (phase == 0) return 0;
|
||||
trim_t trim = getRawTrimValue(phase, idx);
|
||||
if (trim <= TRIM_EXTENDED_MAX) return phase;
|
||||
|
@ -1893,8 +1912,8 @@ uint8_t getTrimFlightPhase(uint8_t phase, uint8_t idx)
|
|||
#if defined(ROTARY_ENCODERS)
|
||||
uint8_t getRotaryEncoderFlightPhase(uint8_t idx)
|
||||
{
|
||||
uint8_t phase = s_perout_flight_phase;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
uint8_t phase = s_perout_flight_mode;
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
if (phase == 0) return 0;
|
||||
#if ROTARY_ENCODERS > 2
|
||||
int16_t value;
|
||||
|
@ -1984,7 +2003,7 @@ uint8_t s_gvar_last = 0;
|
|||
|
||||
uint8_t getGVarFlightPhase(uint8_t phase, uint8_t idx)
|
||||
{
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
if (phase == 0) return 0;
|
||||
int16_t val = GVAR_VALUE(idx, phase); // TODO phase at the end everywhere to be consistent!
|
||||
if (val <= GVAR_MAX) return phase;
|
||||
|
@ -2028,6 +2047,7 @@ ls_telemetry_value_t minTelemValue(uint8_t channel)
|
|||
switch (channel) {
|
||||
case TELEM_FUEL:
|
||||
#if defined(CPUARM)
|
||||
case TELEM_TX_TIME:
|
||||
case TELEM_SWR:
|
||||
#endif
|
||||
case TELEM_RSSI_TX:
|
||||
|
@ -2048,6 +2068,10 @@ ls_telemetry_value_t minTelemValue(uint8_t channel)
|
|||
ls_telemetry_value_t maxTelemValue(uint8_t channel)
|
||||
{
|
||||
switch (channel) {
|
||||
#if defined(CPUARM)
|
||||
case TELEM_TX_TIME:
|
||||
return 24*60-1;
|
||||
#endif
|
||||
case TELEM_FUEL:
|
||||
#if defined(CPUARM)
|
||||
case TELEM_SWR:
|
||||
|
@ -2139,7 +2163,7 @@ getvalue_t convert8bitsTelemValue(uint8_t channel, ls_telemetry_value_t value)
|
|||
result = value * 5;
|
||||
break;
|
||||
case TELEM_CONSUMPTION:
|
||||
result = value * 20;
|
||||
result = value * 100;
|
||||
break;
|
||||
case TELEM_VSPEED:
|
||||
result = ((getvalue_t)value - 125) * 10;
|
||||
|
@ -2685,13 +2709,13 @@ uint8_t checkTrim(uint8_t event)
|
|||
#if defined(PCBSTD)
|
||||
phase = 0;
|
||||
#else
|
||||
phase = getGVarFlightPhase(s_perout_flight_phase, trimGvar[idx]);
|
||||
phase = getGVarFlightPhase(s_perout_flight_mode, trimGvar[idx]);
|
||||
#endif
|
||||
before = GVAR_VALUE(trimGvar[idx], phase);
|
||||
thro = false;
|
||||
}
|
||||
else {
|
||||
phase = getTrimFlightPhase(s_perout_flight_phase, idx);
|
||||
phase = getTrimFlightPhase(s_perout_flight_mode, idx);
|
||||
#if defined(PCBTARANIS)
|
||||
before = getTrimValue(phase, idx);
|
||||
#else
|
||||
|
@ -2700,7 +2724,7 @@ uint8_t checkTrim(uint8_t event)
|
|||
thro = (idx==THR_STICK && g_model.thrTrim);
|
||||
}
|
||||
#else
|
||||
phase = getTrimFlightPhase(s_perout_flight_phase, idx);
|
||||
phase = getTrimFlightPhase(s_perout_flight_mode, idx);
|
||||
#if defined(PCBTARANIS)
|
||||
before = getTrimValue(phase, idx);
|
||||
#else
|
||||
|
@ -2827,8 +2851,13 @@ uint16_t anaIn(uint8_t chan)
|
|||
return *p;
|
||||
#else
|
||||
static const pm_char crossAna[] PROGMEM = {3,1,2,0,4,5,6,7};
|
||||
volatile uint16_t *p = &s_anaFilt[pgm_read_byte(crossAna+chan)];
|
||||
return *p;
|
||||
uint16_t temp = s_anaFilt[pgm_read_byte(crossAna+chan)];
|
||||
#if defined(FRSKY_STICKS)
|
||||
if (chan < NUM_STICKS && (g_eeGeneral.stickReverse & (1 << chan))) {
|
||||
temp = 2048 - temp;
|
||||
}
|
||||
#endif
|
||||
return temp;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -3057,7 +3086,7 @@ uint16_t isqrt32(uint32_t n)
|
|||
uint16_t c = 0x8000;
|
||||
uint16_t g = 0x8000;
|
||||
|
||||
for(;;) {
|
||||
for (;;) {
|
||||
if ((uint32_t)g*g > n)
|
||||
g ^= c;
|
||||
c >>= 1;
|
||||
|
@ -3070,7 +3099,7 @@ uint16_t isqrt32(uint32_t n)
|
|||
|
||||
FORCEINLINE void evalTrims()
|
||||
{
|
||||
uint8_t phase = s_perout_flight_phase;
|
||||
uint8_t phase = s_perout_flight_mode;
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
// do trim -> throttle trim if applicable
|
||||
int16_t trim = getTrimValue(phase, i);
|
||||
|
@ -3186,7 +3215,7 @@ void evalInputs(uint8_t mode)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (mode <= e_perout_mode_inactive_phase && isFunctionActive(FUNCTION_TRAINER+ch)) {
|
||||
if (mode <= e_perout_mode_inactive_phase && isFunctionActive(FUNCTION_TRAINER+ch) && ppmInValid) {
|
||||
// trainer mode
|
||||
TrainerMix* td = &g_eeGeneral.trainer.mix[ch];
|
||||
if (td->mode) {
|
||||
|
@ -3260,12 +3289,17 @@ PLAY_FUNCTION(playValue, uint8_t idx)
|
|||
getvalue_t val = getValue(idx);
|
||||
|
||||
switch (idx) {
|
||||
#if defined(CPUARM)
|
||||
case MIXSRC_FIRST_TELEM+TELEM_TX_TIME-1:
|
||||
PLAY_DURATION(val*60, PLAY_TIME);
|
||||
break;
|
||||
#endif
|
||||
case MIXSRC_FIRST_TELEM+TELEM_TX_VOLTAGE-1:
|
||||
PLAY_NUMBER(val, 1+UNIT_VOLTS, PREC1);
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM+TELEM_TM1-1:
|
||||
case MIXSRC_FIRST_TELEM+TELEM_TM2-1:
|
||||
PLAY_DURATION(val);
|
||||
PLAY_DURATION(val, 0);
|
||||
break;
|
||||
#if defined(CPUARM)
|
||||
case MIXSRC_FIRST_TELEM+TELEM_SWR-1:
|
||||
|
@ -3520,14 +3554,14 @@ void evalFunctions()
|
|||
#if defined(GVARS)
|
||||
case FUNC_ADJUST_GVAR:
|
||||
if (CFN_GVAR_MODE(sd) == 0) {
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), CFN_PARAM(sd), s_perout_flight_phase);
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), CFN_PARAM(sd), s_perout_flight_mode);
|
||||
}
|
||||
else if (CFN_GVAR_MODE(sd) == 2) {
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_PARAM(sd), s_perout_flight_phase), s_perout_flight_phase);
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_PARAM(sd), s_perout_flight_mode), s_perout_flight_mode);
|
||||
}
|
||||
else if (CFN_GVAR_MODE(sd) == 3) {
|
||||
if (!(activeFnSwitches & switch_mask)) {
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_GVAR_INDEX(sd), getGVarFlightPhase(s_perout_flight_phase, CFN_GVAR_INDEX(sd))) + (CFN_PARAM(sd) ? +1 : -1), s_perout_flight_phase);
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_GVAR_INDEX(sd), getGVarFlightPhase(s_perout_flight_mode, CFN_GVAR_INDEX(sd))) + (CFN_PARAM(sd) ? +1 : -1), s_perout_flight_mode);
|
||||
}
|
||||
}
|
||||
else if (CFN_PARAM(sd) >= MIXSRC_TrimRud && CFN_PARAM(sd) <= MIXSRC_TrimAil) {
|
||||
|
@ -3537,12 +3571,12 @@ void evalFunctions()
|
|||
else if (CFN_PARAM(sd) >= MIXSRC_REa && CFN_PARAM(sd) < MIXSRC_TrimRud) {
|
||||
int8_t scroll = rePreviousValues[CFN_PARAM(sd)-MIXSRC_REa] - (g_rotenc[CFN_PARAM(sd)-MIXSRC_REa] / ROTARY_ENCODER_GRANULARITY);
|
||||
if (scroll) {
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_GVAR_INDEX(sd), getGVarFlightPhase(s_perout_flight_phase, CFN_GVAR_INDEX(sd))) + scroll, s_perout_flight_phase);
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), GVAR_VALUE(CFN_GVAR_INDEX(sd), getGVarFlightPhase(s_perout_flight_mode, CFN_GVAR_INDEX(sd))) + scroll, s_perout_flight_mode);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), limit((getvalue_t)-LIMIT_EXT_MAX, getValue(CFN_PARAM(sd)), (getvalue_t)LIMIT_EXT_MAX) / 10, s_perout_flight_phase);
|
||||
SET_GVAR(CFN_GVAR_INDEX(sd), limit((getvalue_t)-LIMIT_EXT_MAX, getValue(CFN_PARAM(sd)), (getvalue_t)LIMIT_EXT_MAX) / 10, s_perout_flight_mode);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
@ -3625,7 +3659,7 @@ void evalFunctions()
|
|||
else {
|
||||
#if defined(GVARS)
|
||||
if (CFN_FUNC(sd) == FUNC_PLAY_TRACK && param > 250)
|
||||
param = GVAR_VALUE(param-251, getGVarFlightPhase(s_perout_flight_phase, param-251));
|
||||
param = GVAR_VALUE(param-251, getGVarFlightPhase(s_perout_flight_mode, param-251));
|
||||
#endif
|
||||
PUSH_CUSTOM_PROMPT(active ? param : param+1, i+1);
|
||||
}
|
||||
|
@ -3706,7 +3740,7 @@ void evalFunctions()
|
|||
#define HELI_ANAS_ARRAY anas
|
||||
#endif
|
||||
|
||||
uint8_t s_perout_flight_phase;
|
||||
uint8_t s_perout_flight_mode;
|
||||
void perOut(uint8_t mode, uint8_t tick10ms)
|
||||
{
|
||||
evalInputs(mode);
|
||||
|
@ -3811,7 +3845,11 @@ void perOut(uint8_t mode, uint8_t tick10ms)
|
|||
|
||||
//========== PHASE && SWITCH =====
|
||||
bool mixCondition = (md->phases != 0 || md->swtch);
|
||||
delayval_t mixEnabled = !(md->phases & (1 << s_perout_flight_phase)) && getSwitch(md->swtch);
|
||||
delayval_t mixEnabled = !(md->phases & (1 << s_perout_flight_mode)) && getSwitch(md->swtch);
|
||||
|
||||
if (mixEnabled && md->srcRaw >= MIXSRC_FIRST_TRAINER && md->srcRaw <= MIXSRC_LAST_TRAINER && !ppmInValid) {
|
||||
mixEnabled = 0;
|
||||
}
|
||||
|
||||
//========== VALUE ===============
|
||||
getvalue_t v = 0;
|
||||
|
@ -3896,14 +3934,14 @@ void perOut(uint8_t mode, uint8_t tick10ms)
|
|||
if (apply_offset_and_curve) {
|
||||
#if !defined(PCBTARANIS) // OFFSET is now applied AFTER weight on Taranis
|
||||
//========== OFFSET / SOURCE ===============
|
||||
int16_t offset = GET_GVAR(MD_OFFSET(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_perout_flight_phase);
|
||||
int16_t offset = GET_GVAR(MD_OFFSET(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_perout_flight_mode);
|
||||
if (offset) v += calc100toRESX_16Bits(offset);
|
||||
#endif
|
||||
|
||||
//========== TRIMS ================
|
||||
if (!(mode & e_perout_mode_notrims)) {
|
||||
#if defined(PCBTARANIS)
|
||||
if (!md->carryTrim) {
|
||||
if (md->carryTrim == 0) {
|
||||
int8_t mix_trim;
|
||||
if (stickIndex < NUM_STICKS)
|
||||
mix_trim = stickIndex;
|
||||
|
@ -3911,7 +3949,13 @@ void perOut(uint8_t mode, uint8_t tick10ms)
|
|||
mix_trim = virtualInputsTrims[md->srcRaw-1];
|
||||
else
|
||||
mix_trim = -1;
|
||||
if (mix_trim >= 0) v += trims[mix_trim];
|
||||
if (mix_trim >= 0) {
|
||||
int16_t trim = trims[mix_trim];
|
||||
if (mix_trim == THR_STICK && g_model.throttleReversed)
|
||||
v -= trim;
|
||||
else
|
||||
v += trim;
|
||||
}
|
||||
}
|
||||
#else
|
||||
int8_t mix_trim = md->carryTrim;
|
||||
|
@ -3921,13 +3965,19 @@ void perOut(uint8_t mode, uint8_t tick10ms)
|
|||
mix_trim = stickIndex;
|
||||
else
|
||||
mix_trim = -1;
|
||||
if (mix_trim >= 0) v += trims[mix_trim];
|
||||
if (mix_trim >= 0) {
|
||||
int16_t trim = trims[mix_trim];
|
||||
if (mix_trim == THR_STICK && g_model.throttleReversed)
|
||||
v -= trim;
|
||||
else
|
||||
v += trim;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
// saves 12 bytes code if done here and not together with weight; unknown reason
|
||||
int16_t weight = GET_GVAR(MD_WEIGHT(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_perout_flight_phase);
|
||||
int16_t weight = GET_GVAR(MD_WEIGHT(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_perout_flight_mode);
|
||||
weight = calc100to256_16Bits(weight);
|
||||
|
||||
//========== SPEED ===============
|
||||
|
@ -3973,8 +4023,7 @@ void perOut(uint8_t mode, uint8_t tick10ms)
|
|||
|
||||
//========== CURVES ===============
|
||||
#if defined(PCBTARANIS)
|
||||
// TODO something cleaner ...
|
||||
if (apply_offset_and_curve && md->curve.value) {
|
||||
if (apply_offset_and_curve && md->curve.type != CURVE_REF_DIFF && md->curve.value) {
|
||||
v = applyCurve(v, md->curve);
|
||||
}
|
||||
#else
|
||||
|
@ -3989,16 +4038,20 @@ void perOut(uint8_t mode, uint8_t tick10ms)
|
|||
//========== OFFSET / AFTER ===============
|
||||
#if defined(PCBTARANIS)
|
||||
if (apply_offset_and_curve) {
|
||||
int16_t offset = GET_GVAR(MD_OFFSET(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_perout_flight_phase);
|
||||
int16_t offset = GET_GVAR(MD_OFFSET(md), GV_RANGELARGE_NEG, GV_RANGELARGE, s_perout_flight_mode);
|
||||
if (offset) dv += calc100toRESX_16Bits(offset) << 8;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(PCBTARANIS) // TODO move before WEIGHT for readability
|
||||
//========== DIFFERENTIAL =========
|
||||
#if defined(PCBTARANIS)
|
||||
if (md->curve.type == CURVE_REF_DIFF && md->curve.value) {
|
||||
dv = applyCurve(dv, md->curve);
|
||||
}
|
||||
#else
|
||||
if (md->curveMode == MODE_DIFFERENTIAL) {
|
||||
// @@@2 also recalculate curveParam to a 256 basis which ease the calculation later a lot
|
||||
int16_t curveParam = calc100to256(GET_GVAR(md->curveParam, -100, 100, s_perout_flight_phase));
|
||||
int16_t curveParam = calc100to256(GET_GVAR(md->curveParam, -100, 100, s_perout_flight_mode));
|
||||
if (curveParam > 0 && dv < 0)
|
||||
dv = (dv * (256 - curveParam)) >> 8;
|
||||
else if (curveParam < 0 && dv > 0)
|
||||
|
@ -4127,7 +4180,7 @@ void doMixerCalculations()
|
|||
#endif
|
||||
|
||||
#define MAX_ACT 0xffff
|
||||
static uint16_t fp_act[MAX_PHASES] = {0};
|
||||
static uint16_t fp_act[MAX_FLIGHT_MODES] = {0};
|
||||
static uint16_t delta = 0;
|
||||
static ACTIVE_PHASES_TYPE s_fade_flight_phases = 0;
|
||||
static uint8_t s_last_phase = 255; // TODO reinit everything here when the model changes, no???
|
||||
|
@ -4162,10 +4215,10 @@ void doMixerCalculations()
|
|||
int32_t weight = 0;
|
||||
if (s_fade_flight_phases) {
|
||||
memclear(sum_chans512, sizeof(sum_chans512));
|
||||
for (uint8_t p=0; p<MAX_PHASES; p++) {
|
||||
for (uint8_t p=0; p<MAX_FLIGHT_MODES; p++) {
|
||||
s_last_switch_used = 0;
|
||||
if (s_fade_flight_phases & ((ACTIVE_PHASES_TYPE)1 << p)) {
|
||||
s_perout_flight_phase = p;
|
||||
s_perout_flight_mode = p;
|
||||
perOut(p==phase ? e_perout_mode_normal : e_perout_mode_inactive_phase, p==phase ? tick10ms : 0);
|
||||
for (uint8_t i=0; i<NUM_CHNOUT; i++)
|
||||
sum_chans512[i] += (chans[i] >> 4) * fp_act[p];
|
||||
|
@ -4174,10 +4227,10 @@ void doMixerCalculations()
|
|||
s_last_switch_used = 0;
|
||||
}
|
||||
assert(weight);
|
||||
s_perout_flight_phase = phase;
|
||||
s_perout_flight_mode = phase;
|
||||
}
|
||||
else {
|
||||
s_perout_flight_phase = phase;
|
||||
s_perout_flight_mode = phase;
|
||||
perOut(e_perout_mode_normal, tick10ms);
|
||||
}
|
||||
|
||||
|
@ -4509,7 +4562,7 @@ void doMixerCalculations()
|
|||
|
||||
if (s_fade_flight_phases) {
|
||||
uint16_t tick_delta = delta * tick10ms;
|
||||
for (uint8_t p=0; p<MAX_PHASES; p++) {
|
||||
for (uint8_t p=0; p<MAX_FLIGHT_MODES; p++) {
|
||||
ACTIVE_PHASES_TYPE phaseMask = ((ACTIVE_PHASES_TYPE)1 << p);
|
||||
if (s_fade_flight_phases & phaseMask) {
|
||||
if (p == phase) {
|
||||
|
@ -5033,6 +5086,7 @@ void perMain()
|
|||
|
||||
int16_t g_ppmIns[NUM_TRAINER];
|
||||
uint8_t ppmInState = 0; // 0=unsync 1..8= wait for value i-1
|
||||
uint8_t ppmInValid = 0;
|
||||
|
||||
#if !defined(SIMU) && !defined(CPUARM)
|
||||
|
||||
|
@ -5119,21 +5173,20 @@ ISR(TIMER3_CAPT_vect) // G: High frequency noise can cause stack overflo with IS
|
|||
|
||||
// G: We process g_ppmIns immediately here, to make servo movement as smooth as possible
|
||||
// while under trainee control
|
||||
if (val>4000 && val < 16000) // G: Prioritize reset pulse. (Needed when less than 8 incoming pulses)
|
||||
if (val>4000 && val < 16000) { // G: Prioritize reset pulse. (Needed when less than 8 incoming pulses)
|
||||
ppmInState = 1; // triggered
|
||||
else
|
||||
{
|
||||
if (ppmInState && ppmInState<=8)
|
||||
{
|
||||
if (val>800 && val<2200) // if valid pulse-width range
|
||||
{
|
||||
g_ppmIns[ppmInState++ - 1] =
|
||||
(int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
}
|
||||
else
|
||||
else {
|
||||
if (ppmInState>0 && ppmInState<=8) {
|
||||
if (val>800 && val<2200) { // if valid pulse-width range
|
||||
ppmInValid = 100;
|
||||
g_ppmIns[ppmInState++ - 1] = (int16_t)(val - 1500) * (uint8_t)(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
}
|
||||
else {
|
||||
ppmInState = 0; // not triggered
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastCapt = capture;
|
||||
|
||||
|
@ -5202,7 +5255,7 @@ void instantTrim()
|
|||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
if (i!=THR_STICK) {
|
||||
// don't instant trim the throttle stick
|
||||
uint8_t trim_phase = getTrimFlightPhase(s_perout_flight_phase, i);
|
||||
uint8_t trim_phase = getTrimFlightPhase(s_perout_flight_mode, i);
|
||||
#if defined(PCBTARANIS)
|
||||
int16_t trim = limit<int16_t>(TRIM_EXTENDED_MIN, (calibratedStick[i] + trims[i]) / 2, TRIM_EXTENDED_MAX);
|
||||
#else
|
||||
|
@ -5266,8 +5319,8 @@ void moveTrimsToOffsets() // copy state of 3 primary to subtrim
|
|||
// reset all trims, except throttle (if throttle trim)
|
||||
for (uint8_t i=0; i<NUM_STICKS; i++) {
|
||||
if (i!=THR_STICK || !g_model.thrTrim) {
|
||||
int16_t original_trim = getTrimValue(s_perout_flight_phase, i);
|
||||
for (uint8_t phase=0; phase<MAX_PHASES; phase++) {
|
||||
int16_t original_trim = getTrimValue(s_perout_flight_mode, i);
|
||||
for (uint8_t phase=0; phase<MAX_FLIGHT_MODES; phase++) {
|
||||
#if defined(PCBTARANIS)
|
||||
trim_t trim = getRawTrimValue(phase, i);
|
||||
if (trim.mode / 2 == phase)
|
||||
|
|
|
@ -653,7 +653,7 @@ enum StartupWarningStates {
|
|||
#define FORCE_INDIRECT(ptr) __asm__ __volatile__ ("" : "=e" (ptr) : "0" (ptr))
|
||||
#endif
|
||||
|
||||
extern uint8_t s_perout_flight_phase;
|
||||
extern uint8_t s_perout_flight_mode;
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define bitfield_channels_t uint32_t
|
||||
|
@ -1019,6 +1019,7 @@ extern uint8_t g_beepCnt;
|
|||
extern uint8_t g_beepVal[5];
|
||||
|
||||
extern uint8_t ppmInState; //0=unsync 1..8= wait for value i-1
|
||||
extern uint8_t ppmInValid;
|
||||
extern int16_t g_ppmIns[NUM_TRAINER];
|
||||
extern int32_t chans[NUM_CHNOUT];
|
||||
extern int16_t ex_chans[NUM_CHNOUT]; // Outputs (before LIMITS) of the last perMain
|
||||
|
|
|
@ -47,7 +47,10 @@ extern bool isPlaying();
|
|||
#define PUSH_NUMBER_PROMPT(p) pushPrompt(PROMPT_I18N_BASE+(p))
|
||||
#define PUSH_SYSTEM_PROMPT(p) pushPrompt(PROMPT_SYSTEM_BASE+(p))
|
||||
#define PLAY_NUMBER(n, u, a) playNumber((n), (u), (a))
|
||||
#define PLAY_DURATION(d) playDuration((d))
|
||||
#define PLAY_DURATION(d, att) playDuration((d))
|
||||
#define PLAY_DURATION_ATT
|
||||
#define PLAY_TIME
|
||||
#define IS_PLAY_TIME() (0)
|
||||
#define IS_PLAYING(id) isPlaying()
|
||||
#define PLAY_VALUE(v, id) playValue((v))
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
volatile uint16_t Analog_values[NUMBER_ANALOG];
|
||||
|
||||
#if defined(TARANIS_STICKS)
|
||||
#if defined(FRSKY_STICKS)
|
||||
const char ana_direction[NUMBER_ANALOG] = {1, 1, 0, 1 ,0 ,1 ,0, 0, 0};
|
||||
#endif
|
||||
|
||||
|
@ -118,12 +118,12 @@ void adcRead()
|
|||
}
|
||||
|
||||
// adc direction correct
|
||||
#if defined(TARANIS_STICKS)
|
||||
#if defined(FRSKY_STICKS)
|
||||
uint32_t i ;
|
||||
for (i=0; i<NUMBER_ANALOG; i++) {
|
||||
if (ana_direction[i]) {
|
||||
Analog_values[i] = 4096-Analog_values[i];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -314,17 +314,16 @@ extern "C" void TC3_IRQHandler() //capture ppm in at 2MHz
|
|||
ppmInState = 1; // triggered
|
||||
}
|
||||
else {
|
||||
if (ppmInState && ppmInState<=16)
|
||||
{
|
||||
if (val>800 && val<2200) // if valid pulse-width range
|
||||
{
|
||||
g_ppmIns[ppmInState++ - 1] =
|
||||
(int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
if (ppmInState>0 && ppmInState<=16) {
|
||||
if (val>800 && val<2200) { // if valid pulse-width range
|
||||
ppmInValid = 100;
|
||||
g_ppmIns[ppmInState++ - 1] = (int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
}
|
||||
else
|
||||
else {
|
||||
ppmInState = 0; // not triggered
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lastCapt = capture;
|
||||
}
|
||||
|
|
|
@ -134,6 +134,9 @@ inline bool isPlaying()
|
|||
#define PUSH_NUMBER_PROMPT(p) pushNumberPrompt((p))
|
||||
#define PUSH_SYSTEM_PROMPT(p) pushNumberPrompt(PROMPT_SYSTEM_BASE-PROMPT_I18N_BASE+(p))
|
||||
#define PLAY_NUMBER(n, u, a) playNumber((n), (u), (a))
|
||||
#define PLAY_DURATION(d) playDuration((d))
|
||||
#define PLAY_DURATION(d, att) playDuration((d))
|
||||
#define PLAY_DURATION_ATT
|
||||
#define PLAY_TIME
|
||||
#define IS_PLAY_TIME() (0)
|
||||
#define IS_PLAYING(id) (0) /* isPlaying() */
|
||||
#define PLAY_VALUE(v, id) playValue((v))
|
||||
|
|
|
@ -126,12 +126,13 @@ extern "C" void TIM3_IRQHandler()
|
|||
|
||||
// We process g_ppmInsright here to make servo movement as smooth as possible
|
||||
// while under trainee control
|
||||
if ((val>4000) && (val < 19000)) { // G: Prioritize reset pulse. (Needed when less than 16 incoming pulses)
|
||||
if (val>4000 && val<19000) { // G: Prioritize reset pulse. (Needed when less than 16 incoming pulses)
|
||||
ppmInState = 1; // triggered
|
||||
}
|
||||
else {
|
||||
if (ppmInState && (ppmInState<=16)) {
|
||||
if ((val>800) && (val<2200)) {
|
||||
if (ppmInState>0 && ppmInState<=16) {
|
||||
if (val>800 && val<2200) {
|
||||
ppmInValid = 100;
|
||||
g_ppmIns[ppmInState++ - 1] = (int16_t)(val - 1500)*(g_eeGeneral.PPM_Multiplier+10)/10; //+-500 != 512, but close enough.
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -554,12 +554,12 @@ void menuTelemetryNMEA2(uint8_t event)
|
|||
ignore_break=0;
|
||||
break;}
|
||||
|
||||
if (!home_alt) // umschalten zwischen absoluter und relativer Höhe
|
||||
if (!home_alt) // umschalten zwischen absoluter und relativer H<EFBFBD>he
|
||||
home_alt = save_alt;
|
||||
else
|
||||
home_alt=0;
|
||||
|
||||
if (save_alt==0) // wenn noch keine Home Höhe gesetzt war, wird sie es jetzt, weil sonst
|
||||
if (save_alt==0) // wenn noch keine Home H<EFBFBD>he gesetzt war, wird sie es jetzt, weil sonst
|
||||
// das Umschalten keine Wirkung zeigt
|
||||
save_alt = home_alt = abs_alt; // absolute altitude
|
||||
AUDIO_MENUS(); // short blip for non negative lift
|
||||
|
@ -567,11 +567,11 @@ void menuTelemetryNMEA2(uint8_t event)
|
|||
|
||||
case EVT_KEY_LONG(KEY_MENU):
|
||||
ignore_break = 1;
|
||||
save_alt = home_alt = abs_alt; // Home altitude auf aktuelle absolute Höhe setzen
|
||||
save_alt = home_alt = abs_alt; // Home altitude auf aktuelle absolute H<EFBFBD>he setzen
|
||||
AUDIO_MENUS(); // short blip for non negative lift
|
||||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_EXIT): // Max Altitude auf 0 zurücksetzen
|
||||
case EVT_KEY_LONG(KEY_EXIT): // Max Altitude auf 0 zur<EFBFBD>cksetzen
|
||||
max_alt=0;
|
||||
AUDIO_MENUS(); // short blip for non negative lift
|
||||
break;
|
||||
|
|
|
@ -626,19 +626,19 @@ extern const pm_char STR_BLCOLOR[];
|
|||
struct LanguagePack {
|
||||
const char *id;
|
||||
const char *name;
|
||||
void (*playNumber)(getvalue_t number, uint8_t unit, uint8_t att, uint8_t id);
|
||||
void (*playDuration)(int16_t seconds, uint8_t id);
|
||||
void (*playNumber)(getvalue_t number, uint8_t unit, uint8_t flags, uint8_t id);
|
||||
void (*playDuration)(int seconds, uint8_t flags, uint8_t id);
|
||||
};
|
||||
extern LanguagePack * languagePacks[];
|
||||
extern LanguagePack * currentLanguagePack;
|
||||
extern uint8_t currentLanguagePackIdx;
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name) LanguagePack lng ## LanguagePack = { #lng, name, lng ## _ ## playNumber, lng ## _ ## playDuration }
|
||||
#define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name) LANGUAGE_PACK_DECLARE(lng, name); LanguagePack * currentLanguagePack = & lng ## LanguagePack; uint8_t currentLanguagePackIdx
|
||||
inline PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att) { currentLanguagePack->playNumber(number, unit, att, id); }
|
||||
inline PLAY_FUNCTION(playDuration, int16_t seconds) { currentLanguagePack->playDuration(seconds, id); }
|
||||
inline PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t flags) { currentLanguagePack->playNumber(number, unit, flags, id); }
|
||||
inline PLAY_FUNCTION(playDuration, int seconds, uint8_t flags) { currentLanguagePack->playDuration(seconds, flags, id); }
|
||||
#elif defined(VOICE)
|
||||
PLAY_FUNCTION(playNumber, getvalue_t number, uint8_t unit, uint8_t att);
|
||||
PLAY_FUNCTION(playDuration, int16_t seconds);
|
||||
PLAY_FUNCTION(playDuration, int seconds);
|
||||
#define LANGUAGE_PACK_DECLARE(lng, name)
|
||||
#define LANGUAGE_PACK_DECLARE_DEFAULT(lng, name)
|
||||
#else
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,7 @@
|
|||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Bat\0""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Bat\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +403,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
@ -418,7 +420,7 @@
|
|||
#define TR_VSRCRAW "---\0""Směr""Výšk""Plyn""Křid" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmS" "TrmV" "TrmP" "TrmK" TR_SW_VSRCRAW
|
||||
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "VYP""ABS""THs""TH%""THt"
|
||||
#define TR_VTMRMODES "VYP""ABS""PL>""PL%""PL*"
|
||||
|
||||
#define LEN_VTRAINERMODES "\006"
|
||||
#define TR_VTRAINERMODES "Učitel""Žák\0 "
|
||||
|
@ -449,7 +451,7 @@
|
|||
#define TR_POPUPS TR_ENTER"\010[EXIT]"
|
||||
#define OFS_EXIT sizeof(TR_ENTER)
|
||||
|
||||
#define TR_MENUWHENDONE CENTER "\007"TR_ENTER" > DALŠÍ"
|
||||
#define TR_MENUWHENDONE CENTER "\011"TR_ENTER" > DALŠÍ"
|
||||
#define TR_FREE TR("volné:", "volných")
|
||||
#define TR_DELETEMODEL "SMAZAT MODEL"
|
||||
#define TR_COPYINGMODEL "Kopíruji model.."
|
||||
|
@ -470,7 +472,7 @@
|
|||
#define TR_ELIMITS TR("Limit +25%", "Kanál +/- 125%")
|
||||
#define TR_ETRIMS TR("širší Trim", "Široký trim")
|
||||
#define TR_TRIMINC TR("Krok Trimu", "Krok trimu")
|
||||
#define TR_TTRACE TR("TH stopek", INDENT "Stopa TH stopek")
|
||||
#define TR_TTRACE TR("PL stopek", INDENT "Stopa PL stopek")
|
||||
#define TR_TTRIM TR("TrimPlynVol.", INDENT "Trim jen volnoběh")
|
||||
#define TR_BEEPCTR "Středy \221\222"
|
||||
#define TR_PROTO INDENT "Protokol"
|
||||
|
@ -481,7 +483,7 @@
|
|||
#define TR_FADEIN "Přechod Zap"
|
||||
#define TR_FADEOUT "Přechod Vyp"
|
||||
#define TR_DEFAULT "(výchozí)"
|
||||
#define TR_CHECKTRIMS "\006Kont.\012Trimy"
|
||||
#define TR_CHECKTRIMS "\011Kont.\010Trimy"
|
||||
#define OFS_CHECKTRIMS (9*FW)
|
||||
#define TR_SWASHTYPE "Typ cykliky"
|
||||
#define TR_COLLECTIVE "Kolektiv"
|
||||
|
@ -557,9 +559,9 @@
|
|||
#define TR_CAL "Kal."
|
||||
#define TR_VTRIM "Trim- +"
|
||||
#define TR_BG "BG:"
|
||||
#define TR_MENUTOSTART CENTER "\010" TR_ENTER " = START"
|
||||
#define TR_SETMIDPOINT TR(CENTER "\003Nastav páky na střed", CENTER "\004Nastav páky na střed")
|
||||
#define TR_MOVESTICKSPOTS TR(CENTER "\005Hýbej pákami/poty", "\010Hýbej pákami i potenciometry")
|
||||
#define TR_MENUTOSTART CENTER "\011" TR_ENTER " = START"
|
||||
#define TR_SETMIDPOINT CENTER "\004Nastav páky na střed"
|
||||
#define TR_MOVESTICKSPOTS TR(CENTER "\006Hýbej pákami/poty", "\014Hýbej pákami i potenciometry")
|
||||
#define TR_RXBATT "Rx Bat.:"
|
||||
#define TR_TXnRX "Tx:\0Rx:"
|
||||
#define OFS_RX 4
|
||||
|
@ -587,12 +589,12 @@
|
|||
#define TR_MIX "MIX"
|
||||
#define TR_EEPROMLOWMEM "Dochází EEPROM"
|
||||
#define TR_ALERT "\006 POZOR"
|
||||
#define TR_PRESSANYKEYTOSKIP "Klávesa >>> přeskočit"
|
||||
#define TR_THROTTLENOTIDLE TR("Páka plynu je pohnutá", "Páka plynu není na nule")
|
||||
#define TR_PRESSANYKEYTOSKIP TR("\003Klávesa >>> přeskočit", "Klávesa >>> přeskočit")
|
||||
#define TR_THROTTLENOTIDLE TR("\003Páka plynu je pohnutá", "Páka plynu není na nule")
|
||||
#define TR_ALARMSDISABLED "Alarmy jsou zakázány"
|
||||
#define TR_PRESSANYKEY "\006Stiskni klávesu"
|
||||
#define TR_BADEEPROMDATA "\006Chyba dat EEPROM"
|
||||
#define TR_EEPROMFORMATTING "\004Formatování EEPROM"
|
||||
#define TR_PRESSANYKEY TR("\006Stiskni klávesu", "Stiskni klávesu")
|
||||
#define TR_BADEEPROMDATA TR("\006Chyba dat EEPROM", "Chyba dat EEPROM")
|
||||
#define TR_EEPROMFORMATTING TR("\004Formatování EEPROM", "Formatování EEPROM")
|
||||
#define TR_EEPROMOVERFLOW "Přetekla EEPROM"
|
||||
#define TR_MENURADIOSETUP "NASTAVENÍ RÁDIA"
|
||||
#define TR_MENUDATEANDTIME "DATUM A čAS"
|
||||
|
@ -601,7 +603,7 @@
|
|||
#define TR_MENUDIAG "DIAG"
|
||||
#define TR_MENUANA "ANALOGY"
|
||||
#define TR_MENUCALIBRATION "KALIBRACE"
|
||||
#define TR_TRIMS2OFFSETS "\004Trimy => Subtrimy"
|
||||
#define TR_TRIMS2OFFSETS "\006Trimy => Subtrimy"
|
||||
#define TR_MENUMODELSEL "MODEL"
|
||||
#define TR_MENUSETUP "NASTAVENÍ"
|
||||
#define TR_MENUFLIGHTPHASE "LETOVÝ REŽIM"
|
||||
|
@ -776,7 +778,7 @@
|
|||
#define TR_SCRIPT "Skript"
|
||||
#define TR_INPUTS "Vstupy"
|
||||
#define TR_OUTPUTS "Výstupy"
|
||||
#define TR_EEBACKUP "\004[ENTER Long] to backup the EEPROM"
|
||||
#define TR_EEBACKUP "\010[dlouze ENTER] zálohuje EEPROM"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_SWR TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("RxBt", "RxBat")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -297,9 +299,9 @@
|
|||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0""Tmr1\0""Tmr2\0" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Cells""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Time\0"
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1\0""Tmr2\0" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Cells""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Time\0"
|
||||
#else
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
|
@ -405,7 +407,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Time", "Time\0")
|
||||
#define TR_SWR TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("RxBt", "RxBat")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -297,9 +299,9 @@
|
|||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
#if LCD_W >= 212
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0""Tmr1\0""Tmr2\0" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Cells""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Time\0"
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1\0""Tmr2\0" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Cells""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Time\0"
|
||||
#else
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
|
@ -405,7 +407,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,7 @@
|
|||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Hora"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Hora"
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +403,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,7 @@
|
|||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +403,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -278,16 +278,18 @@
|
|||
#define LEN_FUNCSOUNDS TR("\004", "\006")
|
||||
#define TR_FUNCSOUNDS TR("Bp1\0""Bp2\0""Bp3\0""Wrn1""Wrn2""Chee""Rata""Tick""Sirn""Ring""SciF""Robt""Chrp""Tada""Crck""Alrm", "Beep1 ""Beep2 ""Beep3 ""Warn1 ""Warn2 ""Cheep ""Ratata""Tick ""Siren ""Ring ""SciFi ""Robot ""Chirp ""Tada ""Crickt""AlmClk")
|
||||
|
||||
#define LEN_VTELEMCHNS "\004"
|
||||
#define LEN_VTELEMCHNS TR("\004", "\005")
|
||||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#define TR_TELEM_RESERVE TR("[--]", "[---]")
|
||||
#define TR_TELEM_TIME TR("Heur", "Heure")
|
||||
#define TR_SWR TR("SWR\0", "SWR\0 ")
|
||||
#define TR_RX_BATT TR("RxBt", "RxBat")
|
||||
#define TR_A3_A4 TR("A3\0 ""A4\0 ", "A3\0 ""A4\0 ")
|
||||
#define TR_A3_A4_MIN TR("A3-\0""A4-\0", "A3-\0 ""A4-\0 ")
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,11 @@
|
|||
|
||||
#define TR_ASPD_MAX "ViA+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Chr1""Chr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vit\0""Dist""AltG""Elem""Velm""Vfas""Cour""Cnsm""Puis""AccX""AccY""AccZ""Cap\0""VitV""VitA""dET\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vit+""Dst+" TR_ASPD_MAX "Elm-""Els-""Vfs-""Cur+""Pui+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Tmps"
|
||||
#if LCD_W >= 212
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Chr1\0""Chr2\0" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Carbu""T1\0 ""T2\0 ""Vit\0 ""Dist\0""AltG""Elem\0""Velm\0""Vfas\0""Cour\0""Consm""Puiss""AccX\0""AccY\0""AccZ\0""Cap\0 ""VitV\0""VitA\0""dET\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Vit+\0""Dst+\0" TR_ASPD_MAX "Elem-""Els-\0""Vfas-""Curr+""Puis+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Accel""Temps"
|
||||
#else
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Chr1""Chr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vit\0""Dist""AltG""Elem""Velm""Vfas""Cour""Cnsm""Puis""AccX""AccY""AccZ""Cap\0""VitV""VitA""dET\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vit+""Dst+" TR_ASPD_MAX "Elm-""Els-""Vfs-""Cur+""Pui+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Tmps"
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +407,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,7 @@
|
|||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vel\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsm""Powr""AccX""AccY""AccZ""Dir\0""VelV""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vel+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Carb""T1\0 ""T2\0 ""Vel\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsm""Powr""AccX""AccY""AccZ""Dir\0""VelV""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vel+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +403,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,7 @@
|
|||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Bat\0""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Wys\0""Rpm\0""Pali""T1\0 ""T2\0 ""Spd\0""Dyst""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Moc\0""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Wys-""Wys+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Moc+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#define TR_VTELEMCHNS "---\0""Bat\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Wys\0""Rpm\0""Pali""T1\0 ""T2\0 ""Spd\0""Dyst""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Moc\0""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Wys-""Wys+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Moc+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +403,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "GAZ""SK""SW""LOL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
@ -716,8 +718,8 @@
|
|||
#define TR_PATH_TOO_LONG "Ścieżka za długa"
|
||||
#define TR_VIEW_TEXT "Pokaż tekst"
|
||||
#define TR_FLASH_BOOTLOADER "Flash BootLoader"
|
||||
#define TR_WRITING "\032Writing..."
|
||||
#define TR_CONFIRM_FORMAT "Confirm Format?"
|
||||
#define TR_WRITING "\032Zapis... "
|
||||
#define TR_CONFIRM_FORMAT "Zatwierdź Format?"
|
||||
#define TR_INTERNALRF "Wewnętrzny moduł RF"
|
||||
#define TR_EXTERNALRF "Zewnętrzny moduł RF"
|
||||
#define TR_FAILSAFE "Tryb Failsafe"
|
||||
|
|
|
@ -282,12 +282,14 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
|
@ -296,7 +298,7 @@
|
|||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VVel""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vel+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Hora"
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VVel""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Vel+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Hora"
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +403,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
|
|
@ -282,21 +282,27 @@
|
|||
|
||||
#if defined(CPUARM)
|
||||
#define TR_TELEM_RESERVE "[--]"
|
||||
#define TR_TELEM_TIME "Time"
|
||||
#define TR_SWR "SWR\0"
|
||||
#define TR_RX_BATT "RxBt"
|
||||
#define TR_A3_A4 "A3\0 ""A4\0 "
|
||||
#define TR_A3_A4_MIN "A3-\0""A4-\0"
|
||||
#else
|
||||
#define TR_TELEM_RESERVE
|
||||
#define TR_TELEM_TIME
|
||||
#define TR_SWR
|
||||
#define TR_RX_BATT
|
||||
#define TR_A3_A4
|
||||
#define TR_A3_A4_MIN
|
||||
#endif
|
||||
|
||||
#define TR_ASPD_MAX "ASp+"
|
||||
#define TR_ASPD_MAX TR("ASp+", "ASpd+")
|
||||
|
||||
#define TR_VTELEMCHNS "---\0""Batt""Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Höjd""Varv""Tank""T1\0 ""T2\0 ""Fart""Avst""GHjd""Batt""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VFrt""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Hjd-""Hjd+""Rpm+""T1+\0""T2+\0""Frt+""Avs+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Tid\0"
|
||||
#if LCD_W >= 212
|
||||
#define TR_VTELEMCHNS "---\0 ""Batt\0" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1\0""Tmr2\0" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0 ""Rpm\0 ""Fuel\0""T1\0 ""T2\0 ""Spd\0 ""Dist\0""GAlt\0""Cell\0""Cells""Vfas\0""Curr\0""Cnsp\0""Powr\0""AccX\0""AccY\0""AccZ\0""Hdg\0 ""VSpd\0""ASpd\0""dTE\0 " TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0 ""A2-\0 " TR_A3_A4_MIN "Alt-\0""Alt+\0""Rpm+\0""T1+\0 ""T2+\0 ""Spd+\0""Dst+\0" TR_ASPD_MAX "Cell-""Cels-""Vfas-""Curr+""Powr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0 ""Time\0"
|
||||
#else
|
||||
#define TR_VTELEMCHNS "---\0""Batt" TR_TELEM_TIME TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Tmr1""Tmr2" TR_SWR "Tx\0 ""Rx\0 " TR_RX_BATT "A1\0 ""A2\0 " TR_A3_A4 "Alt\0""Rpm\0""Fuel""T1\0 ""T2\0 ""Spd\0""Dist""GAlt""Cell""Cels""Vfas""Curr""Cnsp""Powr""AccX""AccY""AccZ""Hdg\0""VSpd""ASpd""dTE\0" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "A1-\0""A2-\0" TR_A3_A4_MIN "Alt-""Alt+""Rpm+""T1+\0""T2+\0""Spd+""Dst+" TR_ASPD_MAX "Cel-""Cls-""Vfs-""Cur+""Pwr+" TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE TR_TELEM_RESERVE "Acc\0""Time"
|
||||
#endif
|
||||
|
||||
#define LENGTH_UNIT_IMP "ft\0"
|
||||
#define SPEED_UNIT_IMP "mph"
|
||||
|
@ -401,7 +407,7 @@
|
|||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||
#define TR_6POS_POTS "S11""S12""S13""S14""S15""S16""S21""S22""S23""S24""S25""S26""S31""S32""S33""S34""S35""S36"
|
||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
#elif defined(CPUARM)
|
||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||
|
@ -415,7 +421,7 @@
|
|||
#define TR_CYC_VSRCRAW "[C1]""[C2]""[C3]"
|
||||
#endif
|
||||
|
||||
#define TR_VSRCRAW "---\0""Rod\0""Hjd\0""Gas\0""Ske\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODER "MAX " TR_CYC_VSRCRAW "TrmR" "TrmH" "TrmG" "TrmS" TR_SW_VSRCRAW
|
||||
#define TR_VSRCRAW "---\0""Rod\0""Hjd\0""Gas\0""Ske\0" TR_POTS_VSRCRAW TR_ROTARY_ENCODERS "MAX\0" TR_CYC_VSRCRAW "TrmR" "TrmH" "TrmG" "TrmS" TR_SW_VSRCRAW
|
||||
|
||||
#define LEN_VTMRMODES "\003"
|
||||
#define TR_VTMRMODES "Av\0""ABS""GAs""GA%""GAt"
|
||||
|
@ -440,7 +446,6 @@
|
|||
#define LEN_INDENT 1
|
||||
#define INDENT_WIDTH (FW/2)
|
||||
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#define TR_ENTER "[ENTER]"
|
||||
#else
|
||||
|
@ -475,7 +480,7 @@
|
|||
#define TR_TTRIM TR("Gastrim", INDENT "Gastrim")
|
||||
#define TR_BEEPCTR TR("Cent.pip", "Centerpip")
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protokoll")
|
||||
#define TR_PPMFRAME "PPM-paket"
|
||||
#define TR_PPMFRAME TR(INDENT "PPM-paket", INDENT "PPM-paket")
|
||||
#define TR_MS "ms"
|
||||
#define TR_SWITCH "Brytare"
|
||||
#define TR_TRIMS "Trimmar"
|
||||
|
@ -852,7 +857,6 @@
|
|||
#define TR_ABOUT_HARDWARE_3 ""
|
||||
#endif
|
||||
|
||||
|
||||
#define TR_ABOUT_PARENTS_1 "Ursprungsprojekt"
|
||||
#define TR_ABOUT_PARENTS_2 "ersky9x (Mike Blandford)"
|
||||
#define TR_ABOUT_PARENTS_3 "ER9X (Erez Raviv)"
|
||||
|
|
|
@ -219,7 +219,7 @@ I18N_PLAY_FUNCTION(cz, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(cz, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(cz, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(CZ_PROMPT_MINUS);
|
||||
|
@ -228,7 +228,7 @@ I18N_PLAY_FUNCTION(cz, playDuration, int16_t seconds)
|
|||
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1, ZENSKY);
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ I18N_PLAY_FUNCTION(de, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(de, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(de, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(DE_PROMPT_MINUS);
|
||||
|
@ -178,7 +178,7 @@ I18N_PLAY_FUNCTION(de, playDuration, int16_t seconds)
|
|||
uint8_t ore = 0;
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(DE_PROMPT_UHR);
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ I18N_PLAY_FUNCTION(en, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(en, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(en, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(EN_PROMPT_MINUS);
|
||||
|
@ -160,7 +160,7 @@ I18N_PLAY_FUNCTION(en, playDuration, int16_t seconds)
|
|||
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1 , 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ I18N_PLAY_FUNCTION(es, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(es, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(es, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_MENO);
|
||||
|
@ -200,12 +200,13 @@ I18N_PLAY_FUNCTION(es, playDuration, int16_t seconds)
|
|||
uint8_t ore = 0;
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
ore=tmp;
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
ore = tmp;
|
||||
if (tmp > 1) {
|
||||
PLAY_NUMBER(tmp, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_HORAS);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_UNA);
|
||||
PUSH_NUMBER_PROMPT(ES_PROMPT_HORA);
|
||||
}
|
||||
|
|
|
@ -42,6 +42,8 @@ enum FrenchPrompts {
|
|||
FR_PROMPT_VIRGULE = 119,
|
||||
FR_PROMPT_ET = 120,
|
||||
FR_PROMPT_MOINS = 121,
|
||||
FR_PROMPT_MINUIT = 122,
|
||||
FR_PROMPT_MIDI = 123,
|
||||
|
||||
FR_PROMPT_UNITS_BASE = 125,
|
||||
FR_PROMPT_VOLTS = FR_PROMPT_UNITS_BASE+UNIT_VOLTS,
|
||||
|
@ -174,7 +176,7 @@ I18N_PLAY_FUNCTION(fr, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(fr, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_MOINS);
|
||||
|
@ -183,7 +185,13 @@ I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds)
|
|||
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (IS_PLAY_TIME() && tmp==0) {
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_MINUIT);
|
||||
}
|
||||
else if (IS_PLAY_TIME() && tmp==12) {
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_MIDI);
|
||||
}
|
||||
else if (tmp > 0) {
|
||||
PLAY_NUMBER(tmp, 0, FEMININ);
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_HEURE);
|
||||
}
|
||||
|
@ -191,13 +199,18 @@ I18N_PLAY_FUNCTION(fr, playDuration, int16_t seconds)
|
|||
tmp = seconds / 60;
|
||||
seconds %= 60;
|
||||
if (tmp > 0) {
|
||||
if (IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, 0, tmp==1 ? FEMININ : 0);
|
||||
}
|
||||
else {
|
||||
PLAY_NUMBER(tmp, 0, FEMININ);
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_MINUTE);
|
||||
if (seconds > 0)
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_ET);
|
||||
}
|
||||
}
|
||||
|
||||
if (seconds > 0) {
|
||||
if (!IS_PLAY_TIME() && seconds > 0) {
|
||||
PLAY_NUMBER(seconds, 0, FEMININ);
|
||||
PUSH_NUMBER_PROMPT(FR_PROMPT_SECONDE);
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ I18N_PLAY_FUNCTION(it, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(it, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(it, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_MENO);
|
||||
|
@ -176,7 +176,7 @@ I18N_PLAY_FUNCTION(it, playDuration, int16_t seconds)
|
|||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
ore=tmp;
|
||||
if (tmp > 1) {
|
||||
if (tmp > 1 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, 0, 0);
|
||||
PUSH_NUMBER_PROMPT(IT_PROMPT_ORE);
|
||||
} else {
|
||||
|
|
|
@ -239,7 +239,7 @@ I18N_PLAY_FUNCTION(pl, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
|
||||
|
||||
// The whole funtion has to be changed
|
||||
I18N_PLAY_FUNCTION(pl, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(pl, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(PL_PROMPT_MINUS);
|
||||
|
@ -248,7 +248,7 @@ I18N_PLAY_FUNCTION(pl, playDuration, int16_t seconds)
|
|||
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1, ZENSKI);
|
||||
}
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ I18N_PLAY_FUNCTION(pt, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(pt, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(pt, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(PT_PROMPT_MENOS);
|
||||
|
@ -185,7 +185,7 @@ I18N_PLAY_FUNCTION(pt, playDuration, int16_t seconds)
|
|||
uint8_t ore = 0;
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
ore=tmp;
|
||||
if (tmp > 2) {
|
||||
PLAY_NUMBER(tmp, 0, 0);
|
||||
|
|
|
@ -141,7 +141,7 @@ I18N_PLAY_FUNCTION(se, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(se, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(se, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(SE_PROMPT_MINUS);
|
||||
|
@ -150,7 +150,7 @@ I18N_PLAY_FUNCTION(se, playDuration, int16_t seconds)
|
|||
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1 , 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -235,7 +235,7 @@ I18N_PLAY_FUNCTION(sk, playNumber, getvalue_t number, uint8_t unit, uint8_t att)
|
|||
}
|
||||
}
|
||||
|
||||
I18N_PLAY_FUNCTION(sk, playDuration, int16_t seconds)
|
||||
I18N_PLAY_FUNCTION(sk, playDuration, int seconds PLAY_DURATION_ATT)
|
||||
{
|
||||
if (seconds < 0) {
|
||||
PUSH_NUMBER_PROMPT(SK_PROMPT_MINUS);
|
||||
|
@ -244,7 +244,7 @@ I18N_PLAY_FUNCTION(sk, playDuration, int16_t seconds)
|
|||
|
||||
uint8_t tmp = seconds / 3600;
|
||||
seconds %= 3600;
|
||||
if (tmp > 0) {
|
||||
if (tmp > 0 || IS_PLAY_TIME()) {
|
||||
PLAY_NUMBER(tmp, UNIT_HOURS+1, ZENSKY);
|
||||
}
|
||||
|
||||
|
|
|
@ -242,7 +242,7 @@ def ttsFr():
|
|||
systemSounds.append((str(100*(i+1)), filename(PROMPT_SYSTEM_BASE+100+i)))
|
||||
for i, s in enumerate(["une", "onze", "vingt et une", "trente et une", "quarante et une", "cinquante et une", "soixante et une", "soixante et onze", "quatre vingt une"]):
|
||||
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE+110+i)))
|
||||
for i, s in enumerate(["virgule", "et", "moins"]):
|
||||
for i, s in enumerate(["virgule", "et", "moins", "minuit", "midi"]):
|
||||
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE+119+i)))
|
||||
for i, s in enumerate(["volts", u"ampères", u"mètres seconde", "", "kilomètre heure", u"mètres", u"degrés", "pourcents", u"milli ampères", u"milli ampères / heure", "watt", "db", "pieds", "miles par heure", "heure", "minute", "seconde", "tours par minute", "g"]):
|
||||
systemSounds.append((s, filename(PROMPT_SYSTEM_BASE+125+i)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue