Copter: improve check of frame type to catch spelling errors

This commit is contained in:
Randy Mackay 2013-09-09 15:57:54 +09:00
parent e295d4555d
commit c3f7146f03
2 changed files with 16 additions and 19 deletions

View File

@ -438,24 +438,20 @@ static struct {
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
#if FRAME_CONFIG == QUAD_FRAME #if FRAME_CONFIG == QUAD_FRAME
#define MOTOR_CLASS AP_MotorsQuad #define MOTOR_CLASS AP_MotorsQuad
#endif #elif FRAME_CONFIG == TRI_FRAME
#if FRAME_CONFIG == TRI_FRAME
#define MOTOR_CLASS AP_MotorsTri #define MOTOR_CLASS AP_MotorsTri
#endif #elif FRAME_CONFIG == HEXA_FRAME
#if FRAME_CONFIG == HEXA_FRAME
#define MOTOR_CLASS AP_MotorsHexa #define MOTOR_CLASS AP_MotorsHexa
#endif #elif FRAME_CONFIG == Y6_FRAME
#if FRAME_CONFIG == Y6_FRAME
#define MOTOR_CLASS AP_MotorsY6 #define MOTOR_CLASS AP_MotorsY6
#endif #elif FRAME_CONFIG == OCTA_FRAME
#if FRAME_CONFIG == OCTA_FRAME
#define MOTOR_CLASS AP_MotorsOcta #define MOTOR_CLASS AP_MotorsOcta
#endif #elif FRAME_CONFIG == OCTA_QUAD_FRAME
#if FRAME_CONFIG == OCTA_QUAD_FRAME
#define MOTOR_CLASS AP_MotorsOctaQuad #define MOTOR_CLASS AP_MotorsOctaQuad
#endif #elif FRAME_CONFIG == HELI_FRAME
#if FRAME_CONFIG == HELI_FRAME
#define MOTOR_CLASS AP_MotorsHeli #define MOTOR_CLASS AP_MotorsHeli
#else
#error Unrecognised frame type
#endif #endif
#if FRAME_CONFIG == HELI_FRAME // helicopter constructor requires more arguments #if FRAME_CONFIG == HELI_FRAME // helicopter constructor requires more arguments

View File

@ -75,13 +75,14 @@
#define AUX_SWITCH_HIGH 2 // indicates auxiliar switch is in the high position (pwm >1800) #define AUX_SWITCH_HIGH 2 // indicates auxiliar switch is in the high position (pwm >1800)
// Frame types // Frame types
#define QUAD_FRAME 0 #define UNDEFINED_FRAME 0
#define TRI_FRAME 1 #define QUAD_FRAME 1
#define HEXA_FRAME 2 #define TRI_FRAME 2
#define Y6_FRAME 3 #define HEXA_FRAME 3
#define OCTA_FRAME 4 #define Y6_FRAME 4
#define HELI_FRAME 5 #define OCTA_FRAME 5
#define OCTA_QUAD_FRAME 6 #define HELI_FRAME 6
#define OCTA_QUAD_FRAME 7
#define PLUS_FRAME 0 #define PLUS_FRAME 0
#define X_FRAME 1 #define X_FRAME 1