Commit 21d99702 authored by Don Gagne's avatar Don Gagne

Merge pull request #1435 from DonLakeFlyer/ParamProgress

Fix div by zero
parents 4c53a1de 94789d32
...@@ -448,10 +448,7 @@ void UASParameterCommsMgr::receivedParameterUpdate(int uas, int compId, int para ...@@ -448,10 +448,7 @@ void UASParameterCommsMgr::receivedParameterUpdate(int uas, int compId, int para
} }
} }
int progDiv = paramCount / 100; emit parameterListProgress((float)paramId / (float)paramCount);
if ((paramId % progDiv) == 0) {
emit parameterListProgress((float)paramId / (float)paramCount);
}
if (paramId == paramCount) { if (paramId == paramCount) {
emit parameterListProgress(0.0f); emit parameterListProgress(0.0f);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment