break;
case CAN_ADC_1: /* data from the sharp sensor measuring distance of the puck (column element) */
- orte->puck_distance.distance = ((frame.data[0]<<8)|(frame.data[1]));
- //orte->puck_distance.distance = s_gp2d120_ir2mmShort((frame.data[0]<<8)|(frame.data[1]))/1000.0;
+ //orte->puck_distance.distance = ((frame.data[0]<<8)|(frame.data[1]));
+ orte->puck_distance.distance = puckSharp_ir2mm((frame.data[0]<<8)|(frame.data[1]))/1000.0;
ORTEPublicationSend(orte->publication_puck_distance);
break;
/** Status of the distance measurement sensor */
struct puck_distance {
/** Distance of the puck from the Sharp sensor */
- short distance;
+ double distance;
};
/** Status sent from actuators */