mirror of
https://github.com/opentx/opentx.git
synced 2025-07-17 13:25:20 +03:00
Logical switches print improvement
This commit is contained in:
parent
0fc8a5e2f2
commit
7027d809c1
2 changed files with 8 additions and 9 deletions
|
@ -507,13 +507,13 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
||||||
}
|
}
|
||||||
switch (getFunctionFamily()) {
|
switch (getFunctionFamily()) {
|
||||||
case LS_FAMILY_STAY:
|
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;
|
break;
|
||||||
case LS_FAMILY_STICKY:
|
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;
|
break;
|
||||||
case LS_FAMILY_TIMER:
|
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;
|
break;
|
||||||
case LS_FAMILY_VOFS: {
|
case LS_FAMILY_VOFS: {
|
||||||
RawSource source = RawSource(val1, &model);
|
RawSource source = RawSource(val1, &model);
|
||||||
|
@ -603,10 +603,10 @@ QString LogicalSwitchData::toString(const ModelData & model)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetCurrentFirmware()->getCapability(LogicalSwitchesExt)) {
|
if (GetCurrentFirmware()->getCapability(LogicalSwitchesExt)) {
|
||||||
if (delay)
|
|
||||||
result += QObject::tr(" Delay %1 sec").arg(delay/10.0);
|
|
||||||
if (duration)
|
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;
|
return result;
|
||||||
|
|
|
@ -613,10 +613,9 @@ void PrintDialog::printSwitches()
|
||||||
for (int i=0; i<firmware->getCapability(LogicalSwitches); i++) {
|
for (int i=0; i<firmware->getCapability(LogicalSwitches); i++) {
|
||||||
if (g_model->customSw[i].func) {
|
if (g_model->customSw[i].func) {
|
||||||
str.append("<tr>");
|
str.append("<tr>");
|
||||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("L")+QString("%1</b></td>").arg(i+1));
|
str.append("<td width=\"60\"><b>"+tr("L")+QString("%1</b></td>").arg(i+1));
|
||||||
if (i < 9) str += " ";
|
|
||||||
QString tstr = g_model->customSw[i].toString(*g_model);
|
QString tstr = g_model->customSw[i].toString(*g_model);
|
||||||
str.append(doTC(tstr,"green"));
|
str.append(doTL(tstr,"green"));
|
||||||
str.append("</tr>");
|
str.append("</tr>");
|
||||||
sc++;
|
sc++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue