HMS Customization
Catalog
E_DjiHmsErrorLevel
T_DjiHmsFileBinaryArray
T_DjiHmsBinaryArrayConfig
DjiHmsCustomization_Init
DjiHmsCustomization_DeInit
DjiHmsCustomization_InjectHmsErrorCode
DjiHmsCustomization_EliminateHmsErrorCode
DjiHmsCustomization_RegDefaultHmsTextConfigByDirPath
DjiHmsCustomization_RegHmsTextConfigByDirPath
DjiHmsCustomization_RegDefaultHmsTextConfigByBinaryArray
DjiHmsCustomization_RegHmsTextConfigByBinaryArray
typedef enum {
DJI_HMS_ERROR_LEVEL_NONE = 0,
DJI_HMS_ERROR_LEVEL_HINT,
DJI_HMS_ERROR_LEVEL_WARN,
DJI_HMS_ERROR_LEVEL_CRITICAL,
DJI_HMS_ERROR_LEVEL_FATAL,
} E_DjiHmsErrorLevel;
typedef struct {
char *fileName; /*!< Specify the file name of the HMS text configuration file. */
uint32_t fileSize; /*!< Specify the file size of the HMS text configuration file. The unit is byte. */
const uint8_t *fileBinaryArray; /*!< Specify the binary C array of the HMS text configuration file. */
} T_DjiHmsFileBinaryArray;
typedef struct {
uint16_t binaryArrayCount; /*!< Count of binary array. */
T_DjiHmsFileBinaryArray *fileBinaryArrayList; /*!< Pointer to binary array list. */
} T_DjiHmsBinaryArrayConfig;
Function
Initialize the HMS customization module. Users should call this function before using the HMS customization feature.
T_DjiReturnCode DjiHmsCustomization_Init(void);
Return
For the details about the return code, refer to: DjiErrorCode
Deinitialize the HMS customization module.
T_DjiReturnCode DjiHmsCustomization_DeInit(void);
Return
For the details about the return code, refer to: DjiErrorCode
Inject custom HMS error code to the app.
Note: For the same HMS error code, a single call is sufficient. There is no need to call repeatedly.
T_DjiReturnCode DjiHmsCustomization_InjectHmsErrorCode(uint32_t errorCode, E_DjiHmsErrorLevel errorLevel);
errorCode HMS error code. Value range:[0x1E020000 ~ 0x1E02FFFF].
Return
For the details for the return code, refer to: DjiErrorCode
Clear custom HMS error code on the app.
Note: For the same HMS error code, a single call is sufficient. There is no need to call repeatedly.
T_DjiReturnCode DjiHmsCustomization_EliminateHmsErrorCode(uint32_t errorCode);
errorCode:HMS error code. Value range
Return
For the details about the return code, refer to: DjiErrorCode
Specify the directory path to register default HMS text configuration file.
T_DjiReturnCode DjiHmsCustomization_RegDefaultHmsTextConfigByDirPath(const char *configDirPath);
Return
For the details for the return code, refer to: DjiErrorCode
Specify the directory path to register HMS text configuration file.
Note: Different HMS text configurations for several languages require the same HMS configuration.
T_DjiReturnCode DjiHmsCustomization_RegHmsTextConfigByDirPath(E_DjiMobileAppLanguage appLanguage, const char *configDirPath);
Return
For the details about the return code, refer to: DjiErrorCode
Register default HMS text configuration by binary array.
Note: In RTOS, most likely there is no file system. The HMS text configuration file content can use binary C array. Use this function and DjiHMS_RegDefaultHMSTextConfigByBinaryArray to register the HMS text configuration. When a language is not covered in the setting from DjiHms_RegHmsTextConfigByBinaryArray, the HMS text configuration uses the setting from this function.
T_DjiReturnCode DjiHmsCustomization_RegDefaultHmsTextConfigByBinaryArray(const T_DjiHmsBinaryArrayConfig *binaryArrayConfig);
Return
For the details about the return code, refer to: DjiErrorCode
Register HMS text configuration by binary array.
Note: Different HMS text configurations for several languages require the same HMS configuration.
T_DjiReturnCode DjiHmsCustomization_RegHmsTextConfigByBinaryArray(E_DjiMobileAppLanguage appLanguage, const T_DjiHmsBinaryArrayConfig *binaryArrayConfig);
Return
For the details about the return code, refer to: DjiErrorCode