mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Initialize objects for guidance in the correct place. Init some objects in
pios_board_posix since AHRSComms not around.
This commit is contained in:
parent
ced29e221e
commit
ab7e57ad2b
@ -73,11 +73,7 @@ static void ahrscommsTask(void *parameters);
|
|||||||
*/
|
*/
|
||||||
int32_t AHRSCommsStart(void)
|
int32_t AHRSCommsStart(void)
|
||||||
{
|
{
|
||||||
// Start main task
|
// Start main task
|
||||||
AhrsStatusInitialize();
|
|
||||||
AHRSCalibrationInitialize();
|
|
||||||
AttitudeRawInitialize();
|
|
||||||
|
|
||||||
xTaskCreate(ahrscommsTask, (signed char *)"AHRSComms", STACK_SIZE, NULL, TASK_PRIORITY, &taskHandle);
|
xTaskCreate(ahrscommsTask, (signed char *)"AHRSComms", STACK_SIZE, NULL, TASK_PRIORITY, &taskHandle);
|
||||||
TaskMonitorAdd(TASKINFO_RUNNING_AHRSCOMMS, taskHandle);
|
TaskMonitorAdd(TASKINFO_RUNNING_AHRSCOMMS, taskHandle);
|
||||||
PIOS_WDG_RegisterFlag(PIOS_WDG_AHRS);
|
PIOS_WDG_RegisterFlag(PIOS_WDG_AHRS);
|
||||||
@ -91,6 +87,11 @@ int32_t AHRSCommsStart(void)
|
|||||||
*/
|
*/
|
||||||
int32_t AHRSCommsInitialize(void)
|
int32_t AHRSCommsInitialize(void)
|
||||||
{
|
{
|
||||||
|
AhrsStatusInitialize();
|
||||||
|
AHRSCalibrationInitialize();
|
||||||
|
AttitudeRawInitialize();
|
||||||
|
VelocityActualInitialize();
|
||||||
|
PositionActualInitialize();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,11 @@ int32_t FlightPlanStart()
|
|||||||
int32_t FlightPlanInitialize()
|
int32_t FlightPlanInitialize()
|
||||||
{
|
{
|
||||||
taskHandle = NULL;
|
taskHandle = NULL;
|
||||||
|
|
||||||
|
FlightPlanStatusInitialize();
|
||||||
|
FlightPlanControlInitialize();
|
||||||
|
FlightPlanSettingsInitialize();
|
||||||
|
|
||||||
// Listen for object updates
|
// Listen for object updates
|
||||||
FlightPlanControlConnectCallback(&objectUpdatedCb);
|
FlightPlanControlConnectCallback(&objectUpdatedCb);
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ int32_t GPSInitialize(void)
|
|||||||
GPSPositionInitialize();
|
GPSPositionInitialize();
|
||||||
GPSTimeInitialize();
|
GPSTimeInitialize();
|
||||||
HomeLocationInitialize();
|
HomeLocationInitialize();
|
||||||
|
|
||||||
// TODO: Get gps settings object
|
// TODO: Get gps settings object
|
||||||
gpsPort = PIOS_COM_GPS;
|
gpsPort = PIOS_COM_GPS;
|
||||||
|
|
||||||
|
@ -97,6 +97,14 @@ int32_t GuidanceStart()
|
|||||||
*/
|
*/
|
||||||
int32_t GuidanceInitialize()
|
int32_t GuidanceInitialize()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
GuidanceSettingsInitialize();
|
||||||
|
PositionDesiredInitialize();
|
||||||
|
ManualControlCommandInitialize();
|
||||||
|
FlightStatusInitialize();
|
||||||
|
NedAccelInitialize();
|
||||||
|
VelocityDesiredInitialize();
|
||||||
|
|
||||||
// Create object queue
|
// Create object queue
|
||||||
queue = xQueueCreate(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));
|
queue = xQueueCreate(MAX_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||||
|
|
||||||
|
@ -29,6 +29,10 @@
|
|||||||
#include <openpilot.h>
|
#include <openpilot.h>
|
||||||
#include <uavobjectsinit.h>
|
#include <uavobjectsinit.h>
|
||||||
|
|
||||||
|
#include "attituderaw.h"
|
||||||
|
#include "positionactual.h"
|
||||||
|
#include "velocityactual.h"
|
||||||
|
|
||||||
#include "pios_rcvr_priv.h"
|
#include "pios_rcvr_priv.h"
|
||||||
|
|
||||||
struct pios_rcvr_channel_map pios_rcvr_channel_to_id_map[PIOS_RCVR_MAX_CHANNELS];
|
struct pios_rcvr_channel_map pios_rcvr_channel_to_id_map[PIOS_RCVR_MAX_CHANNELS];
|
||||||
@ -171,6 +175,10 @@ void PIOS_Board_Init(void) {
|
|||||||
#endif /* PIOS_INCLUDE_GPS */
|
#endif /* PIOS_INCLUDE_GPS */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Initialize these here as posix has no AHRSComms
|
||||||
|
AttitudeRawInitialize();
|
||||||
|
VelocityActualInitialize();
|
||||||
|
PositionActualInitialize();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user