You definitely can, but posting code of why you can't do it it always helpful. From an electrical perspective, this is a TERRIBLE idea. I can't tell what configuration you have them in here, but it's most likely one of two situations:
- One Type of motor controller for each drive side. This means that you will not drive straight. Both the SRX and SR are fairly linear (compared to some worse off offenders *cough* victor 888 *cough*), but you will never be able to drive straight. For autonomous, your encoders are going to do extra works that you don't need them to do, and driving in teleop can be harder as well.
- One motor controller of each type on each side. This means that if they aren't outputting the same voltage, one of the motors is getting back driven (maybe a better word, reverse stalling?) and can get damaged over time because of this. It's not a great idea as it also draws more current because one motor is stalled and the other is getting back driven.
If you are REALLY content on this, it's fairly simple. Just declare your various types of motor controllers, then put those four (or two) motor controllers into the RobotDrive constructor class. See more here:
https://wpilib.screenstepslive.com/s...botdrive-class