From 00cf4c6d838e99ee74f25158e293176b50ee4eae Mon Sep 17 00:00:00 2001 From: InventorXtreme Date: Thu, 11 Jan 2024 15:52:15 -0500 Subject: [PATCH] test --- src/main.cpp | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index dab2d07..0caa71a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -505,6 +505,16 @@ void opcontrol() { flaparr[i] = false; } + bool l1toggle[10]; + for (int i=0; i<10; i++) { + l1toggle[i] = false; + } + + bool l2toggle[10]; + for (int i=0; i < 10; i++) { + l2toggle[i] = false; + } + bool pullback = false; bool ready = false; int tcount = 0; @@ -537,9 +547,9 @@ void opcontrol() { r1arr[i] = false; } - bool y1arr[10]; + bool upflaparr[10]; for (int i = 0; i < 10; i++) { - y1arr[i] = false; + upflaparr[i] = false; } bool modeswap[10]; @@ -616,9 +626,9 @@ void opcontrol() { tcount++; } - if (is_tapped(flaparr, R2.isPressed())) { - flapsOn = !flapsOn; - } + if(is_tapped(l1toggle, L1.isPressed() )) { + flapsOn = !flapsOn; + } if (is_tapped(manpullarr, (uparrow.isPressed() && Xbutton.isPressed()))) { @@ -626,11 +636,11 @@ void opcontrol() { tcount++; } - if (is_tapped(funnyarr, downarrow.isPressed())) { + if (is_tapped(funnyarr, L2.isPressed())) { funnypistonstatus = !funnypistonstatus; } - if (is_tapped(y1arr, Bbutton.isPressed())) { + if (is_tapped(upflaparr, R2.isPressed())) { upflapstatus = !upflapstatus; } @@ -712,14 +722,7 @@ void opcontrol() { // flywheel.moveVoltage(0); // } - if(L1.isPressed()) { - lift.moveVoltage(-12000); - } - else if (L2.isPressed()) { - lift.moveVoltage(12000); - } else { - lift.moveVoltage(0); - } + // if (fly.isPressed()) { // pullback = true;