mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-13 19:40:19 +08:00
Update sdk version to v2.2.7
This commit is contained in:
@@ -77,6 +77,7 @@ OB_EXPORT ob_device *ob_create_net_device(ob_context *context, const char *addre
|
||||
/**
|
||||
* @brief Set a device plug-in callback function
|
||||
* @attention The added and removed device lists returned through the callback interface need to be released manually
|
||||
* @attention This function supports multiple callbacks. Each call to this function adds a new callback to an internal list.
|
||||
*
|
||||
* @param[in] context Pointer to the context object
|
||||
* @param[in] callback Pointer to the callback function triggered when a device is plugged or unplugged
|
||||
|
||||
@@ -241,6 +241,19 @@ OB_EXPORT void ob_device_update_firmware(ob_device *device, const char *path, ob
|
||||
OB_EXPORT void ob_device_update_firmware_from_data(ob_device *device, const uint8_t *data, uint32_t data_size, ob_device_fw_update_callback callback,
|
||||
bool async, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Update the device optional depth presets.
|
||||
*
|
||||
* @param[in] device The device object.
|
||||
* @param[in] file_path_list A list(2D array) of preset file paths, each up to OB_PATH_MAX characters.
|
||||
* @param[in] path_count The number of the preset file paths.
|
||||
* @param[in] callback The preset upgrade progress callback.
|
||||
* @param[in] user_data User-defined data that will be returned in the callback.
|
||||
* @param[out] error Pointer to an error object that will be set if an error occurs.
|
||||
*/
|
||||
OB_EXPORT void ob_device_update_optional_depth_presets(ob_device *device, const char file_path_list[][OB_PATH_MAX], uint8_t path_count,
|
||||
ob_device_fw_update_callback callback, void *user_data, ob_error **error);
|
||||
|
||||
/**
|
||||
* @brief Device reboot
|
||||
* @attention The device will be disconnected and reconnected. After the device is disconnected, the interface access to the device handle may be abnormal.
|
||||
|
||||
@@ -629,7 +629,7 @@ OB_EXPORT void ob_frameset_push_frame(ob_frame *frameset, const ob_frame *frame,
|
||||
#define ob_gyro_frame_temperature ob_gyro_frame_get_temperature
|
||||
#define ob_frameset_get_frame_count ob_frameset_get_count
|
||||
|
||||
#define ob_frame_time_stamp(frame, err) (ob_frame_get_timestamp_us(frame, err))
|
||||
#define ob_frame_time_stamp(frame, err) (ob_frame_get_timestamp_us(frame, err) / 1000)
|
||||
#define ob_frame_system_time_stamp(frame, err) (ob_frame_get_system_timestamp_us(frame, err))
|
||||
#define ob_frame_set_system_time_stamp(frame, system_timestamp, err) (ob_frame_set_system_timestamp_us(frame, system_timestamp * 1000, err))
|
||||
#define ob_frame_set_device_time_stamp(frame, device_timestamp, err) (ob_frame_set_timestamp_us(frame, device_timestamp * 1000, err))
|
||||
@@ -637,4 +637,3 @@ OB_EXPORT void ob_frameset_push_frame(ob_frame *frameset, const ob_frame *frame,
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -49,6 +49,11 @@ typedef struct ob_device_frame_interleave_list_t ob_device_frame_interleave_list
|
||||
#define OB_GYRO_FULL_SCALE_RANGE_ANY OB_GYRO_FS_UNKNOWN
|
||||
#define OB_GYRO_SAMPLE_RATE_ANY OB_SAMPLE_RATE_UNKNOWN
|
||||
|
||||
/**
|
||||
* @brief maximum path length
|
||||
*/
|
||||
#define OB_PATH_MAX (1024)
|
||||
|
||||
/**
|
||||
* @brief the permission type of api or property
|
||||
*/
|
||||
@@ -238,22 +243,24 @@ typedef enum {
|
||||
* @brief Enumeration value describing the firmware upgrade status
|
||||
*/
|
||||
typedef enum {
|
||||
STAT_VERIFY_SUCCESS = 5, /**< Image file verifify success */
|
||||
STAT_FILE_TRANSFER = 4, /**< file transfer */
|
||||
STAT_DONE = 3, /**< update completed */
|
||||
STAT_IN_PROGRESS = 2, /**< upgrade in process */
|
||||
STAT_START = 1, /**< start the upgrade */
|
||||
STAT_VERIFY_IMAGE = 0, /**< Image file verification */
|
||||
ERR_VERIFY = -1, /**< Verification failed */
|
||||
ERR_PROGRAM = -2, /**< Program execution failed */
|
||||
ERR_ERASE = -3, /**< Flash parameter failed */
|
||||
ERR_FLASH_TYPE = -4, /**< Flash type error */
|
||||
ERR_IMAGE_SIZE = -5, /**< Image file size error */
|
||||
ERR_OTHER = -6, /**< other errors */
|
||||
ERR_DDR = -7, /**< DDR access error */
|
||||
ERR_TIMEOUT = -8, /**< timeout error */
|
||||
ERR_MISMATCH = -9, /**< Mismatch firmware error */
|
||||
ERR_UNSUPPORT_DEV = -10, /**< Unsupported device error */
|
||||
STAT_DONE_WITH_DUPLICATES = 6, /**< update completed, but some files were duplicated and ignored */
|
||||
STAT_VERIFY_SUCCESS = 5, /**< Image file verifify success */
|
||||
STAT_FILE_TRANSFER = 4, /**< file transfer */
|
||||
STAT_DONE = 3, /**< update completed */
|
||||
STAT_IN_PROGRESS = 2, /**< upgrade in process */
|
||||
STAT_START = 1, /**< start the upgrade */
|
||||
STAT_VERIFY_IMAGE = 0, /**< Image file verification */
|
||||
ERR_VERIFY = -1, /**< Verification failed */
|
||||
ERR_PROGRAM = -2, /**< Program execution failed */
|
||||
ERR_ERASE = -3, /**< Flash parameter failed */
|
||||
ERR_FLASH_TYPE = -4, /**< Flash type error */
|
||||
ERR_IMAGE_SIZE = -5, /**< Image file size error */
|
||||
ERR_OTHER = -6, /**< other errors */
|
||||
ERR_DDR = -7, /**< DDR access error */
|
||||
ERR_TIMEOUT = -8, /**< timeout error */
|
||||
ERR_MISMATCH = -9, /**< Mismatch firmware error */
|
||||
ERR_UNSUPPORT_DEV = -10, /**< Unsupported device error */
|
||||
ERR_INVALID_COUNT = -11, /**< invalid firmware/preset count */
|
||||
} OBUpgradeState,
|
||||
OBFwUpdateState, ob_upgrade_state, ob_fw_update_state;
|
||||
|
||||
@@ -927,6 +934,16 @@ typedef struct {
|
||||
uint16_t deviceId;
|
||||
|
||||
} OBDeviceSyncConfig, ob_device_sync_config, OB_DEVICE_SYNC_CONFIG;
|
||||
|
||||
/**
|
||||
* @brief Preset tag
|
||||
*/
|
||||
typedef enum {
|
||||
OB_DEVICE_DEPTH_WORK_MODE = 0,
|
||||
OB_CUSTOM_DEPTH_WORK_MODE = 1,
|
||||
} OBDepthWorkModeTag,
|
||||
ob_depth_work_mode_tag;
|
||||
|
||||
/**
|
||||
* @brief Depth work mode
|
||||
*/
|
||||
@@ -940,6 +957,11 @@ typedef struct {
|
||||
* @brief Name of work mode
|
||||
*/
|
||||
char name[32];
|
||||
/**
|
||||
* @brief Preset tag
|
||||
*/
|
||||
OBDepthWorkModeTag tag;
|
||||
|
||||
} OBDepthWorkMode, ob_depth_work_mode;
|
||||
|
||||
/**
|
||||
@@ -1426,11 +1448,11 @@ typedef struct {
|
||||
/**
|
||||
* @brief Disparity offset interleaving configuration
|
||||
*/
|
||||
typedef struct{
|
||||
uint8_t enable;
|
||||
uint8_t offset0;
|
||||
uint8_t offset1;
|
||||
uint8_t reserved;
|
||||
typedef struct {
|
||||
uint8_t enable;
|
||||
uint8_t offset0;
|
||||
uint8_t offset1;
|
||||
uint8_t reserved;
|
||||
} OBDispOffsetConfig, ob_disp_offset_config;
|
||||
|
||||
/**
|
||||
|
||||
@@ -584,11 +584,11 @@ typedef enum {
|
||||
* @brief ASIC serial number
|
||||
*/
|
||||
OB_STRUCT_ASIC_SERIAL_NUMBER = 1063,
|
||||
|
||||
|
||||
/**
|
||||
* @brief Disparity offset interleaving
|
||||
*/
|
||||
OB_STRUCT_DISP_OFFSET_CONFIG = 1064,
|
||||
OB_STRUCT_DISP_OFFSET_CONFIG = 1064,
|
||||
|
||||
/**
|
||||
* @brief Color camera auto exposure
|
||||
@@ -749,6 +749,10 @@ typedef enum {
|
||||
* @brief Color camera FOCUS
|
||||
*/
|
||||
OB_PROP_COLOR_FOCUS_INT = 2038,
|
||||
/**
|
||||
* @brief ir rectify status,true: ir rectify, false: no rectify
|
||||
*/
|
||||
OB_PROP_IR_RECTIFY_BOOL = 2040,
|
||||
|
||||
/**
|
||||
* @brief Depth camera priority
|
||||
|
||||
@@ -113,6 +113,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Set the device plug-in callback function.
|
||||
* @attention This function supports multiple callbacks. Each call to this function adds a new callback to an internal list.
|
||||
*
|
||||
* @param callback The function triggered when the device is plugged and unplugged.
|
||||
*/
|
||||
|
||||
@@ -383,6 +383,20 @@ public:
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update the device optional depth presets
|
||||
*
|
||||
* @param filePathList A list(2D array) of preset file paths, each up to OB_PATH_MAX characters.
|
||||
* @param pathCount The number of the preset file paths.
|
||||
* @param callback Preset update progress and status callback
|
||||
*/
|
||||
void updateOptionalDepthPresets(const char filePathList[][OB_PATH_MAX], uint8_t pathCount, DeviceFwUpdateCallback callback) {
|
||||
ob_error *error = nullptr;
|
||||
fwUpdateCallback_ = callback;
|
||||
ob_device_update_optional_depth_presets(impl_, filePathList, pathCount, &Device::firmwareUpdateCallback, this, &error);
|
||||
Error::handle(&error);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Set the device state changed callbacks
|
||||
*
|
||||
|
||||
@@ -957,7 +957,9 @@ private:
|
||||
|
||||
static void BufferDestroy(uint8_t *buffer, void *context) {
|
||||
auto *ctx = static_cast<BufferDestroyContext *>(context);
|
||||
ctx->callback(buffer);
|
||||
if (ctx->callback) {
|
||||
ctx->callback(buffer);
|
||||
}
|
||||
delete ctx;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user