Browse Source

add cmder paser

master
zhaohe 2 years ago
parent
commit
527ed7e467
  1. 363
      components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp
  2. 7
      components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.hpp
  3. 2
      components/zprotocols/zcancmder_v2

363
components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.cpp

@ -83,10 +83,12 @@ void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int32_t paramN, con
void MicroComputerModuleDeviceScriptCmderPaser::app_set_reg(int32_t paramN, const char* paraV[], ICmdParserACK* ack) { void MicroComputerModuleDeviceScriptCmderPaser::app_set_reg(int32_t paramN, const char* paraV[], ICmdParserACK* ack) {
ack->ecode = 0; ack->ecode = 0;
uint16_t regid = atoi(paraV[0]);
uint16_t regid = iflytop::str_to_reg_index(paraV[0]);
uint16_t moduleId = atoi(paraV[1]); uint16_t moduleId = atoi(paraV[1]);
uint16_t regval = atoi(paraV[2]); uint16_t regval = atoi(paraV[2]);
ack->ecode = m_deviceManager->module_set_reg(moduleId, regid, regval);
ZLOGI(TAG, "module_set_reg %d %d %d", moduleId, regid, regval);
ack->ecode = m_deviceManager->module_set_reg(moduleId, regid, regval);
m_deviceManager->module_active_cfg(moduleId);
return; return;
} }
@ -100,335 +102,54 @@ void MicroComputerModuleDeviceScriptCmderPaser::app_module_read_raw_str(int32_t
return; return;
} }
void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int32_t moduleId, int32_t regid) {
#define DUMP_CONFIG(tag, configid) \
if (regid == 0 || regid == configid) { \
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval); \
if (ecode == 0) { \
ZLOGI(TAG, "%s(%d) :%d", tag, configid, configval); \
} else if (ecode != err::kmodule_not_find_config_index) { \
ZLOGI(TAG, "%s(%d) :read_error %s(%d)", tag, configid, err::error2str(ecode), ecode); \
} \
}
#define DUMP_CONFIG_BIT(tag, configid) \
if (regid == 0 || regid == configid) { \
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval); \
if (ecode == 0) { \
ZLOGI(TAG, "%s(%d) :%s", tag, configid, dumpbit(configval)); \
} else if (ecode != err::kmodule_not_find_config_index) { \
ZLOGI(TAG, "%s(%d) :read_error %s(%d)", tag, configid, err::error2str(ecode), ecode); \
} \
void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int moduleId, const char* configtag, int configid, dump_type_t type) {
int32_t configval = 0;
int32_t ecode = 0;
ecode = m_deviceManager->module_get_reg(moduleId, configid, &configval);
if (ecode == 0) {
if (type == kint) {
ZLOGI(TAG, "%s(%d) :%d", configtag, configid, configval);
} else if (type == kint) {
ZLOGI(TAG, "%s(%d) :%s", configtag, configid, dumpbit(configval));
}
} else if (ecode != err::kmodule_not_find_config_index) {
ZLOGI(TAG, "%s(%d) :read_error %s(%d)", configtag, configid, err::error2str(ecode), ecode);
} }
}
/**
* @brief
*
* @param moduleId
* @param regid regid==0,
*/
void MicroComputerModuleDeviceScriptCmderPaser::app_dump_reg(int32_t moduleId, int32_t regid) {
int32_t configval = 0; int32_t configval = 0;
int32_t ecode = 0; int32_t ecode = 0;
ZLOGI(TAG, "-------------------------REG LIST--------------------------") ZLOGI(TAG, "-------------------------REG LIST--------------------------")
/*******************************************************************************
* *
*******************************************************************************/
DUMP_CONFIG("module_version", kreg_module_version);
DUMP_CONFIG("module_type", kreg_module_type);
DUMP_CONFIG("module_status", kreg_module_status);
DUMP_CONFIG("module_errorcode", kreg_module_errorcode);
DUMP_CONFIG("module_initflag", kreg_module_initflag);
DUMP_CONFIG("module_enableflag", kreg_module_enableflag);
DUMP_CONFIG_BIT("module_errorbitflag0", kreg_module_errorbitflag0);
DUMP_CONFIG_BIT("module_errorbitflag1", kreg_module_errorbitflag1);
DUMP_CONFIG_BIT("module_input_state", kreg_module_input_state);
DUMP_CONFIG_BIT("module_output_state", kreg_module_output_state);
DUMP_CONFIG("module_raw_sector_size", kreg_module_raw_sector_size);
DUMP_CONFIG("module_raw_sector_num", kreg_module_raw_sector_num);
DUMP_CONFIG("module_is_online", kreg_module_is_online);
DUMP_CONFIG("module_private0", kreg_module_private0);
DUMP_CONFIG("module_private1", kreg_module_private1);
DUMP_CONFIG("module_private2", kreg_module_private2);
DUMP_CONFIG("module_private3", kreg_module_private3);
DUMP_CONFIG("module_private4", kreg_module_private4);
DUMP_CONFIG("module_private5", kreg_module_private5);
DUMP_CONFIG("module_private6", kreg_module_private6);
DUMP_CONFIG("module_private7", kreg_module_private7);
DUMP_CONFIG("module_private8", kreg_module_private8);
DUMP_CONFIG("module_private9", kreg_module_private9);
/*******************************************************************************
* SENSOR *
*******************************************************************************/
DUMP_CONFIG("sensor_current", kreg_sensor_current);
DUMP_CONFIG("sensor_voltage", kreg_sensor_voltage);
DUMP_CONFIG("sensor_temperature", kreg_sensor_temperature);
DUMP_CONFIG("sensor_humidity", kreg_sensor_humidity);
DUMP_CONFIG("sensor_wind_speed", kreg_sensor_wind_speed);
DUMP_CONFIG("sensor_wind_dir", kreg_sensor_wind_dir);
DUMP_CONFIG("sensor_air_press", kreg_sensor_air_press);
DUMP_CONFIG("sensor_pm25", kreg_sensor_pm25);
DUMP_CONFIG("sensor_pm10", kreg_sensor_pm10);
DUMP_CONFIG("sensor_co", kreg_sensor_co);
DUMP_CONFIG("sensor_co2", kreg_sensor_co2);
DUMP_CONFIG("sensor_no2", kreg_sensor_no2);
DUMP_CONFIG("sensor_so2", kreg_sensor_so2);
DUMP_CONFIG("sensor_o3", kreg_sensor_o3);
DUMP_CONFIG("sensor_light_intensity", kreg_sensor_light_intensity);
DUMP_CONFIG("sensor_radiation", kreg_sensor_radiation);
DUMP_CONFIG("sensor_hydrogen_peroxide_volume", kreg_sensor_hydrogen_peroxide_volume);
DUMP_CONFIG("sensor_h2o_h2o2_rs", kreg_sensor_h2o_h2o2_rs);
DUMP_CONFIG("sensor_relative_humidity", kreg_sensor_relative_humidity);
DUMP_CONFIG("sensor_absolute_hydrogen_peroxide", kreg_sensor_absolute_hydrogen_peroxide);
DUMP_CONFIG("sensor_h2o_h2o2dew_point_temperature", kreg_sensor_h2o_h2o2dew_point_temperature);
DUMP_CONFIG("sensor_water_volume", kreg_sensor_water_volume);
DUMP_CONFIG("sensor_water_vapor_pressure", kreg_sensor_water_vapor_pressure);
DUMP_CONFIG("sensor_absolute_humidity", kreg_sensor_absolute_humidity);
DUMP_CONFIG("sensor_water_vapor_saturation_pressure_h2o", kreg_sensor_water_vapor_saturation_pressure_h2o);
DUMP_CONFIG("sensor_h2o2_vapor_pressure", kreg_sensor_h2o2_vapor_pressure);
DUMP_CONFIG("sensor_water_vapor_saturation_pressure_h2o_h2o2", kreg_sensor_water_vapor_saturation_pressure_h2o_h2o2);
DUMP_CONFIG("sensor_temperature0", kreg_sensor_temperature0);
DUMP_CONFIG("sensor_temperature1", kreg_sensor_temperature1);
DUMP_CONFIG("sensor_temperature2", kreg_sensor_temperature2);
DUMP_CONFIG("sensor_temperature3", kreg_sensor_temperature3);
DUMP_CONFIG("sensor_temperature4", kreg_sensor_temperature4);
DUMP_CONFIG("sensor_temperature5", kreg_sensor_temperature5);
DUMP_CONFIG("sensor_temperature6", kreg_sensor_temperature6);
DUMP_CONFIG("sensor_temperature7", kreg_sensor_temperature7);
DUMP_CONFIG("sensor_temperature8", kreg_sensor_temperature8);
DUMP_CONFIG("sensor_temperature9", kreg_sensor_temperature9);
DUMP_CONFIG("sensor_pressure0", kreg_sensor_pressure0);
DUMP_CONFIG("sensor_pressure1", kreg_sensor_pressure1);
DUMP_CONFIG("sensor_pressure2", kreg_sensor_pressure2);
DUMP_CONFIG("sensor_pressure3", kreg_sensor_pressure3);
DUMP_CONFIG("sensor_pressure4", kreg_sensor_pressure4);
DUMP_CONFIG("sensor_pressure5", kreg_sensor_pressure5);
DUMP_CONFIG("sensor_pressure6", kreg_sensor_pressure6);
DUMP_CONFIG("sensor_pressure7", kreg_sensor_pressure7);
DUMP_CONFIG("sensor_pressure8", kreg_sensor_pressure8);
DUMP_CONFIG("sensor_pressure9", kreg_sensor_pressure9);
DUMP_CONFIG("sensor_humidity0", kreg_sensor_humidity0);
DUMP_CONFIG("sensor_humidity1", kreg_sensor_humidity1);
DUMP_CONFIG("sensor_humidity2", kreg_sensor_humidity2);
DUMP_CONFIG("sensor_humidity3", kreg_sensor_humidity3);
DUMP_CONFIG("sensor_humidity4", kreg_sensor_humidity4);
DUMP_CONFIG("sensor_humidity5", kreg_sensor_humidity5);
DUMP_CONFIG("sensor_humidity6", kreg_sensor_humidity6);
DUMP_CONFIG("sensor_humidity7", kreg_sensor_humidity7);
DUMP_CONFIG("sensor_humidity8", kreg_sensor_humidity8);
DUMP_CONFIG("sensor_humidity9", kreg_sensor_humidity9);
// reg_index_table_get
/*******************************************************************************
* *
*******************************************************************************/
/*******************************************************************************
* MOTOR_DEFAULT *
*******************************************************************************/
DUMP_CONFIG("robot_move", kreg_robot_move);
DUMP_CONFIG("robot_pos", kreg_robot_pos);
DUMP_CONFIG("robot_velocity", kreg_robot_velocity);
DUMP_CONFIG("robot_torque", kreg_robot_torque);
DUMP_CONFIG("motor_shift", kreg_motor_shift);
DUMP_CONFIG("motor_shaft", kreg_motor_shaft);
DUMP_CONFIG("motor_one_circle_pulse", kreg_motor_one_circle_pulse);
DUMP_CONFIG("motor_one_circle_pulse_denominator", kreg_motor_one_circle_pulse_denominator);
DUMP_CONFIG("motor_default_velocity", kreg_motor_default_velocity);
DUMP_CONFIG("motor_default_acc", kreg_motor_default_acc);
DUMP_CONFIG("motor_default_dec", kreg_motor_default_dec);
DUMP_CONFIG("motor_default_break_dec", kreg_motor_default_break_dec);
DUMP_CONFIG("stepmotor_ihold", kreg_stepmotor_ihold);
DUMP_CONFIG("stepmotor_irun", kreg_stepmotor_irun);
DUMP_CONFIG("stepmotor_iholddelay", kreg_stepmotor_iholddelay);
DUMP_CONFIG("stepmotor_iglobalscaler", kreg_stepmotor_iglobalscaler);
DUMP_CONFIG("motor_run_to_zero_max_d", kreg_motor_run_to_zero_max_d);
DUMP_CONFIG("motor_look_zero_edge_max_d", kreg_motor_look_zero_edge_max_d);
DUMP_CONFIG("motor_run_to_zero_speed", kreg_motor_run_to_zero_speed);
DUMP_CONFIG("motor_run_to_zero_dec", kreg_motor_run_to_zero_dec);
DUMP_CONFIG("motor_look_zero_edge_speed", kreg_motor_look_zero_edge_speed);
DUMP_CONFIG("motor_look_zero_edge_dec", kreg_motor_look_zero_edge_dec);
DUMP_CONFIG("motor_default_torque", kreg_motor_default_torque);
/*******************************************************************************
* MOTOR_X *
*******************************************************************************/
DUMP_CONFIG("robot_x_move", kreg_robot_x_move);
DUMP_CONFIG("robot_x_pos", kreg_robot_x_pos);
DUMP_CONFIG("robot_x_velocity", kreg_robot_x_velocity);
DUMP_CONFIG("robot_x_torque", kreg_robot_x_torque);
DUMP_CONFIG("motor_x_shift", kreg_motor_x_shift);
DUMP_CONFIG("motor_x_shaft", kreg_motor_x_shaft);
DUMP_CONFIG("motor_x_one_circle_pulse", kreg_motor_x_one_circle_pulse);
DUMP_CONFIG("motor_x_default_velocity", kreg_motor_x_default_velocity);
DUMP_CONFIG("motor_x_default_acc", kreg_motor_x_default_acc);
DUMP_CONFIG("motor_x_default_dec", kreg_motor_x_default_dec);
DUMP_CONFIG("motor_x_default_break_dec", kreg_motor_x_default_break_dec);
DUMP_CONFIG("stepmotor_x_ihold", kreg_stepmotor_x_ihold);
DUMP_CONFIG("stepmotor_x_irun", kreg_stepmotor_x_irun);
DUMP_CONFIG("stepmotor_x_iholddelay", kreg_stepmotor_x_iholddelay);
DUMP_CONFIG("motor_run_to_zero_max_x_d", kreg_motor_run_to_zero_max_x_d);
DUMP_CONFIG("motor_look_zero_edge_max_x_d", kreg_motor_look_zero_edge_max_x_d);
DUMP_CONFIG("motor_x_run_to_zero_speed", kreg_motor_x_run_to_zero_speed);
DUMP_CONFIG("motor_x_run_to_zero_dec", kreg_motor_x_run_to_zero_dec);
DUMP_CONFIG("motor_x_look_zero_edge_speed", kreg_motor_x_look_zero_edge_speed);
DUMP_CONFIG("motor_x_look_zero_edge_dec", kreg_motor_x_look_zero_edge_dec);
DUMP_CONFIG("motor_x_default_torque", kreg_motor_x_default_torque);
/*******************************************************************************
* MOTOR_Y *
*******************************************************************************/
DUMP_CONFIG("robot_y_move", kreg_robot_y_move);
DUMP_CONFIG("robot_y_pos", kreg_robot_y_pos);
DUMP_CONFIG("robot_y_velocity", kreg_robot_y_velocity);
DUMP_CONFIG("robot_y_torque", kreg_robot_y_torque);
reg_index_table_iterm_t* iterms = nullptr;
int32_t num = 0;
DUMP_CONFIG("motor_y_shift", kreg_motor_y_shift);
DUMP_CONFIG("motor_y_shaft", kreg_motor_y_shaft);
DUMP_CONFIG("motor_y_one_circle_pulse", kreg_motor_y_one_circle_pulse);
DUMP_CONFIG("motor_y_default_velocity", kreg_motor_y_default_velocity);
DUMP_CONFIG("motor_y_default_acc", kreg_motor_y_default_acc);
DUMP_CONFIG("motor_y_default_dec", kreg_motor_y_default_dec);
DUMP_CONFIG("motor_y_default_break_dec", kreg_motor_y_default_break_dec);
DUMP_CONFIG("stepmotor_y_ihold", kreg_stepmotor_y_ihold);
DUMP_CONFIG("stepmotor_y_irun", kreg_stepmotor_y_irun);
DUMP_CONFIG("stepmotor_y_iholddelay", kreg_stepmotor_y_iholddelay);
DUMP_CONFIG("motor_run_to_zero_max_y_d", kreg_motor_run_to_zero_max_y_d);
DUMP_CONFIG("motor_look_zero_edge_max_y_d", kreg_motor_look_zero_edge_max_y_d);
DUMP_CONFIG("motor_y_run_to_zero_speed", kreg_motor_y_run_to_zero_speed);
DUMP_CONFIG("motor_y_run_to_zero_dec", kreg_motor_y_run_to_zero_dec);
DUMP_CONFIG("motor_y_look_zero_edge_speed", kreg_motor_y_look_zero_edge_speed);
DUMP_CONFIG("motor_y_look_zero_edge_dec", kreg_motor_y_look_zero_edge_dec);
DUMP_CONFIG("motor_y_default_torque", kreg_motor_y_default_torque);
reg_index_table_get(&iterms, &num);
for (int32_t i = 0; i < num; i++) {
reg_index_table_iterm_t* iterm = &iterms[i];
/*******************************************************************************
* MOTOR_Z *
*******************************************************************************/
DUMP_CONFIG("robot_z_move", kreg_robot_z_move);
DUMP_CONFIG("robot_z_pos", kreg_robot_z_pos);
DUMP_CONFIG("robot_z_velocity", kreg_robot_z_velocity);
DUMP_CONFIG("robot_z_torque", kreg_robot_z_torque);
DUMP_CONFIG("motor_z_shift", kreg_motor_z_shift);
DUMP_CONFIG("motor_z_shaft", kreg_motor_z_shaft);
DUMP_CONFIG("motor_z_one_circle_pulse", kreg_motor_z_one_circle_pulse);
DUMP_CONFIG("motor_z_default_velocity", kreg_motor_z_default_velocity);
DUMP_CONFIG("motor_z_default_acc", kreg_motor_z_default_acc);
DUMP_CONFIG("motor_z_default_dec", kreg_motor_z_default_dec);
DUMP_CONFIG("motor_z_default_break_dec", kreg_motor_z_default_break_dec);
DUMP_CONFIG("stepmotor_z_ihold", kreg_stepmotor_z_ihold);
DUMP_CONFIG("stepmotor_z_irun", kreg_stepmotor_z_irun);
DUMP_CONFIG("stepmotor_z_iholddelay", kreg_stepmotor_z_iholddelay);
DUMP_CONFIG("motor_run_to_zero_max_z_d", kreg_motor_run_to_zero_max_z_d);
DUMP_CONFIG("motor_look_zero_edge_max_z_d", kreg_motor_look_zero_edge_max_z_d);
DUMP_CONFIG("motor_z_run_to_zero_speed", kreg_motor_z_run_to_zero_speed);
DUMP_CONFIG("motor_z_run_to_zero_dec", kreg_motor_z_run_to_zero_dec);
DUMP_CONFIG("motor_z_look_zero_edge_speed", kreg_motor_z_look_zero_edge_speed);
DUMP_CONFIG("motor_z_look_zero_edge_dec", kreg_motor_z_look_zero_edge_dec);
DUMP_CONFIG("motor_z_default_torque", kreg_motor_z_default_torque);
DUMP_CONFIG("xyrobot_robot_type", kreg_xyrobot_robot_type);
/*******************************************************************************
* PID控制器(3000->4000) *
*******************************************************************************/
DUMP_CONFIG("pid_target", kreg_pid_target);
DUMP_CONFIG("pid_nowoutput", kreg_pid_nowoutput);
DUMP_CONFIG("pid_feedbackval", kreg_pid_feedbackval);
DUMP_CONFIG("pid_kp", kreg_pid_kp);
DUMP_CONFIG("pid_ki", kreg_pid_ki);
DUMP_CONFIG("pid_kd", kreg_pid_kd);
DUMP_CONFIG("pid_max_output", kreg_pid_max_output);
DUMP_CONFIG("pid_min_output", kreg_pid_min_output);
DUMP_CONFIG("pid_max_integral", kreg_pid_max_integral);
DUMP_CONFIG("pid_min_integral", kreg_pid_min_integral);
DUMP_CONFIG("error_limit", kreg_error_limit);
DUMP_CONFIG("compute_interval", kreg_compute_interval);
/*******************************************************************************
* *
*******************************************************************************/
DUMP_CONFIG("fan0_ctrl_speed_level", kreg_fan0_ctrl_speed_level);
DUMP_CONFIG("fan1_ctrl_speed_level", kreg_fan1_ctrl_speed_level);
DUMP_CONFIG("fan2_ctrl_speed_level", kreg_fan2_ctrl_speed_level);
DUMP_CONFIG("fan3_ctrl_speed_level", kreg_fan3_ctrl_speed_level);
DUMP_CONFIG("fan4_ctrl_speed_level", kreg_fan4_ctrl_speed_level);
DUMP_CONFIG("fan0_speed_level", kreg_fan0_speed_level);
DUMP_CONFIG("fan1_speed_level", kreg_fan1_speed_level);
DUMP_CONFIG("fan2_speed_level", kreg_fan2_speed_level);
DUMP_CONFIG("fan3_speed_level", kreg_fan3_speed_level);
DUMP_CONFIG("fan4_speed_level", kreg_fan4_speed_level);
DUMP_CONFIG("pwm_pump0_ctrl_speed_level", kreg_pwm_pump0_ctrl_speed_level);
DUMP_CONFIG("pwm_pump1_ctrl_speed_level", kreg_pwm_pump1_ctrl_speed_level);
DUMP_CONFIG("pwm_pump2_ctrl_speed_level", kreg_pwm_pump2_ctrl_speed_level);
DUMP_CONFIG("pwm_pump3_ctrl_speed_level", kreg_pwm_pump3_ctrl_speed_level);
DUMP_CONFIG("pwm_pump4_ctrl_speed_level", kreg_pwm_pump4_ctrl_speed_level);
DUMP_CONFIG("pwm_pump0_speed_level", kreg_pwm_pump0_speed_level);
DUMP_CONFIG("pwm_pump1_speed_level", kreg_pwm_pump1_speed_level);
DUMP_CONFIG("pwm_pump2_speed_level", kreg_pwm_pump2_speed_level);
DUMP_CONFIG("pwm_pump3_speed_level", kreg_pwm_pump3_speed_level);
DUMP_CONFIG("pwm_pump4_speed_level", kreg_pwm_pump4_speed_level);
/*******************************************************************************
* *
*******************************************************************************/
DUMP_CONFIG("pipette_pos_ul", kreg_pipette_pos_ul);
DUMP_CONFIG("pipette_capactitance_val", kreg_pipette_capactitance_val);
DUMP_CONFIG("pipette_tip_state", kreg_pipette_tip_state);
DUMP_CONFIG("pipette_limit_ul", kreg_pipette_limit_ul);
/*******************************************************************************
* smartADC *
*******************************************************************************/
DUMP_CONFIG("self_reflecting_laser_sensor_transmitting_power", kreg_self_reflecting_laser_sensor_transmitting_power);
DUMP_CONFIG("self_reflecting_laser_sensor_receiving_tube_gain", kreg_self_reflecting_laser_sensor_receiving_tube_gain);
DUMP_CONFIG("self_reflecting_laser_sensor_sample_interval_ms", kreg_self_reflecting_laser_sensor_sample_interval_ms);
DUMP_CONFIG("self_reflecting_laser_sensor_num_samples", kreg_self_reflecting_laser_sensor_num_samples);
/*******************************************************************************
* smartADC *
*******************************************************************************/
// scan action
DUMP_CONFIG("boditech_optical_scan_type", kreg_boditech_optical_scan_type);
DUMP_CONFIG("boditech_optical_scan_start_pos", kreg_boditech_optical_scan_start_pos);
DUMP_CONFIG("boditech_optical_scan_direction", kreg_boditech_optical_scan_direction);
DUMP_CONFIG("boditech_optical_scan_step_interval", kreg_boditech_optical_scan_step_interval);
DUMP_CONFIG("boditech_optical_scan_pointnum", kreg_boditech_optical_scan_pointnum);
DUMP_CONFIG("boditech_optical_channel_select_num", kreg_boditech_optical_channel_select_num);
DUMP_CONFIG("boditech_optical_laster_gain", kreg_boditech_optical_laster_gain);
DUMP_CONFIG("boditech_optical_scan_gain", kreg_boditech_optical_scan_gain);
DUMP_CONFIG("boditech_optical_trf_uvled_on_duration_us", kreg_boditech_optical_trf_uvled_on_duration_us);
DUMP_CONFIG("boditech_optical_trf_uvled_off_duration_us", kreg_boditech_optical_trf_uvled_off_duration_us);
DUMP_CONFIG("boditech_optical_trf_scan_delay_us", kreg_boditech_optical_trf_scan_delay_us);
DUMP_CONFIG("boditech_optical_trf_scan_duration_us", kreg_boditech_optical_trf_scan_duration_us);
DUMP_CONFIG("boditech_optical_scan_gain_adjust_suggestion", kreg_boditech_optical_scan_gain_adjust_suggestion);
DUMP_CONFIG("boditech_optical_adc_result_overflow", kreg_boditech_optical_adc_result_overflow);
DUMP_CONFIG("boditech_optical_laster_intensity", kreg_boditech_optical_laster_intensity);
if (regid != 0 && regid != iterm->index) {
continue;
}
DUMP_CONFIG("module_last_cmd_exec_status", kreg_module_last_cmd_exec_status);
DUMP_CONFIG("module_last_cmd_exec_val0", kreg_module_last_cmd_exec_val0);
DUMP_CONFIG("module_last_cmd_exec_val1", kreg_module_last_cmd_exec_val1);
DUMP_CONFIG("module_last_cmd_exec_val2", kreg_module_last_cmd_exec_val2);
DUMP_CONFIG("module_last_cmd_exec_val3", kreg_module_last_cmd_exec_val3);
DUMP_CONFIG("module_last_cmd_exec_val4", kreg_module_last_cmd_exec_val4);
DUMP_CONFIG("module_last_cmd_exec_val5", kreg_module_last_cmd_exec_val5);
DUMP_CONFIG("module_action_param1", kreg_module_action_param1);
DUMP_CONFIG("module_action_param2", kreg_module_action_param2);
DUMP_CONFIG("module_action_param3", kreg_module_action_param3);
DUMP_CONFIG("module_action_param4", kreg_module_action_param4);
DUMP_CONFIG("module_action_param5", kreg_module_action_param5);
DUMP_CONFIG("module_action_param6", kreg_module_action_param6);
DUMP_CONFIG("module_action_param7", kreg_module_action_param7);
DUMP_CONFIG("module_action_param8", kreg_module_action_param8);
DUMP_CONFIG("module_action_param9", kreg_module_action_param9);
DUMP_CONFIG("module_action_ack1", kreg_module_action_ack1);
DUMP_CONFIG("module_action_ack2", kreg_module_action_ack2);
DUMP_CONFIG("module_action_ack3", kreg_module_action_ack3);
DUMP_CONFIG("module_action_ack4", kreg_module_action_ack4);
DUMP_CONFIG("module_action_ack5", kreg_module_action_ack5);
DUMP_CONFIG("module_action_ack6", kreg_module_action_ack6);
DUMP_CONFIG("module_action_ack7", kreg_module_action_ack7);
DUMP_CONFIG("module_action_ack8", kreg_module_action_ack8);
DUMP_CONFIG("module_action_ack9", kreg_module_action_ack9);
if (iterm->index == kreg_module_errorbitflag0 || //
iterm->index == kreg_module_errorbitflag1 || //
iterm->index == kreg_module_input_state || //
iterm->index == kreg_module_output_state) {
app_dump_reg(moduleId, iterm->name, iterm->index, kbit);
} else {
app_dump_reg(moduleId, iterm->name, iterm->index, kint);
}
}
} }
void MicroComputerModuleDeviceScriptCmderPaser::do_wait_for_module(int32_t paramN, const char* paraV[], ICmdParserACK* ack) { void MicroComputerModuleDeviceScriptCmderPaser::do_wait_for_module(int32_t paramN, const char* paraV[], ICmdParserACK* ack) {

7
components/zprotocol_helper/micro_computer_module_device_script_cmder_paser.hpp

@ -7,6 +7,11 @@ class MicroComputerModuleDeviceScriptCmderPaser : public ZModuleDeviceScriptCmde
ICmdParser* m_cmdParser = nullptr; ICmdParser* m_cmdParser = nullptr;
ZModuleDeviceManager* m_deviceManager; ZModuleDeviceManager* m_deviceManager;
typedef enum {
kint,
kbit,
} dump_type_t;
public: public:
void initialize(ICmdParser* cancmder, ZModuleDeviceManager* deviceManager); void initialize(ICmdParser* cancmder, ZModuleDeviceManager* deviceManager);
@ -22,7 +27,7 @@ class MicroComputerModuleDeviceScriptCmderPaser : public ZModuleDeviceScriptCmde
void app_set_reg(int32_t paramN, const char* paraV[], ICmdParserACK* ack); void app_set_reg(int32_t paramN, const char* paraV[], ICmdParserACK* ack);
void app_dump_reg(int moduleId, const char* configtag, int configid, dump_type_t type);
}; };
} // namespace iflytop } // namespace iflytop

2
components/zprotocols/zcancmder_v2

@ -1 +1 @@
Subproject commit d06f09d8b3724156381c36d0cc5d0d9a0b098cc4
Subproject commit fe25a1425a38ddf33fc8b5bde11414425e993611
Loading…
Cancel
Save