mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 12:55:12 +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()) {
|
||||
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);
|
||||
|
@ -603,10 +603,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;
|
||||
|
|
|
@ -613,10 +613,9 @@ void PrintDialog::printSwitches()
|
|||
for (int i=0; i<firmware->getCapability(LogicalSwitches); i++) {
|
||||
if (g_model->customSw[i].func) {
|
||||
str.append("<tr>");
|
||||
str.append("<td width=\"60\" align=\"center\"><b>"+tr("L")+QString("%1</b></td>").arg(i+1));
|
||||
if (i < 9) str += " ";
|
||||
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++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue