1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-12 20:08:48 +01:00
LibrePilot/flight/OpenPilot/Modules/FlightPlan/lib/uavobjects.py

27 lines
472 B
Python
Raw Normal View History

"""__NATIVE__
#include "openpilot.h"
#include "flightplanstatus.h"
"""
def FlightPlanStatusUpdate(val):
"""__NATIVE__
pPmObj_t pobj;
FlightPlanStatusData status;
pobj = NATIVE_GET_LOCAL(0);
if ( OBJ_GET_TYPE(pobj) == OBJ_TYPE_INT )
status.Debug = ((pPmInt_t) pobj)->val;
else if ( OBJ_GET_TYPE(pobj) == OBJ_TYPE_FLT )
status.Debug = ((pPmFloat_t) pobj)->val;
FlightPlanStatusSet(&status);
return PM_RET_OK;
"""
pass