2012-10-25 19:43:56 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
* @addtogroup OpenPilot System OpenPilot System
|
|
|
|
* @{
|
|
|
|
* @addtogroup OpenPilot Libraries OpenPilot System Libraries
|
|
|
|
* @{
|
|
|
|
* @file sanitycheck.c
|
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012.
|
|
|
|
* @brief Utilities to validate a flight configuration
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2013-04-01 16:41:12 +02:00
|
|
|
#include <openpilot.h>
|
2012-10-25 21:41:59 +02:00
|
|
|
#include <pios_board_info.h>
|
2013-04-01 16:41:12 +02:00
|
|
|
|
|
|
|
// Private includes
|
|
|
|
#include "inc/sanitycheck.h"
|
|
|
|
|
|
|
|
// UAVOs
|
|
|
|
#include <manualcontrolsettings.h>
|
2014-02-09 19:33:29 +01:00
|
|
|
#include <flightmodesettings.h>
|
2013-04-01 16:41:12 +02:00
|
|
|
#include <systemsettings.h>
|
2014-01-12 21:37:40 +01:00
|
|
|
#include <systemalarms.h>
|
2014-06-01 12:17:42 +02:00
|
|
|
#include <revosettings.h>
|
2014-06-18 21:29:55 +02:00
|
|
|
#include <positionstate.h>
|
2013-05-02 23:31:14 +02:00
|
|
|
#include <taskinfo.h>
|
2012-10-25 21:41:59 +02:00
|
|
|
|
2014-06-01 20:28:38 +02:00
|
|
|
// a number of useful macros
|
2014-06-26 20:31:27 +02:00
|
|
|
#define ADDSEVERITY(check) severity = (severity != SYSTEMALARMS_ALARM_OK ? severity : ((check) ? SYSTEMALARMS_ALARM_OK : SYSTEMALARMS_ALARM_CRITICAL))
|
2014-06-01 20:28:38 +02:00
|
|
|
|
|
|
|
|
2012-10-25 21:41:59 +02:00
|
|
|
/****************************
|
2013-05-19 16:37:30 +02:00
|
|
|
* Current checks:
|
|
|
|
* 1. If a flight mode switch allows autotune and autotune module not running
|
|
|
|
* 2. If airframe is a multirotor and either manual is available or a stabilization mode uses "none"
|
|
|
|
****************************/
|
2012-10-25 21:41:59 +02:00
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
// ! Check a stabilization mode switch position for safety
|
2014-06-01 20:28:38 +02:00
|
|
|
static bool check_stabilization_settings(int index, bool multirotor, bool coptercontrol);
|
2012-10-25 19:43:56 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Run a preflight check over the hardware configuration
|
|
|
|
* and currently active modules
|
|
|
|
*/
|
|
|
|
int32_t configuration_check()
|
|
|
|
{
|
2013-04-03 19:26:25 +02:00
|
|
|
int32_t severity = SYSTEMALARMS_ALARM_OK;
|
2013-04-20 01:10:40 +02:00
|
|
|
SystemAlarmsExtendedAlarmStatusOptions alarmstatus = SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE;
|
2013-04-03 19:26:25 +02:00
|
|
|
uint8_t alarmsubstatus = 0;
|
|
|
|
// Get board type
|
2013-05-19 16:37:30 +02:00
|
|
|
const struct pios_board_info *bdinfo = &pios_board_info_blob;
|
|
|
|
bool coptercontrol = bdinfo->board_type == 0x04;
|
2013-04-03 19:26:25 +02:00
|
|
|
|
2014-06-01 12:17:42 +02:00
|
|
|
// Classify navigation capability
|
|
|
|
#ifdef REVOLUTION
|
|
|
|
RevoSettingsInitialize();
|
|
|
|
uint8_t revoFusion;
|
|
|
|
RevoSettingsFusionAlgorithmGet(&revoFusion);
|
|
|
|
bool navCapableFusion;
|
|
|
|
switch (revoFusion) {
|
|
|
|
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYMAGGPSOUTDOOR:
|
|
|
|
case REVOSETTINGS_FUSIONALGORITHM_INS13GPSOUTDOOR:
|
|
|
|
navCapableFusion = true;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
navCapableFusion = false;
|
2014-06-18 21:29:55 +02:00
|
|
|
// check for hitl. hitl allows to feed position and velocity state via
|
|
|
|
// telemetry, this makes nav possible even with an unsuited algorithm
|
|
|
|
if (PositionStateHandle()) {
|
|
|
|
if (PositionStateReadOnly()) {
|
|
|
|
navCapableFusion = true;
|
|
|
|
}
|
|
|
|
}
|
2014-06-01 12:17:42 +02:00
|
|
|
}
|
|
|
|
#else
|
|
|
|
const bool navCapableFusion = false;
|
2014-06-18 21:29:55 +02:00
|
|
|
#endif /* ifdef REVOLUTION */
|
2014-06-01 12:17:42 +02:00
|
|
|
|
|
|
|
|
2013-04-03 19:26:25 +02:00
|
|
|
// Classify airframe type
|
2014-06-29 17:22:41 +02:00
|
|
|
bool multirotor = (GetCurrentFrameType() == FRAME_TYPE_MULTIROTOR);
|
2013-05-19 16:37:30 +02:00
|
|
|
|
2013-04-03 19:26:25 +02:00
|
|
|
|
|
|
|
// For each available flight mode position sanity check the available
|
|
|
|
// modes
|
|
|
|
uint8_t num_modes;
|
2014-02-09 19:33:29 +01:00
|
|
|
uint8_t modes[FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_NUMELEM];
|
2013-04-03 19:26:25 +02:00
|
|
|
ManualControlSettingsFlightModeNumberGet(&num_modes);
|
2014-02-09 19:33:29 +01:00
|
|
|
FlightModeSettingsFlightModePositionGet(modes);
|
2013-04-03 19:26:25 +02:00
|
|
|
|
2013-04-20 20:25:22 +02:00
|
|
|
for (uint32_t i = 0; i < num_modes; i++) {
|
|
|
|
switch (modes[i]) {
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_MANUAL:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(!multirotor);
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_STABILIZED1:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(check_stabilization_settings(1, multirotor, coptercontrol));
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_STABILIZED2:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(check_stabilization_settings(2, multirotor, coptercontrol));
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_STABILIZED3:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(check_stabilization_settings(3, multirotor, coptercontrol));
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
2014-05-04 11:19:58 +02:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_STABILIZED4:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(check_stabilization_settings(4, multirotor, coptercontrol));
|
2014-05-04 11:19:58 +02:00
|
|
|
break;
|
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_STABILIZED5:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(check_stabilization_settings(5, multirotor, coptercontrol));
|
2014-05-04 11:19:58 +02:00
|
|
|
break;
|
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_STABILIZED6:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(check_stabilization_settings(6, multirotor, coptercontrol));
|
2014-05-04 11:19:58 +02:00
|
|
|
break;
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_AUTOTUNE:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(PIOS_TASK_MONITOR_IsRunning(TASKINFO_RUNNING_AUTOTUNE));
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
2014-06-01 20:28:38 +02:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_PATHPLANNER:
|
|
|
|
{
|
|
|
|
// Revo supports PathPlanner and that must be OK or we are not sane
|
|
|
|
// PathPlan alarm is uninitialized if not running
|
|
|
|
// PathPlan alarm is warning or error if the flightplan is invalid
|
|
|
|
SystemAlarmsAlarmData alarms;
|
|
|
|
SystemAlarmsAlarmGet(&alarms);
|
|
|
|
ADDSEVERITY(alarms.PathPlan == SYSTEMALARMS_ALARM_OK);
|
|
|
|
}
|
|
|
|
// intentionally no break as this also needs pathfollower
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_POSITIONHOLD:
|
2014-06-04 10:02:19 +02:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_POSITIONVARIOFPV:
|
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_POSITIONVARIOLOS:
|
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_POSITIONVARIONSEW:
|
2014-02-09 19:33:29 +01:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_LAND:
|
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_POI:
|
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_RETURNTOBASE:
|
2014-06-04 10:23:37 +02:00
|
|
|
case FLIGHTMODESETTINGS_FLIGHTMODEPOSITION_AUTOCRUISE:
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(!coptercontrol);
|
|
|
|
ADDSEVERITY(navCapableFusion);
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
// Uncovered modes are automatically an error
|
2014-06-01 20:28:38 +02:00
|
|
|
ADDSEVERITY(false);
|
2013-04-03 19:26:25 +02:00
|
|
|
}
|
|
|
|
// mark the first encountered erroneous setting in status and substatus
|
2013-04-20 01:10:40 +02:00
|
|
|
if ((severity != SYSTEMALARMS_ALARM_OK) && (alarmstatus == SYSTEMALARMS_EXTENDEDALARMSTATUS_NONE)) {
|
2013-05-19 16:37:30 +02:00
|
|
|
alarmstatus = SYSTEMALARMS_EXTENDEDALARMSTATUS_FLIGHTMODE;
|
2013-04-03 19:26:25 +02:00
|
|
|
alarmsubstatus = i;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-06-18 21:39:16 +02:00
|
|
|
uint8_t checks_disabled;
|
|
|
|
FlightModeSettingsDisableSanityChecksGet(&checks_disabled);
|
|
|
|
if (checks_disabled == FLIGHTMODESETTINGS_DISABLESANITYCHECKS_TRUE) {
|
|
|
|
severity = SYSTEMALARMS_ALARM_WARNING;
|
|
|
|
}
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
if (severity != SYSTEMALARMS_ALARM_OK) {
|
2013-04-03 19:26:25 +02:00
|
|
|
ExtendedAlarmsSet(SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION, severity, alarmstatus, alarmsubstatus);
|
2013-05-19 16:37:30 +02:00
|
|
|
} else {
|
2013-04-03 19:26:25 +02:00
|
|
|
AlarmsClear(SYSTEMALARMS_ALARM_SYSTEMCONFIGURATION);
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2013-04-03 19:26:25 +02:00
|
|
|
|
|
|
|
return 0;
|
2012-10-25 21:41:59 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Checks the stabiliation settings for a paritcular mode and makes
|
|
|
|
* sure it is appropriate for the airframe
|
|
|
|
* @param[in] index Which stabilization mode to check
|
2014-06-01 20:28:38 +02:00
|
|
|
* @returns true or false
|
2012-10-25 21:41:59 +02:00
|
|
|
*/
|
2014-06-01 20:28:38 +02:00
|
|
|
static bool check_stabilization_settings(int index, bool multirotor, bool coptercontrol)
|
2012-10-25 21:41:59 +02:00
|
|
|
{
|
2014-02-09 19:33:29 +01:00
|
|
|
uint8_t modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_NUMELEM];
|
2013-04-03 19:26:25 +02:00
|
|
|
|
|
|
|
// Get the different axis modes for this switch position
|
2013-04-20 20:25:22 +02:00
|
|
|
switch (index) {
|
2013-05-19 16:37:30 +02:00
|
|
|
case 1:
|
2014-02-09 19:33:29 +01:00
|
|
|
FlightModeSettingsStabilization1SettingsArrayGet(modes);
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
|
|
|
case 2:
|
2014-02-09 19:33:29 +01:00
|
|
|
FlightModeSettingsStabilization2SettingsArrayGet(modes);
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
|
|
|
case 3:
|
2014-02-09 19:33:29 +01:00
|
|
|
FlightModeSettingsStabilization3SettingsArrayGet(modes);
|
2013-05-19 16:37:30 +02:00
|
|
|
break;
|
2014-05-04 11:19:58 +02:00
|
|
|
case 4:
|
|
|
|
FlightModeSettingsStabilization4SettingsArrayGet(modes);
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
FlightModeSettingsStabilization5SettingsArrayGet(modes);
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
FlightModeSettingsStabilization6SettingsArrayGet(modes);
|
|
|
|
break;
|
2013-05-19 16:37:30 +02:00
|
|
|
default:
|
2014-06-01 20:28:38 +02:00
|
|
|
return false;
|
2013-04-03 19:26:25 +02:00
|
|
|
}
|
|
|
|
|
2014-04-26 15:14:40 +02:00
|
|
|
// For multirotors verify that roll/pitch/yaw are not set to "none"
|
|
|
|
// (why not? might be fun to test ones reactions ;) if you dare, set your frame to "custom"!
|
2013-04-03 19:26:25 +02:00
|
|
|
if (multirotor) {
|
2014-04-26 15:14:40 +02:00
|
|
|
for (uint32_t i = 0; i < FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST; i++) {
|
2014-04-26 20:33:25 +02:00
|
|
|
if (modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_MANUAL) {
|
2014-06-01 20:28:38 +02:00
|
|
|
return false;
|
2013-05-19 16:37:30 +02:00
|
|
|
}
|
2013-04-03 19:26:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-26 15:14:40 +02:00
|
|
|
// coptercontrol cannot do altitude holding
|
|
|
|
if (coptercontrol) {
|
2014-04-26 20:33:25 +02:00
|
|
|
if (modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ALTITUDEHOLD
|
2014-06-03 18:42:54 +02:00
|
|
|
|| modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ALTITUDEVARIO
|
2014-04-26 15:14:40 +02:00
|
|
|
) {
|
2014-06-01 20:28:38 +02:00
|
|
|
return false;
|
2014-04-26 15:14:40 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// check that thrust modes are only set to thrust axis
|
|
|
|
for (uint32_t i = 0; i < FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST; i++) {
|
2014-04-26 20:33:25 +02:00
|
|
|
if (modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ALTITUDEHOLD
|
2014-06-03 18:42:54 +02:00
|
|
|
|| modes[i] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ALTITUDEVARIO
|
2014-04-26 15:14:40 +02:00
|
|
|
) {
|
2014-06-01 20:28:38 +02:00
|
|
|
return false;
|
2014-04-26 15:14:40 +02:00
|
|
|
}
|
|
|
|
}
|
2014-04-26 20:33:25 +02:00
|
|
|
if (!(modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_MANUAL
|
|
|
|
|| modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ALTITUDEHOLD
|
2014-06-03 18:42:54 +02:00
|
|
|
|| modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_ALTITUDEVARIO
|
2014-04-29 15:51:56 +02:00
|
|
|
|| modes[FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_THRUST] == FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_CRUISECONTROL
|
2014-04-26 15:14:40 +02:00
|
|
|
)) {
|
2014-06-01 20:28:38 +02:00
|
|
|
return false;
|
2014-04-26 15:14:40 +02:00
|
|
|
}
|
|
|
|
|
2013-04-03 19:26:25 +02:00
|
|
|
// Warning: This assumes that certain conditions in the XML file are met. That
|
2014-04-26 20:33:25 +02:00
|
|
|
// FLIGHTMODESETTINGS_STABILIZATION1SETTINGS_MANUAL has the same numeric value for each channel
|
|
|
|
// and is the same for STABILIZATIONDESIRED_STABILIZATIONMODE_MANUAL
|
|
|
|
// (this is checked at compile time by static constraint manualcontrol.h)
|
2013-04-03 19:26:25 +02:00
|
|
|
|
2014-06-01 20:28:38 +02:00
|
|
|
return true;
|
2013-02-03 14:57:54 +01:00
|
|
|
}
|
2014-06-29 17:22:41 +02:00
|
|
|
|
|
|
|
FrameType_t GetCurrentFrameType()
|
|
|
|
{
|
|
|
|
uint8_t airframe_type;
|
|
|
|
|
|
|
|
SystemSettingsAirframeTypeGet(&airframe_type);
|
|
|
|
switch ((SystemSettingsAirframeTypeOptions)airframe_type) {
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_QUADX:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_QUADP:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_HEXA:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTO:
|
2014-07-13 13:58:18 +02:00
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOX:
|
2014-06-29 17:22:41 +02:00
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_HEXAX:
|
2014-07-10 06:01:28 +02:00
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_HEXAH:
|
2014-06-29 17:22:41 +02:00
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOV:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXP:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_HEXACOAX:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_TRI:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_OCTOCOAXX:
|
|
|
|
return FRAME_TYPE_MULTIROTOR;
|
|
|
|
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWING:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWINGELEVON:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWINGVTAIL:
|
|
|
|
return FRAME_TYPE_FIXED_WING;
|
|
|
|
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_HELICP:
|
|
|
|
return FRAME_TYPE_HELI;
|
|
|
|
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_GROUNDVEHICLECAR:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_GROUNDVEHICLEDIFFERENTIAL:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_GROUNDVEHICLEMOTORCYCLE:
|
|
|
|
return FRAME_TYPE_GROUND;
|
|
|
|
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_VTOL:
|
|
|
|
case SYSTEMSETTINGS_AIRFRAMETYPE_CUSTOM:
|
|
|
|
return FRAME_TYPE_CUSTOM;
|
|
|
|
}
|
|
|
|
// anyway it should not reach here
|
|
|
|
return FRAME_TYPE_CUSTOM;
|
|
|
|
}
|