aboutsummaryrefslogtreecommitdiff
path: root/robot/mode_chrg.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2022-06-08 15:47:43 +0200
committerlonkaars <loek@pipeframe.xyz>2022-06-08 15:47:43 +0200
commit31fe6a4c0b2a00f7b7f81055fe5dfb3fc37326be (patch)
tree5cf8bf0c346f14c779cac314f80169b1122aee72 /robot/mode_chrg.c
parentf062bfb8e88c0e62edd830bfbcaee14f1688c510 (diff)
parent74e7db1f43d5511da291050f2ddd5d701bb04258 (diff)
merge pull request from @nonailla
Diffstat (limited to 'robot/mode_chrg.c')
-rw-r--r--robot/mode_chrg.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/robot/mode_chrg.c b/robot/mode_chrg.c
index 0f02f37..a5910f2 100644
--- a/robot/mode_chrg.c
+++ b/robot/mode_chrg.c
@@ -4,7 +4,7 @@
#include "movement.h"
#include "orangutan_shim.h"
-int g_w2_charged_status;
+int g_w2_charged_status; //used to detect the charging station (once)
void w2_short_drive() {
set_motors(50, 50);
@@ -12,6 +12,7 @@ void w2_short_drive() {
set_motors(0, 0);
}
+//charging station
void w2_home() {
set_motors(0, 0);
delay_ms(150);
@@ -24,6 +25,7 @@ void w2_home() {
delay_ms(2000);
}
+//crosswalk from charging station back to maze
void w2_charge_cross_walk() {
if (g_w2_transition == 0) {
set_motors(-30, 30);
@@ -53,6 +55,7 @@ void w2_charge_cross_walk() {
}
}
+//main function for charge mode
void w2_mode_chrg() {
unsigned int last_proportional = 0;
long integral = 0;