Fixed a bug with how the controllers where being setup and added include paths to the pid_tuner and pid_input files, also fixed a bug where I forgot to setup the default constructor for all the new classes I made.

This commit is contained in:
Carter committed 2026-09-03 08:50:46 -04:00
1 parent b7af93220d
commit 0e8b70cf39
8 files changed
+17 -10

No files matched your search

+1
View File
@@ -4,6 +4,7 @@ License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "setup/initialize.hpp"
#include "EZ-Template/drive/drive.hpp"
#include "EZ-Template/sdcard.hpp"
#include "EZ-Template/util.hpp"
+1
View File
@@ -4,6 +4,7 @@ License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "setup/initialize.hpp"
#include "EZ-Template/PID.hpp"
#include "EZ-Template/drive/drive.hpp"
#include "pros/misc.h"
+6 -4
View File
@@ -3,6 +3,8 @@
using namespace ez;
Pneumatics::Pneumatics(){}
void Pneumatics::control_piston(Pistons activePiston, ControlPeriod currPeriod, Controller currController, Buttons buttonUsed) {
if (currPeriod == ControlPeriod::driver) {
@@ -19,10 +21,10 @@ void Pneumatics::control_piston(Pistons activePiston, ControlPeriod currPeriod,
switch (buttonUsed)
{
case Buttons::arrow_buttons:
if (master.get_digital(DIGITAL_LEFT)) {
if (master.get_digital(DIGITAL_RIGHT)) {
claw.set(true);
}
else if (master.get_digital(DIGITAL_RIGHT)) {
else if (master.get_digital(DIGITAL_DOWN)) {
claw.set(false);
}
break;
@@ -59,10 +61,10 @@ void Pneumatics::control_piston(Pistons activePiston, ControlPeriod currPeriod,
switch (buttonUsed)
{
case Buttons::arrow_buttons:
if (slave.get_digital(DIGITAL_LEFT)) {
if (slave.get_digital(DIGITAL_RIGHT)) {
claw.set(true);
}
else if (slave.get_digital(DIGITAL_RIGHT)) {
else if (slave.get_digital(DIGITAL_DOWN)) {
claw.set(false);
}
break;
@@ -3,6 +3,7 @@
using namespace ez;
ArmMech::ArmMech() {}
ArmMech::ArmMech(std::initializer_list<int> _armStates, int _numArmStates) {
armStates = _armStates;
numArmStates = _numArmStates;
@@ -3,6 +3,7 @@
using namespace ez;
LiftMech::LiftMech() {}
LiftMech::LiftMech(std::initializer_list<int> _liftStates, int _numLiftStates) {
liftStates = _liftStates;
numLiftStates = _numLiftStates;
@@ -3,6 +3,7 @@
using namespace ez;
WristMech::WristMech(){}
WristMech::WristMech(std::initializer_list<int> _wristStates, int _numWristStates) {
wristStates = _wristStates;
numWristStates = _numWristStates;