]> rtime.felk.cvut.cz Git - eurobot/public.git/commitdiff
displayd: Using est_pos_best for signaling APP status.
authorMichal Vokac <vokac.m@gmail.com>
Fri, 30 Dec 2011 14:45:05 +0000 (15:45 +0100)
committerMichal Vokac <vokac.m@gmail.com>
Fri, 30 Dec 2011 14:45:05 +0000 (15:45 +0100)
Main application puts 0xffff to this when any component is not ready for start.
Than APP is showed orange.

src/displayd/displayd.c

index 9bb8ba40e6b8c6a92a752b3f8d401aa2430784e7..4718811cbe4b0b9dfd5b0811f97f3cad1b8064e6 100644 (file)
@@ -293,7 +293,13 @@ void rcv_est_pos_best_cb (const ORTERecvInfo *info, void *vinstance,
        struct robottype_orte_data *orte_data = (struct robottype_orte_data *)recvCallBackParam;
         switch (info->status) {
                case NEW_DATA:
-                       status = STATUS_OK;
+                        if ((orte_data->est_pos_best.phi == 0xffff) &&
+                            (orte_data->est_pos_best.x == 0xffff) &&
+                            (orte_data->est_pos_best.y == 0xffff)) {
+                                status = STATUS_WARNING;
+                        } else {
+                                status = STATUS_OK;
+                        }
                        break;
                case DEADLINE:
                        status = STATUS_FAILED;