mirror of https://github.com/ArduPilot/ardupilot
AP_Math: define postype_t and vectors
This commit is contained in:
parent
3fc88b19b8
commit
3a3a30ab22
|
@ -1,5 +1,24 @@
|
|||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef HAL_WITH_POSTYPE_DOUBLE
|
||||
#define HAL_WITH_POSTYPE_DOUBLE BOARD_FLASH_SIZE > 1024
|
||||
#endif
|
||||
|
||||
#if HAL_WITH_POSTYPE_DOUBLE
|
||||
typedef double postype_t;
|
||||
typedef Vector2d Vector2p;
|
||||
typedef Vector3d Vector3p;
|
||||
#define topostype todouble
|
||||
#else
|
||||
typedef float postype_t;
|
||||
typedef Vector2f Vector2p;
|
||||
typedef Vector3f Vector3p;
|
||||
#define topostype tofloat
|
||||
#endif
|
||||
|
||||
/*
|
||||
common controller helper functions
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue