Browse Source

update protocol

change_pipette_api
zhaohe 1 year ago
parent
commit
e1bab29823
  1. 9
      api/apibasic/cmdid.hpp
  2. 28
      api/apibasic/reg_index.hpp
  3. 38
      api/zi_a8000_optical_module.hpp

9
api/apibasic/cmdid.hpp

@ -51,6 +51,15 @@ typedef enum {
ka8000_optical_start_capture = CMDID(6, 8), // para:{n/a}
ka8000_optical_read_raw = CMDID(6, 9), // para:{index,size}
ka8k_opt_v2_t_start_scan = CMDID(7, 0), //(int32_t scanDirection, int32_t lasterGain,int32_t scanGain)
ka8k_opt_v2_f_start_scan = CMDID(7, 0), //(int32_t scanDirection, int32_t lasterGain,int32_t scanGain)
ka8k_opt_v2_t_open_laster = CMDID(7, 10), //(int32_t lasterGain,int32_t scanGain) for_debug
ka8k_opt_v2_t_close_laster = CMDID(7, 11), //() for_debug
ka8k_opt_v2_t_readVal = CMDID(7, 12), //(int32_t *val0,int32_t *val1) for_debug
ka8k_opt_v2_f_open_laster = CMDID(7, 13), //(int32_t lasterGain,int32_t scanGain) for_debug
ka8k_opt_v2_f_close_laster = CMDID(7, 14), //() for_debug
ka8k_opt_v2_f_readVal = CMDID(7, 15), //(int32_t *val0,int32_t *val1) for_debug
/***********************************************************************************************************************
* STEP_MOTOR *
***********************************************************************************************************************/

28
api/apibasic/reg_index.hpp

@ -105,6 +105,30 @@ typedef enum {
kreg_laster_scaner_raw_sector_size = REG_INDEX(44, 0, 1),
kreg_laster_scaner_raw_sector_num = REG_INDEX(44, 0, 2),
/**
* @brief
*
* ------------------------------------------------------
*
*
* :F光学向左扫描的起始位置
* :1:-1
* :1200
* :1
*
* :(1200)
*
*
*/
// 坐标参数
kreg_a8k_opt_t_pos_offset = REG_INDEX(44, 0, 1), // T光学正向扫描,扫描起始位距离零点的偏移
kreg_a8k_opt_f_pos_offset = REG_INDEX(44, 0, 2), // F光学正向扫描,扫描起始位距离零点的偏移
kreg_a8k_opt_scan_step_interval = REG_INDEX(44, 0, 3), // 参数固定:为1
kreg_a8k_opt_scan_pointnum = REG_INDEX(44, 0, 4), // 参数固定:为1200个点
//
/***********************************************************************************************************************
* XYROBOT *
***********************************************************************************************************************/
@ -144,8 +168,8 @@ typedef enum {
/***********************************************************************************************************************
* step_motor *
***********************************************************************************************************************/
kreg_step_motor_pos = REG_INDEX(101, 0, 1), // 机器人x坐标
kreg_step_motor_dpos = REG_INDEX(101, 0, 3), // 执行完上一条指令后的相对位移
kreg_step_motor_pos = REG_INDEX(101, 0, 1), // 机器人x坐标
kreg_step_motor_dpos = REG_INDEX(101, 0, 3), // 执行完上一条指令后的相对位移
kreg_step_motor_shift = REG_INDEX(101, 50, 0), // x偏移
kreg_step_motor_shaft = REG_INDEX(101, 50, 1), // x轴是否反转

38
api/zi_a8000_optical_module.hpp

@ -17,8 +17,8 @@ class ZIA8000OpticalModule {
public:
virtual ~ZIA8000OpticalModule(){};
virtual int32_t a8000_optical_start_capture() = 0;
virtual int32_t a8000_optical_read_raw(int32_t index, uint8_t* data, int32_t* len) = 0;
virtual int32_t a8000_optical_start_capture() { return err::kcmd_not_support; }
virtual int32_t a8000_optical_read_raw(int32_t index, uint8_t* data, int32_t* len) { return err::kcmd_not_support; }
/*******************************************************************************
* TEST *
@ -28,20 +28,26 @@ class ZIA8000OpticalModule {
* 1.
* 2. 使
*/
virtual int32_t a8000_optical_module_power_ctrl(int32_t state) = 0;
virtual int32_t a8000_optical_open_laser(int32_t type) = 0;
virtual int32_t a8000_optical_close_laser(int32_t type) = 0;
virtual int32_t a8000_optical_set_laster_gain(int32_t type, int32_t gain) = 0;
virtual int32_t a8000_optical_set_scan_amp_gain(int32_t type, int32_t gain) = 0;
virtual int32_t a8000_optical_read_scanner_adc_val(int32_t type, int32_t* adcval) = 0;
virtual int32_t a8000_optical_read_laster_adc_val(int32_t type, int32_t* adcval) = 0;
/**
* @brief
*
* @param type
* @param adcval
* @return int32_t
*/
virtual int32_t a8000_optical_module_power_ctrl(int32_t state) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_open_laser(int32_t type) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_close_laser(int32_t type) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_set_laster_gain(int32_t type, int32_t gain) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_set_scan_amp_gain(int32_t type, int32_t gain) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_read_scanner_adc_val(int32_t type, int32_t* adcval) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_read_laster_adc_val(int32_t type, int32_t* adcval) { return err::kcmd_not_support; }
virtual int32_t a8000_optical_scan_current_point_amp_adc_val(int32_t type, int32_t lastergain, int32_t ampgain, int32_t* laster_fb_val, int32_t* adcval) { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_t_start_scan(int32_t scanDirection, int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_f_start_scan(int32_t scanDirection, int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_t_open_laster(int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_t_close_laster() { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_t_readVal(int32_t* lasteradc, int32_t* scanadc) { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_f_open_laster(int32_t lasterGain, int32_t scanGain) { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_f_close_laster() { return err::kcmd_not_support; }
virtual int32_t a8k_opt_v2_f_readVal(int32_t* lasteradc, int32_t* scanadc) { return err::kcmd_not_support; }
};
} // namespace iflytop
Loading…
Cancel
Save