[C++ Pro]: Joystick is controlling a motor that it shouldn't

C++ Pro
VCS Version: 20180820.10.20
VEXos Version: 1.0.1 (controller is 1.0.0)
Moving the joystick to control the velocity of the left motor makes the flip motor.
V5 Robot Code 2019.vex (5.5 KB)

Not seeing that issue here.
FlipDriveMotor and LiftDriveMotor go together but seems by design (both on L1/R1 buttons)

Did you plug the motors into the right ports? Do the actual ports match what you have in robot-config.h?

the ports match and the FlipDriveMotor and LiftDriveMotor going together is my fault when I was copying and pasting. I’ll try updating the controller firmware tomorrow and making sure the code is downloading because it was pretty confusing.

ok I redownloaded the program and updated the controller software and it seems to be working fine

I was having trouble figuring out how the Controller.ButtonDown.pressed(pressedFunction); works if you have time to explain

pressed (as opposed to pressing) identifies an event, in this case when the button goes from released to pressing. The function you put in there is what you want to happen when that event occurs.

yes but I can’t figure out how to call a function when the button is pressed

There’s an example here showing the “pressed” event.
https://vexforum.com/t/how-do-i-use-the-controller-button-pressed-command/49338/1

This way of detecting buttons is a little more advanced than the traditional way of polling the button’s state, you may want to write your code using the “pressing” method that simply returns whether the button is pressed (yes, unfortunate naming here) or not.

@jpearman Alright thank you, and what is the highest and lowest joystick value is it 127 to -127 like with the v4? It also seems that our motors slow down when they get a little warm, is there anyway to prevent that?

The “value()” method returns values in the range +/- 127. “Position()” would return values in percentage, that is +/- 100. You can send those directly to a motor method that want’s input as percent.

The old 393 motors would trip the PTC when it was hot, that could happen quite quickly if you stalled the motor. The V5 motors will also get hot if you run them too hard, they will have their power cut when that happens until they cool down again.

@jpearman I’m having trouble with the buttons, the L1-L2 buttons work fine with the velocity stuff, but the R1 button won’t rotate the motor by 180 degrees and for some reason is instead tethered to axis 3.
V5 Robot Code 2019.vex (6.5 KB)