|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
|||
|
|||
|
Logitech NASCAR Wheel / Chicklet Safety Issue?
We're using the Chicklet with the Logitech NASCAR Steering Wheel. It's all working great, but we've got a small issue that concerns me.
Because the foot pedals return a value of 255 when up and 0 when fully depressed, our code has to account for this in a different way than we would for a normal joystick. In essence, this means that an input of 127 to our code looks like a halfway depressed foot pedal. That's all well and good until the Chicklet is unplugged or loses power while the robot is still powered on. If that happens, then the OI outputs a value of 127, the robot thinks we've told it to move, and off it goes! We have a disable switch plugged into our OI Competition port at all times, but we've had some cases where the switch wasn't down when the chicklet was unplugged. And I'm actually more worried about the potential for robot misbehavior at competition. Any comments? Any ideas for how our code could detect a missing Chicklet? |
|
#2
|
|||
|
|||
|
Re: Logitech NASCAR Wheel / Chicklet Safety Issue?
one thing I could think to try would be to use a variable to "save" the value and a counter.
If the value = 127 three times in a row, disable movement until some "non-127" value. Pseudo code might look a little like this...... if (fwd == 127) or (rev == 127) { count++; }else { count = 0; disable = false; } if (count == 3) { disable = true; } Hope this helps you. |
|
#3
|
|||||
|
|||||
|
Re: Logitech NASCAR Wheel / Chicklet Safety Issue?
For multiple reasons I suggest subtracting the value of one pedal from the other to get your speed value. Example:
Code:
speed = ((int)left_pedal - (int)right_pedal)/2 + 127; |
|
#4
|
|||
|
|||
|
Re: Logitech NASCAR Wheel / Chicklet Safety Issue?
Thanks for the responses. Brian, I think you nailed the solution. We'll be trying out something like that first thing next Thursday (Granite State Regional).
Hope to see you all in Atlanta! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| NASCAR Racing Wheel | Maria*61806* | Control System | 0 | 31-01-2008 09:58 |
| Logitech NASCAR Racing Wheel Compatible with USB Chicklet | kE7JLM | Technical Discussion | 0 | 17-01-2008 10:01 |
| Comments on the Logitech steering wheel with pedals | waialua359 | Control System | 7 | 14-12-2007 16:08 |