Tracking down some bugs

As mentioned in my previous post, there were a few anomolies when I ran the new ANSRTrack program during a live flight.

In this post, we will track down a couple of the issues:

There was a consistent error showing up at the bottom of the screen mainwindow: Update call to move rotator() failed.
This was happening consistently enough to quickly overwrite any other valid messages that should have appeared in that space.

In looking at the code, I looked at the moveRotator() function and found the following code where the status is returned:

if(status == false)
  //qDebug() << "command:" << command << "\tazimuth:" << azimuth;
return status;

When I compile this code, I get a warning message:

I had written the debug statement, but later commented it out, because I was no longer in a debug mode.

Apparently, since the debug statement is commented out, the system pairs the next line with the if statement, leaving no return statement in the case that status is true.

I put some braces around the debug statement to more precisely dictate what I wanted to happen. When I did that, the warnings went away, and the error message on the form went away.

if(status == false)
    //qDebug() << "command:" << command << "\tazimuth:" << azimuth;
return status;

The next item to tackle is the expansion of the correction factor widgets:

The “Correction Factor” scale needs to be expanded to maybe +/- 15 rather than the current +/- 10 degrees.

For this fix, I opened up the gui in QT, and clicked on the correction factor widget. Then I changed the limits in the properties table. This was repeated for the Elevation Correction widget as well.

After compiling the program again, the results show up on the main form.