mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-30 20:48:33 -04:00
Copter: improve check of frame type to catch spelling errors
This commit is contained in:
parent
e295d4555d
commit
c3f7146f03
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user