fix(cpn): Model print global and special functions (#3075)

* fix(cpn): Model print global and special functions

* fix(cpn): Model print sf/gf adjust gvar abbreviate further

* fix(cpn): Model print gf/sf move to table format

* fix(cpn): Model print gf housekeeping
This commit is contained in:
Neil Horne
2023-03-05 20:15:52 +10:00
committed by GitHub
parent c84abbf739
commit 9fa9a1f100
5 changed files with 115 additions and 51 deletions
-24
View File
@@ -619,30 +619,6 @@ QString ModelPrinter::printLogicalSwitchLine(int idx)
return result;
}
QString ModelPrinter::printCustomFunctionLine(int idx, bool gfunc)
{
QString result;
CustomFunctionData cf;
if (gfunc) {
if (model.noGlobalFunctions)
return result;
cf = generalSettings.customFn[idx];
}
else
cf = model.customFn[idx];
if (cf.swtch.type == SWITCH_TYPE_NONE)
return result;
result += cf.swtch.toString(getCurrentBoard(), &generalSettings) + " - ";
result += cf.funcToString(&model) + " (";
result += cf.paramToString(&model) + ")";
if (!cf.repeatToString().isEmpty())
result += " " + cf.repeatToString();
if (!cf.enabledToString().isEmpty())
result += " " + cf.enabledToString();
return result;
}
QString ModelPrinter::printCurveName(int idx)
{
return model.curves[idx].nameToString(idx).toHtmlEscaped();