2 ******************************************************************************
4 * @file biascalibrationpage.h
5 * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
6 * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
9 * @addtogroup BiasCalibrationPage
12 *****************************************************************************/
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 3 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful, but
20 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
21 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24 * You should have received a copy of the GNU General Public License along
25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #ifndef ESCCALIBRATIONPAGE_H
31 #define ESCCALIBRATIONPAGE_H
33 #include "abstractwizardpage.h"
34 #include "outputcalibrationutil.h"
37 class EscCalibrationPage
;
40 class EscCalibrationPage
: public AbstractWizardPage
{
44 explicit EscCalibrationPage(SetupWizard
*wizard
, QWidget
*parent
= 0);
45 ~EscCalibrationPage();
46 void initializePage();
50 void startButtonClicked();
51 void stopButtonClicked();
52 void securityCheckBoxesToggled();
53 void enableButtons(bool enable
);
54 void resetAllSecurityCheckboxes();
57 static const int OFF_PWM_OUTPUT_PULSE_LENGTH_MICROSECONDS
= 900;
59 // Min value should match min value defined in vehicleconfigurationsource.h
60 static const int LOW_PWM_OUTPUT_PULSE_LENGTH_MICROSECONDS
= 1000;
61 static const int HIGH_PWM_OUTPUT_PULSE_LENGTH_MICROSECONDS
= 1900;
62 static const int HIGH_ONESHOT_MULTISHOT_OUTPUT_PULSE_LENGTH_MICROSECONDS
= 2000;
63 Ui::EscCalibrationPage
*ui
;
65 OutputCalibrationUtil m_outputUtil
;
66 QList
<quint16
> m_outputChannels
;
67 int getHighOutputRate();
70 #endif // ESCCALIBRATIONPAGE_H