|
|
@ -61,7 +61,6 @@ void ZCanProtocolParser::initialize(IZCanReceiver* cancmder) { |
|
|
|
REGFN(extboard_read_inio_index_in_stm32); |
|
|
|
REGFN(extboard_read_outio_index_in_stm32); |
|
|
|
REGFN(extboard_read_outio); |
|
|
|
|
|
|
|
|
|
|
|
REGFN(code_scaner_start_scan); |
|
|
|
REGFN(code_scaner_stop_scan); |
|
|
@ -86,7 +85,7 @@ void ZCanProtocolParser::initialize(IZCanReceiver* cancmder) { |
|
|
|
REGFN(xymotor_move_to); |
|
|
|
REGFN(xymotor_move_to_zero); |
|
|
|
REGFN(xymotor_read_pos); |
|
|
|
#if 0
|
|
|
|
#if 1
|
|
|
|
REGFN(a8000_optical_module_power_ctrl); |
|
|
|
REGFN(a8000_optical_open_laser); |
|
|
|
REGFN(a8000_optical_close_laser); |
|
|
@ -95,7 +94,12 @@ void ZCanProtocolParser::initialize(IZCanReceiver* cancmder) { |
|
|
|
REGFN(a8000_optical_read_scanner_adc_val); |
|
|
|
REGFN(a8000_optical_read_laster_adc_val); |
|
|
|
REGFN(a8000_optical_scan_current_point_amp_adc_val); |
|
|
|
|
|
|
|
REGFN(a8000_optical_start_capture); |
|
|
|
REGFN(a8000_optical_read_raw); |
|
|
|
#endif
|
|
|
|
|
|
|
|
REGFN(a8000_idcard_reader_read_raw); |
|
|
|
} |
|
|
|
void ZCanProtocolParser::_registerModule(uint16_t id, ZIModule* module) { m_modulers[id] = module; } |
|
|
|
void ZCanProtocolParser::registerModule(ZIModule* module) { |
|
|
@ -515,7 +519,6 @@ int32_t ZCanProtocolParser::fan_controler_set_speed(cmdcontxt_t* cxt) { |
|
|
|
} |
|
|
|
#undef MODULE_CLASS
|
|
|
|
|
|
|
|
|
|
|
|
#define MODULE_CLASS ZIXYMotor
|
|
|
|
int32_t ZCanProtocolParser::xymotor_enable(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(1); |
|
|
@ -537,8 +540,6 @@ int32_t ZCanProtocolParser::xymotor_move_to_zero(cmdcontxt_t* cxt) { |
|
|
|
return module->xymotor_move_to_zero(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int32_t ZCanProtocolParser::xymotor_read_pos(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(0); |
|
|
|
int32_t* ack = (int32_t*)cxt->ackbuf; |
|
|
@ -546,12 +547,9 @@ int32_t ZCanProtocolParser::xymotor_read_pos(cmdcontxt_t* cxt) { |
|
|
|
return module->xymotor_read_pos(&ack[0], &ack[1]); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#undef MODULE_CLASS
|
|
|
|
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#if 1
|
|
|
|
|
|
|
|
/***********************************************************************************************************************
|
|
|
|
* ZIA8000OpticalModule * |
|
|
@ -604,5 +602,32 @@ int32_t ZCanProtocolParser::a8000_optical_scan_current_point_amp_adc_val(cmdcont |
|
|
|
return module->a8000_optical_scan_current_point_amp_adc_val(cxt->params[0], cxt->params[1], cxt->params[2], &ack[0], &ack[1]); |
|
|
|
} |
|
|
|
|
|
|
|
int32_t ZCanProtocolParser::a8000_optical_start_capture(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(0); |
|
|
|
return module->a8000_optical_start_capture(); |
|
|
|
} |
|
|
|
int32_t ZCanProtocolParser::a8000_optical_read_raw(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(1); |
|
|
|
cxt->acklen = ZCANCMD_READ_BUF_MAX_SIZE; |
|
|
|
int32_t suc = module->a8000_optical_read_raw(cxt->params[0], cxt->ackbuf, &cxt->acklen); |
|
|
|
if (suc != 0) { |
|
|
|
cxt->acklen = 0; |
|
|
|
} |
|
|
|
return suc; |
|
|
|
} |
|
|
|
|
|
|
|
#undef MODULE_CLASS
|
|
|
|
|
|
|
|
#define MODULE_CLASS ZIA8000IDCardReaderModule
|
|
|
|
int32_t ZCanProtocolParser::a8000_idcard_reader_read_raw(cmdcontxt_t* cxt) { |
|
|
|
CHECK_AND_GET_MODULE(1); |
|
|
|
cxt->acklen = ZCANCMD_READ_BUF_MAX_SIZE; |
|
|
|
int32_t suc = module->a8000_idcard_reader_read_raw(cxt->params[0], cxt->ackbuf, &cxt->acklen); |
|
|
|
if (suc != 0) { |
|
|
|
cxt->acklen = 0; |
|
|
|
} |
|
|
|
return suc; |
|
|
|
} |
|
|
|
#undef MODULE_CLASS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|