summaryrefslogtreecommitdiff
path: root/robot/mode_grid.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-29 10:35:58 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-29 10:35:58 +0200
commit054cf1c2a433c87b7caee503c28db2b7005d1060 (patch)
tree7b60a739019a87228d4fb7fb320af88bed127f7f /robot/mode_grid.c
parentef8b97942d8d5cec956b75b6254e18034914e80d (diff)
fix order receiving
Diffstat (limited to 'robot/mode_grid.c')
-rw-r--r--robot/mode_grid.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/robot/mode_grid.c b/robot/mode_grid.c
index ff80dd2..b6ed572 100644
--- a/robot/mode_grid.c
+++ b/robot/mode_grid.c
@@ -1,9 +1,13 @@
+#include <stdio.h>
+#include <string.h>
+
#include "mode_grid.h"
#include "hypervisor.h"
#include "io.h"
#include "modes.h"
#include "movement.h"
#include "orangutan_shim.h"
+#include "../shared/errcatch.h"
/**
* TODO: mode_grid g_w2_target_area laten volgen
@@ -204,6 +208,11 @@ void w2_turn_east() {
// signals when the product is picked
void w2_arrived_message() {
if (g_w2_location.x == g_w2_destination.x && g_w2_location.y == g_w2_destination.y) {
+ char msg[64];
+ sprintf(msg, "reached %i, %i", g_w2_destination.x, g_w2_destination.y);
+ size_t len = strlen(msg);
+ w2_errcatch_throw_msg(W2_E_INFO_ORDER_ARRIVED, len, msg);
+
play_frequency(400, 500, 7);
delay(500);
}