mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-10 18:24:11 +01:00
d7fd8a3bcd
A test script is statically linked (will eventually be uploaded by the GCS and stored in the VM), it can be found under: Modules/FlightPlan/flightplans/test.py To start the script send the FlightPlanControl object with the Start command, to stop send the Stop or Kill commands. Next release will be the OpenPilot python libraries and access to UAVObjects from the script. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2480 ebee16cc-31ac-478f-84a7-5cbb03baadba
28 lines
479 B
Python
28 lines
479 B
Python
"""__NATIVE__
|
|
#include "openpilot.h"
|
|
#include "flightplanstatus.h"
|
|
"""
|
|
|
|
def FlightPlanStatusUpdate(val):
|
|
"""__NATIVE__
|
|
pPmObj_t pobj;
|
|
FlightPlanStatusData status;
|
|
|
|
FlightPlanStatusGet(&status);
|
|
|
|
pobj = NATIVE_GET_LOCAL(0);
|
|
if ( OBJ_GET_TYPE(pobj) == OBJ_TYPE_INT )
|
|
status.Debug1 = ((pPmInt_t) pobj)->val;
|
|
else if ( OBJ_GET_TYPE(pobj) == OBJ_TYPE_FLT )
|
|
status.Debug1 = ((pPmFloat_t) pobj)->val;
|
|
|
|
FlightPlanStatusSet(&status);
|
|
|
|
return PM_RET_OK;
|
|
"""
|
|
pass
|
|
|
|
|
|
|
|
|