1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
LibrePilot/flight/Modules/FlightPlan/lib/uavobjects.py

28 lines
479 B
Python
Raw Normal View History

"""__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