97 EO_INIT(.NVs2searchArray)
101 EO_INIT(.capacity) eODeb_eoProtoParser_maxNV2find,
102 EO_INIT(.itemsize)
sizeof(eODeb_eoProtoParser_nvidEp_couple_t),
114 EO_INIT(.invalidRopFrame)
179static void my_cbk_onNVsetpointFound(eOethLowLevParser_packetInfo_t *pktInfo_ptr, eODeb_eoProtoParser_ropAdditionalInfo_t *ropAddInfo_ptr)
181 eOmc_setpoint_t * setpoint_ptr = (eOmc_setpoint_t *)ropAddInfo_ptr->desc.data;
182 uint8_t
board = 0, j;
183 float enc_factor, zero, enc_factor_6=182.044 , enc_factor_8=182.044, zero_6=180, zero_8=-180;
187 if(ropAddInfo_ptr->desc.ep == 0x18)
190 enc_factor = enc_factor_8;
193 else if(ropAddInfo_ptr->desc.ep == 0x16)
196 enc_factor = enc_factor_6;
201 printf(
"\n\n ERROR: un expected ep!!! %d \n ", ropAddInfo_ptr->desc.ep);
205 if(setpoint_ptr->type != eomc_setpoint_position)
207 printf(
"ERR: no setpoint position. typse= %d", setpoint_ptr->type);
211 switch(ropAddInfo_ptr->desc.id)
234 printf(
"ERROR: receiv unexpected nvid %x", ropAddInfo_ptr->desc.id);
240 pos = (setpoint_ptr->to.position.value/enc_factor)-zero;
241 vel = setpoint_ptr->to.position.withvelocity/fabs(enc_factor);
243 printf(
"board %d j %d pos %f (%d) vel %f (%d) enc_factor=%f zero=%f\n",
board, j, pos, setpoint_ptr->to.position.value, vel, setpoint_ptr->to.position.withvelocity,enc_factor,zero);