QMessageBox::information(0,"Warning!","You are about to start radio calibration.\nPlease ensure all motor power is disconnected AND all props are removed from the vehicle.\nAlso ensure transmitter and reciever are powered and connected\n\nClick OK to confirm");
m_calibrationEnabled=true;
for(inti=0;i<8;i++)
{
rcMin[i]=1500;
rcMax[i]=1500;
}
ui.rollWidget->showMinMax();
ui.pitchWidget->showMinMax();
ui.yawWidget->showMinMax();
ui.radio5Widget->showMinMax();
ui.radio6Widget->showMinMax();
ui.radio7Widget->showMinMax();
ui.radio8Widget->showMinMax();
QMessageBox::information(0,"Information","Click OK, then move all sticks to their extreme positions, watching the min/max values to ensure you get the most range from your controller. This includes all switches");
}
else
{
ui.calibrateButton->setText("Calibrate");
QMessageBox::information(0,"Trims","Ensure all sticks are centered and throttle is in the downmost position, click OK to continue");
///TODO: Set trims!
m_calibrationEnabled=false;
ui.rollWidget->hideMinMax();
ui.pitchWidget->hideMinMax();
ui.yawWidget->hideMinMax();
ui.radio5Widget->hideMinMax();
ui.radio6Widget->hideMinMax();
ui.radio7Widget->hideMinMax();
ui.radio8Widget->hideMinMax();
QStringstatusstr;
statusstr="Below you will find the detected radio calibration information that will be sent to the autopilot\n";
statusstr+="Normal values are around 1100 to 1900, with disconnected channels reading very close to 1500\n\n";