Fix model upd refs custom function reset timer
This commit is contained in:
@@ -1356,7 +1356,6 @@ void ModelData::sortMixes()
|
|||||||
|
|
||||||
void ModelData::updateResetParam(CustomFunctionData * cfd)
|
void ModelData::updateResetParam(CustomFunctionData * cfd)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (cfd->func != FuncReset)
|
if (cfd->func != FuncReset)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -1367,6 +1366,11 @@ void ModelData::updateResetParam(CustomFunctionData * cfd)
|
|||||||
|
|
||||||
switch (updRefInfo.type)
|
switch (updRefInfo.type)
|
||||||
{
|
{
|
||||||
|
case REF_UPD_TYPE_TIMER:
|
||||||
|
if (cfd->param < 0 || cfd->param > 2)
|
||||||
|
return;
|
||||||
|
idxAdj = -2; // reverse earlier offset required for rawsource
|
||||||
|
break;
|
||||||
case REF_UPD_TYPE_SENSOR:
|
case REF_UPD_TYPE_SENSOR:
|
||||||
idxAdj = 5/*3 Timers + Flight + Telemetery*/ + firmware->getCapability(RotaryEncoders);
|
idxAdj = 5/*3 Timers + Flight + Telemetery*/ + firmware->getCapability(RotaryEncoders);
|
||||||
if (cfd->param < idxAdj || cfd->param > (idxAdj + firmware->getCapability(Sensors)))
|
if (cfd->param < idxAdj || cfd->param > (idxAdj + firmware->getCapability(Sensors)))
|
||||||
@@ -1376,6 +1380,8 @@ void ModelData::updateResetParam(CustomFunctionData * cfd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "index1" << updRefInfo.index1 << "shift:" << updRefInfo.shift << "cfd->param:" << cfd->param << "idxAdj:" << idxAdj;
|
||||||
|
|
||||||
switch (updRefInfo.action)
|
switch (updRefInfo.action)
|
||||||
{
|
{
|
||||||
case REF_UPD_ACT_CLEAR:
|
case REF_UPD_ACT_CLEAR:
|
||||||
|
|||||||
Reference in New Issue
Block a user