Skip to content

Commit

Permalink
uavobjectmanager: additional consting
Browse files Browse the repository at this point in the history
  • Loading branch information
mlyle committed May 20, 2018
1 parent 2eed4a0 commit b82a0e9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flight/UAVObjects/uavobjectmanager.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ struct UAVOMulti {
#define InstanceData(instance) (void*)instance

// Private functions
static int32_t sendEvent(struct UAVOBase * obj, uint16_t instId,
static int32_t sendEvent(struct UAVOBase *obj, uint16_t instId,
UAVObjEventType event, void *obj_data, int len);
static InstanceHandle createInstance(struct UAVOData * obj, uint16_t instId);
static InstanceHandle getInstance(struct UAVOData * obj, uint16_t instId);
Expand Down Expand Up @@ -1671,16 +1671,17 @@ void UAVObjIterate(void (*iterator) (UAVObjHandle obj))
}

/* type signature must match invokeCallback below, with 4 or fewer args */
static void __attribute__((used)) realInvokeCallback(struct ObjectEventEntry *event,
static void __attribute__((used)) realInvokeCallback(
const struct ObjectEventEntry *event,
const UAVObjEvent *msg, void *obj_data, int len);

static void realInvokeCallback(struct ObjectEventEntry *event,
static void realInvokeCallback(const struct ObjectEventEntry *event,
const UAVObjEvent *msg, void *obj_data, int len) {
event->cb(msg, event->cbInfo.cbCtx, obj_data, len);
}

#if (!defined(FLIGHT_POSIX)) && defined(__arm__)
static void invokeCallback(struct ObjectEventEntry *event,
static void invokeCallback(const struct ObjectEventEntry *event,
const UAVObjEvent *msg, void *obj_data, int len) {
/* If we're inlined, we need to force these to the right parameter
* slots. If we show up in a call they're already there. This
Expand Down

0 comments on commit b82a0e9

Please sign in to comment.