mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Merge branch 'master' into bugfix-flight
This commit is contained in:
commit
3d35e249c8
@ -88,7 +88,7 @@ int32_t AHRSCommsInitialize(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(AHRSCommsInitialize, 0, AHRSCommsStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(AHRSCommsInitialize, AHRSCommsStart)
|
||||
|
||||
/**
|
||||
* Module thread, should not return.
|
||||
|
@ -116,7 +116,7 @@ int32_t ActuatorInitialize()
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(ActuatorInitialize, 0, ActuatorStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(ActuatorInitialize, ActuatorStart)
|
||||
|
||||
/**
|
||||
* @brief Main Actuator module task
|
||||
|
@ -90,7 +90,7 @@ int32_t AltitudeInitialize()
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(AltitudeInitialize, 0, AltitudeStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(AltitudeInitialize, AltitudeStart)
|
||||
/**
|
||||
* Module thread, should not return.
|
||||
*/
|
||||
|
@ -147,7 +147,7 @@ int32_t AttitudeInitialize(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_INITCALL(AttitudeInitialize, 0, AttitudeStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(AttitudeInitialize, AttitudeStart)
|
||||
|
||||
/**
|
||||
* Module thread, should not return.
|
||||
|
@ -75,7 +75,8 @@ static void onTimer(UAVObjEvent* ev);
|
||||
* Initialise the module, called on startup
|
||||
* \returns 0 on success or -1 if initialisation failed
|
||||
*/
|
||||
MODULE_INITCALL(BatteryInitialize, 0, 0, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(BatteryInitialize, 0)
|
||||
|
||||
int32_t BatteryInitialize(void)
|
||||
{
|
||||
static UAVObjEvent ev;
|
||||
|
@ -59,4 +59,4 @@ void ExampleInitialize(void)
|
||||
{
|
||||
ExampleModEventInitialize();
|
||||
}
|
||||
MODULE_INITCALL(ExampleInitialize, 0, ExampleStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(ExampleInitialize, ExampleStart)
|
||||
|
@ -88,7 +88,7 @@ static void resetTask(UAVObjEvent *);
|
||||
* \note
|
||||
*
|
||||
*/
|
||||
MODULE_INITCALL(FirmwareIAPInitialize, 0, 0, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(FirmwareIAPInitialize, 0)
|
||||
int32_t FirmwareIAPInitialize()
|
||||
{
|
||||
const struct pios_board_info * bdinfo = &pios_board_info_blob;
|
||||
|
@ -86,7 +86,7 @@ int32_t FlightPlanInitialize()
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(FlightPlanInitialize, 0, FlightPlanStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(FlightPlanInitialize, FlightPlanStart)
|
||||
/**
|
||||
* Module task
|
||||
*/
|
||||
|
@ -129,7 +129,7 @@ int32_t GPSInitialize(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(GPSInitialize, 0, GPSStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(GPSInitialize, GPSStart)
|
||||
|
||||
// ****************
|
||||
/**
|
||||
|
@ -105,7 +105,7 @@ int32_t GuidanceInitialize()
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(GuidanceInitialize, 0, GuidanceStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(GuidanceInitialize, GuidanceStart)
|
||||
|
||||
static float northVelIntegral = 0;
|
||||
static float eastVelIntegral = 0;
|
||||
|
@ -112,7 +112,7 @@ int32_t ManualControlInitialize()
|
||||
|
||||
return 0;
|
||||
}
|
||||
MODULE_INITCALL(ManualControlInitialize, 0, ManualControlStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(ManualControlInitialize, ManualControlStart)
|
||||
|
||||
/**
|
||||
* Module task
|
||||
|
@ -129,7 +129,7 @@ int32_t StabilizationInitialize()
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_INITCALL(StabilizationInitialize, 0, StabilizationStart, 0, MODULE_EXEC_NOORDER_FLAG)
|
||||
MODULE_INITCALL(StabilizationInitialize, StabilizationStart)
|
||||
|
||||
/**
|
||||
* Module task
|
||||
|
@ -111,7 +111,7 @@ int32_t SystemModInitialize(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_INITCALL(SystemModInitialize, 0, 0, 0, MODULE_EXEC_FIRST_FLAG)
|
||||
MODULE_INITCALL(SystemModInitialize, 0)
|
||||
/**
|
||||
* System task, periodically executes every SYSTEM_UPDATE_PERIOD_MS
|
||||
*/
|
||||
|
@ -143,7 +143,7 @@ int32_t TelemetryInitialize(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
MODULE_INITCALL(TelemetryInitialize, 0, TelemetryStart, 0, MODULE_EXEC_LAST_FLAG)
|
||||
MODULE_INITCALL(TelemetryInitialize, TelemetryStart)
|
||||
|
||||
/**
|
||||
* Register a new object, adds object to local list and connects the queue depending on the object's
|
||||
|
@ -41,16 +41,10 @@
|
||||
/*
|
||||
* Used for initialization calls..
|
||||
*/
|
||||
#define MODULE_EXEC_NOORDER_FLAG 0xFA000000
|
||||
#define MODULE_EXEC_FIRST_FLAG 0xFA000001
|
||||
#define MODULE_EXEC_LAST_FLAG 0xFA000002
|
||||
|
||||
typedef int32_t (*initcall_t)(void);
|
||||
typedef struct {
|
||||
uint32_t flag;
|
||||
uint32_t param_minit;
|
||||
initcall_t fn_minit;
|
||||
uint32_t param_tinit;
|
||||
initcall_t fn_tinit;
|
||||
} initmodule_t;
|
||||
|
||||
@ -69,26 +63,20 @@ extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
||||
static initcall_t __initcall_##fn##id __attribute__((__used__)) \
|
||||
__attribute__((__section__(".initcall" level ".init"))) = fn
|
||||
|
||||
#define __define_module_initcall(level,ifn,iparam,sfn,sparam, param) \
|
||||
#define __define_module_initcall(level, ifn, sfn) \
|
||||
static initmodule_t __initcall_##fn __attribute__((__used__)) \
|
||||
__attribute__((__section__(".initcall" level ".init"))) = { .flag = param, .param_minit = iparam, .fn_minit = ifn, .param_tinit = sparam, .fn_tinit = sfn };
|
||||
__attribute__((__section__(".initcall" level ".init"))) = { .fn_minit = ifn, .fn_tinit = sfn };
|
||||
|
||||
#define UAVOBJ_INITCALL(fn) __define_initcall("uavobj",fn,1)
|
||||
#define MODULE_INITCALL(ifn, iparam, sfn, sparam, flags) __define_module_initcall("module", ifn, iparam, sfn, sparam, flags)
|
||||
#define MODULE_INITCALL(ifn, sfn) __define_module_initcall("module", ifn, sfn)
|
||||
|
||||
#define MODULE_INITIALISE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_FIRST_FLAG) == MODULE_EXEC_FIRST_FLAG) ) \
|
||||
(fn->fn_minit)(); \
|
||||
for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_minit && ( (fn->flag & (MODULE_EXEC_LAST_FLAG | MODULE_EXEC_FIRST_FLAG)) == MODULE_EXEC_NOORDER_FLAG) ) \
|
||||
(fn->fn_minit)(); \
|
||||
for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_minit && ( (fn->flag & MODULE_EXEC_LAST_FLAG) == MODULE_EXEC_LAST_FLAG) ) \
|
||||
(fn->fn_minit)(); }
|
||||
if (fn->fn_minit) \
|
||||
(fn->fn_minit)(); }
|
||||
|
||||
#define MODULE_TASKCREATE_ALL { for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) \
|
||||
if (fn->fn_tinit) \
|
||||
(fn->fn_tinit)(); }
|
||||
if (fn->fn_tinit) \
|
||||
(fn->fn_tinit)(); }
|
||||
|
||||
#endif /* PIOS_INITCALL_H */
|
||||
|
||||
|
Binary file not shown.
@ -3,7 +3,7 @@
|
||||
APP="${1?}"
|
||||
PLUGINS="${APP}/Contents/Plugins"
|
||||
OP_PLUGINS="${APP}/Contents/Plugins/OpenPilot"
|
||||
QT_LIBS="QtGui QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon"
|
||||
QT_LIBS="QtGui QtCore QtSvg QtSql QtOpenGL QtNetwork QtXml QtDBus QtScript phonon SDL"
|
||||
|
||||
echo "Processing Qt libraries in $1"
|
||||
macdeployqt "${APP}"
|
||||
@ -19,6 +19,7 @@ do
|
||||
done
|
||||
done
|
||||
|
||||
|
||||
# should be redundant but some libs missed by main app and macdeployqt
|
||||
for f in ${QT_LIBS}
|
||||
do
|
||||
|
Loading…
x
Reference in New Issue
Block a user