static UDE_hw_status_t last_status;
static struct timespec last_sent;
struct camera_result_type *instance = (struct camera_result_type *)vinstance;
- char s, c;
+ char valid;
switch (info->status) {
case NEW_DATA:
if (instance->error == 0)
last_status = status;
if (status == STATUS_OK) {
- s = (instance->side >= 0 && instance->side < 10) ?
- '0'+instance->side : 'E';
- c = (instance->center >= 0 && instance->center < 10) ?
- '0'+instance->center : 'E';
- } else
- s = c = '-';
- uoled_display_corns(s, c);
+ valid = (instance->target_valid > 0 ? 1 : 0);
+ } else {
+ valid = '-';
+ }
+ uoled_display_corns(valid, '-');
}
void rcv_hokuyo_scan_cb(const ORTERecvInfo *info, void *vinstance,