mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
Merge branch 'corvuscorax/OP-1298_metadata_fix' into next
This commit is contained in:
commit
c6b5011cec
@ -79,7 +79,6 @@ int32_t $(NAME)Initialize(void)
|
||||
void $(NAME)SetDefaults(UAVObjHandle obj, uint16_t instId)
|
||||
{
|
||||
$(NAME)Data data;
|
||||
UAVObjMetadata metadata;
|
||||
|
||||
// Initialize object fields to their default values
|
||||
UAVObjGetInstanceData(obj, instId, &data);
|
||||
@ -88,6 +87,8 @@ $(INITFIELDS)
|
||||
UAVObjSetInstanceData(obj, instId, &data);
|
||||
|
||||
// Initialize object metadata to their default values
|
||||
if ( instId == 0 ) {
|
||||
UAVObjMetadata metadata;
|
||||
metadata.flags =
|
||||
$(FLIGHTACCESS) << UAVOBJ_ACCESS_SHIFT |
|
||||
$(GCSACCESS) << UAVOBJ_GCS_ACCESS_SHIFT |
|
||||
@ -100,6 +101,7 @@ $(INITFIELDS)
|
||||
metadata.gcsTelemetryUpdatePeriod = $(GCSTELEM_UPDATEPERIOD);
|
||||
metadata.loggingUpdatePeriod = $(LOGGING_UPDATEPERIOD);
|
||||
UAVObjSetMetadata(obj, &metadata);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,14 +22,12 @@
|
||||
#include "sdlgamepad.h"
|
||||
|
||||
#include <SDL/SDL.h>
|
||||
//#undef main
|
||||
// #undef main
|
||||
|
||||
class SDLGamepadPrivate
|
||||
{
|
||||
class SDLGamepadPrivate {
|
||||
public:
|
||||
SDLGamepadPrivate() : gamepad(0)
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
/**
|
||||
* SDL_Joystick object.
|
||||
@ -37,7 +35,6 @@ public:
|
||||
* This represents the currently opened SDL_Joystick object.
|
||||
*/
|
||||
SDL_Joystick *gamepad;
|
||||
|
||||
};
|
||||
|
||||
/**********************************************************************/
|
||||
|
Loading…
x
Reference in New Issue
Block a user