|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
So on my FRC team we are using C++ as our main language with python as a secondary backup language. We only have the means to test one code language at a time and the C++ half of our programming team always get dibs. This caused me to make a test harness to simulate the CRIO. My question is how do I emulate joystick input with (or without) wpilib?
|
|
#2
|
||||
|
||||
|
Re: Test Harness Tips
Use pygame for joystick input.
If your test harness is general enough, you should consider releasing it for others to use. I've been considering making one and adding it to the RobotPy release, but for what we've needed simple unit testing (with a fake wpilib) has been sufficient. Check out this thread. |
|
#3
|
||||
|
||||
|
How exactly would I do that? I have read recently that many people use pygame for this but I can't find anything on how you do it. I don't really ever use pygame (sadly) so I kinda need some help.
|
|
#4
|
||||
|
||||
|
Re: Test Harness Tips
Quote:
For PyGame: http://www.pygame.org/wiki/tutorials |
|
#5
|
||||
|
||||
|
Re: Test Harness Tips
Btw, we have our own test harness library that is associated with RobotPy. See http://www.chiefdelphi.com/forums/sh...d.php?t=109678
|
|
#6
|
|||
|
|||
|
Re: Test Harness Tips
This might be of assistance with pyGame. http://iamtherockstar.com/archive/ma...ame-joysticks/
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|