Ref T261, interpolator mode is now part of setup

* added attribute in setup
* adjusted UI
* adjusted interpolator / simulator functions
This commit is contained in:
Klaus Basan
2018-05-04 22:31:25 +02:00
committed by Roland Winklmeier
parent eb815ab987
commit 3d2a74a652
21 changed files with 175 additions and 270 deletions

View File

@@ -477,10 +477,23 @@ namespace BlackCore
if (part1.startsWith("spline") || part1.startsWith("linear"))
{
const CCallsign cs(parser.hasPart(2) ? parser.part(2) : "");
const bool changed = this->setInterpolatorMode(CInterpolatorMulti::modeFromString(part1), cs);
CLogMessage(this).info(changed ? "Changed interpolation mode" : "Unchanged interpolation mode");
return true;
if (parser.hasPart(2))
{
const CCallsign cs(parser.part(2));
CInterpolationAndRenderingSetupPerCallsign setup = this->getInterpolationSetupPerCallsignOrDefault(cs);
const bool changed = setup.setInterpolatorMode(part1);
if (changed) { this->setInterpolationSetupPerCallsign(setup, cs); }
CLogMessage(this).info(changed ? "Changed interpolation mode for '%1'" : "Unchanged interpolation mode for '%1'") << cs.asString();
return true;
}
else
{
CInterpolationAndRenderingSetupGlobal setup = this->getInterpolationSetupGlobal();
const bool changed = setup.setInterpolatorMode(part1);
if (changed) { this->setInterpolationAndRenderingSetup(setup); }
CLogMessage(this).info(changed ? "Changed interpolation mode globally" : "Unchanged interpolation mode");
return true;
}
} // spline/linear
if (part1.startsWith("pos"))