]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
displayd: Show best estimated position
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 27 Apr 2010 08:09:49 +0000 (10:09 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 27 Apr 2010 08:09:49 +0000 (10:09 +0200)
src/displayd/displayd.c

index d52a698d5050923bd5cf80e4853ef7f16b0bd4ab..f2654111fb55f9ed9bb0b5685281d765a695eecb 100644 (file)
@@ -190,20 +190,7 @@ void rcv_hokuyo_scan_cb(const ORTERecvInfo *info, void *vinstance,
        last_status = status;
 }
 
-void rcv_ref_pos_cb (const ORTERecvInfo *info, void *vinstance,
-                        void *recvCallBackParam)
-{
-       struct robottype_orte_data *orte_data = (struct robottype_orte_data *)recvCallBackParam;
-        switch (info->status) {
-               case NEW_DATA:
-                       uoled_display_position(orte_data->ref_pos.x, orte_data->ref_pos.y, orte_data->ref_pos.phi);
-                       break;
-               case DEADLINE:
-                       break;
-       }
-}
-
-void rcv_est_pos_odo_cb (const ORTERecvInfo *info, void *vinstance,
+void rcv_est_pos_best_cb (const ORTERecvInfo *info, void *vinstance,
                         void *recvCallBackParam)
 {
        UDE_hw_status_t status = STATUS_FAILED;
@@ -212,7 +199,7 @@ void rcv_est_pos_odo_cb (const ORTERecvInfo *info, void *vinstance,
        struct robottype_orte_data *orte_data = (struct robottype_orte_data *)recvCallBackParam;
         switch (info->status) {
                case NEW_DATA:
-                       uoled_display_position(orte_data->est_pos_odo.x, orte_data->est_pos_odo.y, orte_data->est_pos_odo.phi);
+                       uoled_display_position(orte_data->est_pos_best.x, orte_data->est_pos_best.y, orte_data->est_pos_best.phi);
                        status = STATUS_OK;
                        break;
                case DEADLINE:
@@ -358,8 +345,7 @@ int main(int argc, char *argv[])
        robottype_subscriber_odo_data_create(&orte, rcv_odo_data_cb, &orte);
        robottype_subscriber_motion_irc_create(&orte, rcv_motion_irc_cb, &orte);
        robottype_subscriber_pwr_voltage_create(&orte, rcv_pwr_voltage_cb, &orte);
-       robottype_subscriber_est_pos_odo_create(&orte, rcv_est_pos_odo_cb, &orte);
-       robottype_subscriber_ref_pos_create(&orte, rcv_ref_pos_cb, &orte);
+       robottype_subscriber_est_pos_best_create(&orte, rcv_est_pos_best_cb, &orte);
        //robottype_subscriber_pwr_alert_create(&orte, rcv_pwr_alert_cb, &orte);
        //robottype_subscriber_motion_speed_create(&orte,       rcv_motion_speed_cb, &orte);
        //robottype_subscriber_can_msg_create(&orte, rcv_can_msg_cb, &orte);