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.
This commit is contained in:
Julian Oes 2017-02-15 18:41:15 +01:00 committed by Daniel Agar
parent 8c1e85a65f
commit 9369262e63
1 changed files with 3 additions and 1 deletions

View File

@ -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 */