if(my_info->status != TOF_ANYBODY){
my_info->distance = range;
my_info->status = TOF_ANYBODY;
+ printf("you ren\n");
if(tof_event != NULL){
tof_event(my_info);
}
if(my_info->status != TOF_NOBODY){
my_info->distance = range;
my_info->status = TOF_NOBODY;
+ printf("wu ren\n");
if(tof_event != NULL){
tof_event(my_info);
}
my_info->distance = range1;
my_info->status = TOF_FIXED_BARRIER;
distanceThreshold = range1;
+ printf("zhang ai wu\n");
if(tof_event != NULL){
tof_event(my_info);
}
void mg_tof_close( mg_tof_t * tof_ctrl )
{
stop = 0;
+ usleep(30);
mg_tof_disable(NULL);
free(my_tof);
free(my_info);