Browse Source

update

master
zhaohe 2 years ago
parent
commit
04e23bac5f
  1. 110
      README.md
  2. 2
      sdk
  3. 5
      usrc/device.cpp

110
README.md

@ -7,3 +7,113 @@
git submodule update --init --recursive
```
```
# 测试指令
a8000_optical_close_laser (mid,type)
a8000_optical_module_power_ctrl (mid,state)
a8000_optical_open_laser (mid,type)
a8000_optical_read_laster_adc_val (type,mid)
a8000_optical_read_scanner_adc_val (type,mid)
a8000_optical_scan_current_point_amp_adc_val (type,mid,lastergain,ampgain)
a8000_optical_set_laster_gain (type,mid,gain)
a8000_optical_set_scan_amp_gain (type,mid,gain)
app_dump_reg (mid,regindex)
app_dump_regs (mid)
app_module_read_raw_str (mid,size)
app_scanmodule ()
app_wait_for_module (mid,timeout)
blower_set_val (bool on)
dumpreg (mid)
line_locking_solenoid_valve (bool on)
module_active_cfg (mid)
module_break (mid)
module_clear_error (mid)
module_enable (mid, enable)
module_factory_reset (mid)
module_flush_cfg (mid)
module_get_error (mid)
module_get_inited_flag (mid)
module_get_last_exec_status (mid)
module_get_reg (mid, param_id)
module_get_status (mid)
module_ping (mid)
module_read_adc (mid,adc_id, adcindex)
module_read_raw (mid, startindex)
module_readio (mid)
module_set_inited_flag (mid, flag)
module_set_reg (mid, param_id, param_value)
module_start (mid)
module_stop (mid)
module_writeio (mid,ioindex,io)
motor_calculated_pos_by_move_to_zero (mid)
motor_easy_move_by (mid, distance)
motor_easy_move_to (mid, position)
motor_easy_move_to_io (mid, ioindex, direction)
motor_easy_move_to_zero (mid, direction)
motor_easy_rotate (mid, direction)
motor_easy_set_current_pos (mid, pos)
motor_enable (mid, enable)
motor_move_by (mid, distance, motor_velocity, acc)
motor_move_by_acctime (mid, distance, motor_velocity, acctime)
motor_move_to (mid, position, motor_velocity, acc)
motor_move_to_acctime (mid, position, motor_velocity, acctime)
motor_move_to_torque (mid, pos, torque, overtime)
motor_move_to_zero_backward (mid, findzerospeed, findzeroedge_speed, acc, overtime)
motor_move_to_zero_backward_and_calculated_shift (mid, findzerospeed, findzeroedge_speed, acc, overtime)
motor_move_to_zero_forward (mid, findzerospeed, findzeroedge_speed, acc, overtime)
motor_move_to_zero_forward_and_calculated_shift (mid, findzerospeed, findzeroedge_speed, acc, overtime)
motor_read_pos (mid)
motor_rotate (mid, direction, motor_velocity, acc)
motor_rotate_acctime (mid, direction, motor_velocity, acctime)
motor_rotate_with_torque (mid, pos, torque)
motor_set_current_pos_by_change_shift (mid, pos)
pipette_ctrl_init_device (mid)
pipette_ctrl_move_to_ul (mid, ul)
pipette_ctrl_put_tip (mid)
scanmodule ()
sleep_ms (ms)
xymotor_calculated_pos_by_move_to_zero (mid)
xymotor_enable (mid, enable)
xymotor_move_by (mid, dx, dy, motor_velocity)
xymotor_move_to (mid, x, y, motor_velocity)
xymotor_move_to_zero (mid)
xymotor_move_to_zero_and_calculated_shift (mid)
xymotor_read_pos (mid)
# 舵机控制
电机移动: motor_easy_move_to(id,pos)
电机使能: motor_enable(id,enable)
读取位置: module_get_reg(id,1001)
设置扭矩: module_set_reg(id,1077)
读取扭矩: module_get_reg(id,1077)
# 电机控制
电机归零: motor_easy_move_to_zero(id,-1);
电机移动: motor_easy_move_to(id,pos)
电机使能: motor_enable(id,enable)
读取位置: module_get_reg(id,1001)
# XY控制
使能: xymotor_enable(id,enable)
归零: xymotor_move_to_zero(id)
移动: xymotor_move_to(id,x,y,velocity)
通过归零获取当前位置: xymotor_calculated_pos_by_move_to_zero(mid)
# 主轴控制
电机使能: motor_enable(id,enable)
电机正转: motor_easy_rotate (id, 1)
电机反转: motor_easy_rotate (id, -1)
电机停止: module_stop(id,pos)
# 继电器控制
blower_set_val (bool on)
line_locking_solenoid_valve (bool on)
# 延时
sleep_ms (ms)
# 等待动作完成
app_wait_for_module (mid,timeout)
```

2
sdk

@ -1 +1 @@
Subproject commit c754d770814e82b81340d943a3383fb81719a6fa
Subproject commit e0f845bbbd3c31562357b7423a58682ab373c406

5
usrc/device.cpp

@ -34,6 +34,10 @@ void Device::init() {
init_dm();
init_bus();
sub_module_init();
blower_init();
line_locking_solenoid_valve_init();
ZLOGI(TAG, "init end...");
}
@ -109,6 +113,7 @@ void Device::sub_module_init() {
int idnum = 10 + i;
ZLOGI(TAG, "init servo:%d", idnum);
mini_servo[i].initialize(idnum, &m_feitebus, idnum, &servo_cfg);
mini_servo[i].enable(false);
m_device_manager.registerModule(&mini_servo[i]);
}
/**

Loading…
Cancel
Save