Browse Source

AP_Math: define postype_t and vectors

zr-v5.1
Andrew Tridgell 4 years ago
parent
commit
3a3a30ab22
  1. 19
      libraries/AP_Math/control.h

19
libraries/AP_Math/control.h

@ -1,5 +1,24 @@ @@ -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…
Cancel
Save