From 03a8bd76741ca139be2a62f7509bbde9fcb0e861 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Fri, 19 Aug 2011 10:12:39 -0500 Subject: [PATCH] Statically initialize object handles to null to make sure the uavobjectmanager can catch it and return -1. Do NOT panic when they are null as this is something that should be caugth at run time in some cases. Ideally as a compromise in a task start it could have a set of PIOS_Assert(ObjectNameHandle()) to make sure the minimal set of objects it needs are there. --- flight/UAVObjects/uavobjecttemplate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flight/UAVObjects/uavobjecttemplate.c b/flight/UAVObjects/uavobjecttemplate.c index 019b282fe..6d572dbcb 100644 --- a/flight/UAVObjects/uavobjecttemplate.c +++ b/flight/UAVObjects/uavobjecttemplate.c @@ -40,7 +40,7 @@ #include "$(NAMELC).h" // Private variables -static UAVObjHandle handle; +static UAVObjHandle handle = NULL; /** * Initialize object.