Power Management
The header file of PSDK power management related functions is dji_power_management.h
. This document describes the key information and usage of the structure and function prototypes in the dji_power_management.h
file.
Catalog
Definition, Enum and Struct
E_DjiPowerManagementPinState
DjiWriteHighPowerApplyPinCallback
DjiPowerOffNotificationCallbackFunction
DjiPowerManagement_Init
DjiPowerManagement_ApplyHighPowerSync
DjiPowerManagement_RegWriteHighPowerApplyPinCallback
DjiPowerManagement_RegPowerOffNotificationCallback
Definition, Enum and Struct
typedef enum E_DjiPowerManagementPinState
typedef enum {
DJI_POWER_MANAGEMENT_PIN_STATE_RESET = 0, /*!< Specifies pin is in low level state. */
DJI_POWER_MANAGEMENT_PIN_STATE_SET = 1, /*!< Specifies pin is in high level state. */
} E_DjiPowerManagementPinState;
typedef function DjiWriteHighPowerApplyPinCallback
Function:Prototype of callback function used to set level of high power application pin. | product:all |
typedef T_DjiReturnCode (*DjiWriteHighPowerApplyPinCallback)(E_DjiPowerManagementPinState pinState);
pinState:level state of pin to be set.
Return
The details for the return code please refer to: DjiErrorCode
typedef function DjiPowerOffNotificationCallback
Function:Prototype of callback function used to notify payload that the aircraft will power off soon and get state whether the payload is ready to power off or not. | product:all |
typedef T_DjiReturnCode (*DjiPowerOffNotificationCallback)(bool *powerOffPreparationFlag);
powerOffPreparationFlag:pointer to memory space used to store power off preparation flag. True represents that payload has completed all work and is ready to power off. False represents that payload is not ready to power off.
Return
The details for the return code please refer to: DjiErrorCode
Function
function DjiPowerManagement_Init
Function:Initialise power management module, and user should call this function before using power management features. | product:all |
T_DjiReturnCode DjiPowerManagement_Init(void);
Return
The details for the return code please refer to: DjiErrorCode
function DjiPowerManagement_ApplyHighPowerSync
Function:Apply high power from aircraft in blocking mode. | product:all |
T_DjiReturnCode DjiPowerManagement_ApplyHighPowerSync(void);
Return
The details for the return code please refer to: DjiErrorCode
function DjiPowerManagement_RegWriteHighPowerApplyPinCallback
Function:Register callback function used to set level state of high power application pin. Must be called before applying high power. | product:all |
T_DjiReturnCode DjiPowerManagement_RegWriteHighPowerApplyPinCallback(DjiWriteHighPowerApplyPinCallback callback);
callback:pointer to the callback function.
Return
The details for the return code please refer to: DjiErrorCode
function DjiPowerManagement_RegPowerOffNotificationCallback
Function:Register callback function used to notify payload that the aircraft will power off soon and get state whether the payload is ready to power off or not. | product:all |
T_DjiReturnCode DjiPowerManagement_RegPowerOffNotificationCallback(DjiPowerOffNotificationCallback callback);
callback:pointer to callback function used to notify aircraft power off message and get payload power off preparation flag.
Return
The details for the return code please refer to: DjiErrorCode