1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 12:55:12 +03:00

Merge pull request #1276 from opentx/projectkk2glider/issue_1266

Fixes #1266 - Companion timer value not in time format
This commit is contained in:
Bertrand Songis 2014-06-14 11:30:34 +02:00
commit 44829cd579
5 changed files with 73 additions and 16 deletions

View file

@ -459,6 +459,11 @@ CSFunctionFamily LogicalSwitchData::getFunctionFamily()
return LS_FAMILY_VCOMP;
}
bool LogicalSwitchData::isDeltaFunction()
{
return (func == LS_FN_DPOS || func == LS_FN_DAPOS);
}
QString LogicalSwitchData::funcToString()
{
switch (func) {
@ -545,7 +550,7 @@ QString LogicalSwitchData::toString(const ModelData & model)
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)
if (func == LS_FN_APOS || func == LS_FN_VPOS || isDeltaFunction())
result += " > ";
else if (func == LS_FN_ANEG || func == LS_FN_VNEG)
result += " < ";