Skip to content

Commit

Permalink
fixed some silly errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ion098 committed Feb 17, 2024
1 parent df68f25 commit 85b238d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ BINDIR=$(ROOT)/bin
SRCDIR=$(ROOT)/src
INCDIR=$(ROOT)/include

WARNFLAGS+=
WARNFLAGS+= -Wall -Wextra
EXTRA_CFLAGS=
EXTRA_CXXFLAGS=--std=gnu++20

Expand Down
12 changes: 6 additions & 6 deletions include/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ inline pros::Imu inertial(11);
namespace controls
{
inline bool fly_arm_forward() {return master.get_digital(DIGITAL_L2);}
inline bool fly_arm_backward() {return master.get_digital(DIGITAL_L2);}
inline bool lift_up() {return master.get_digital(DIGITAL_L2);}
inline bool lift_down() {return master.get_digital(DIGITAL_L2);}
inline bool fly_arm_backward() {return master.get_digital(DIGITAL_L1);}
inline bool lift_up() {return master.get_digital(DIGITAL_R1);}
inline bool lift_down() {return master.get_digital(DIGITAL_R2);}
inline bool flywheel_is_on() {
static bool is_on = false;
if(master.get_digital_new_press(DIGITAL_Y)) is_on = !is_on;
if(master.get_digital_new_press(DIGITAL_B)) is_on = !is_on;
return is_on;
}
inline bool wing_is_out() {
static bool is_out = false;
if(master.get_digital_new_press(DIGITAL_Y)) is_out = !is_out;
if(master.get_digital_new_press(DIGITAL_LEFT)) is_out = !is_out;
return is_out;
}
inline bool fvw_up() {return master.get_digital(DIGITAL_L2);}
inline bool fvw_up() {return master.get_digital(DIGITAL_UP);}
inline bool fvw_down() {return master.get_digital(DIGITAL_DOWN);}
inline bool fvw_is_reversed() {
static bool is_reversed = false;
Expand Down
2 changes: 1 addition & 1 deletion include/motor_temp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

#include "main.hpp"

void monitor_temp(void*);
void monitor_temp();

#endif
2 changes: 1 addition & 1 deletion src/motor_temp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void print_temp(pros::Motor &motor, std::string name) {
} // namespace

// task that prints motor temps to brain screen
void monitor_temp(void *ignore) {
void monitor_temp() {
while (true) {
pros::screen::set_pen(COLOR_WHITE);
pros::screen::print(TEXT_MEDIUM, 1, "Motor temps: (C)");
Expand Down
2 changes: 1 addition & 1 deletion src/opcontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void opcontrol() {
if(flywheel_velocity > 200) flywheel_velocity = 200;
if(controls::flywheel_is_on() && controls::fvw_is_reversed()) {
flywheel.move_velocity(-flywheel_velocity);
} else if (controls::flywheel_is_on) {
} else if (controls::flywheel_is_on()) {
flywheel.move_velocity(flywheel_velocity);
} else {
flywheel.brake();
Expand Down

0 comments on commit 85b238d

Please sign in to comment.