summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-05-26 14:55:22 +0200
committerlonkaars <loek@pipeframe.xyz>2022-05-26 14:55:22 +0200
commit9c1f3dcc98b639e3bbcb6a8e199d8f1aa4bcc42a (patch)
tree016de2cb788ba504d33e63588f19a7f253f950df
parentfda1e9389c4bcef89a2bcdd2c01f0727e9efdb18 (diff)
add mode shims
-rw-r--r--robot/mode_chrg.c3
-rw-r--r--robot/mode_chrg.h9
-rw-r--r--robot/mode_dirc.c3
-rw-r--r--robot/mode_dirc.h8
-rw-r--r--robot/mode_scal.c3
-rw-r--r--robot/mode_scal.h8
-rw-r--r--robot/mode_spin.c3
-rw-r--r--robot/mode_spin.h8
-rw-r--r--robot/modes.h10
9 files changed, 51 insertions, 4 deletions
diff --git a/robot/mode_chrg.c b/robot/mode_chrg.c
new file mode 100644
index 0000000..81808d5
--- /dev/null
+++ b/robot/mode_chrg.c
@@ -0,0 +1,3 @@
+#include "mode_chrg.h"
+
+void w2_mode_chrg() {}
diff --git a/robot/mode_chrg.h b/robot/mode_chrg.h
new file mode 100644
index 0000000..d9b5cc0
--- /dev/null
+++ b/robot/mode_chrg.h
@@ -0,0 +1,9 @@
+#pragma once
+
+/**
+ * charge station mode
+ *
+ * go to the charging station transition in the grid, and continue until a
+ * black circle is found
+ */
+void w2_mode_chrg();
diff --git a/robot/mode_dirc.c b/robot/mode_dirc.c
new file mode 100644
index 0000000..6c5d2bb
--- /dev/null
+++ b/robot/mode_dirc.c
@@ -0,0 +1,3 @@
+#include "mode_dirc.h"
+
+void w2_mode_dirc() {}
diff --git a/robot/mode_dirc.h b/robot/mode_dirc.h
new file mode 100644
index 0000000..25a664a
--- /dev/null
+++ b/robot/mode_dirc.h
@@ -0,0 +1,8 @@
+#pragma once
+
+/**
+ * direct control mode
+ *
+ * respond to DIRC commands
+ */
+void w2_mode_dirc();
diff --git a/robot/mode_scal.c b/robot/mode_scal.c
new file mode 100644
index 0000000..e3a9c97
--- /dev/null
+++ b/robot/mode_scal.c
@@ -0,0 +1,3 @@
+#include "mode_scal.h"
+
+void w2_mode_scal() {}
diff --git a/robot/mode_scal.h b/robot/mode_scal.h
new file mode 100644
index 0000000..4f1f04d
--- /dev/null
+++ b/robot/mode_scal.h
@@ -0,0 +1,8 @@
+#pragma once
+
+/**
+ * sensor calibration mode
+ *
+ * calibrate underside uv sensors
+ */
+void w2_mode_scal();
diff --git a/robot/mode_spin.c b/robot/mode_spin.c
new file mode 100644
index 0000000..9145eb3
--- /dev/null
+++ b/robot/mode_spin.c
@@ -0,0 +1,3 @@
+#include "mode_spin.h"
+
+void w2_mode_spin() {}
diff --git a/robot/mode_spin.h b/robot/mode_spin.h
new file mode 100644
index 0000000..926137e
--- /dev/null
+++ b/robot/mode_spin.h
@@ -0,0 +1,8 @@
+#pragma once
+
+/**
+ * wet floor simulation
+ *
+ * spin uncontrollably (simulating wet floor??)
+ */
+void w2_mode_spin();
diff --git a/robot/modes.h b/robot/modes.h
index fe81043..a9d96d8 100644
--- a/robot/modes.h
+++ b/robot/modes.h
@@ -1,9 +1,13 @@
#pragma once
+#include "mode_chrg.h"
+#include "mode_dirc.h"
#include "mode_grid.h"
#include "mode_halt.h"
#include "mode_lcal.h"
#include "mode_maze.h"
+#include "mode_scal.h"
+#include "mode_spin.h"
/** function pointer to current mode */
extern void (*g_w2_current_mode)();
@@ -30,10 +34,8 @@ typedef enum {
/** array that maps w2_e_mode to mode function pointers */
static const void(*const W2_MODES[]) = {
- &w2_mode_maze,
- &w2_mode_grid,
- &w2_mode_grid,
- &w2_mode_halt,
+ &w2_mode_maze, &w2_mode_grid, &w2_mode_grid, &w2_mode_halt,
+ &w2_mode_chrg, &w2_mode_dirc, &w2_mode_spin, &w2_mode_scal,
};
/** switch the current mode */