mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 05:23:33 +08:00
boards: add CONSTRAINED_MEMORY build option
- currently the main change is that it reduces the max number of ORB multi instances to 4, but usage will be expanded as needed - limits number of EKF2 multi instances to 2. - enabled on all cortex m4 boards
This commit is contained in:
committed by
Lorenz Meier
parent
834ac38841
commit
78dff6adcb
@@ -58,9 +58,13 @@ struct orb_metadata {
|
||||
typedef const struct orb_metadata *orb_id_t;
|
||||
|
||||
/**
|
||||
* Maximum number of multi topic instances
|
||||
* Maximum number of multi topic instances. This must be <= 10 (because it's the last char of the node path)
|
||||
*/
|
||||
#define ORB_MULTI_MAX_INSTANCES 10 // This must be <= 10 (because it's the last char of the node path)
|
||||
#if defined(CONSTRAINED_MEMORY)
|
||||
# define ORB_MULTI_MAX_INSTANCES 4
|
||||
#else
|
||||
# define ORB_MULTI_MAX_INSTANCES 10
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Generates a pointer to the uORB metadata structure for
|
||||
|
||||
@@ -727,12 +727,14 @@ int uORBTest::UnitTest::test_SubscriptionMulti()
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
#if ORB_MULTI_MAX_INSTANCES > 4
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
ORB_ID::orb_test,
|
||||
#endif
|
||||
};
|
||||
|
||||
uORB::SubscriptionMultiArray<orb_test_s> orb_test_sub_multi_array{ORB_ID::orb_test};
|
||||
|
||||
Reference in New Issue
Block a user