Browse Source

navigator: allow more mission items

Since using more than 256 mission items has been tested and fixed, the
limit can now be raised to more than 256 (but smaller than UINT16_MAX).

Since the whole file is allocated in advance on NuttX, the limit there
is (arbitrarily) set to 2000. For POSIX archs such as SITL, we don't
really need to constrain ourselves any longer.
sbg
Julian Oes 8 years ago committed by Daniel Agar
parent
commit
9369262e63
  1. 4
      src/modules/navigator/navigation.h

4
src/modules/navigator/navigation.h

@ -47,8 +47,10 @@ @@ -47,8 +47,10 @@
#if defined(MEMORY_CONSTRAINED_SYSTEM)
# define NUM_MISSIONS_SUPPORTED 50
#elif defined(__PX4_POSIX)
# define NUM_MISSIONS_SUPPORTED (UINT16_MAX-1) // This is allocated as needed.
#else
# define NUM_MISSIONS_SUPPORTED 256
# define NUM_MISSIONS_SUPPORTED 2000 // This allocates a file of around 181 kB on the SD card.
#endif
#define NAV_EPSILON_POSITION 0.001f /**< Anything smaller than this is considered zero */

Loading…
Cancel
Save