|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: Radio Probs
Even when the robot is disabled it is reading input from joysticks.
IF your programmers removed the piece of code setting all the pwm outputs to 127 during autonomous mode those movements could be the result of the robot tryng to move while disabled. If you need more info about this possible problem PM or e-mail me haskinseric@hotmail.com. |
|
#2
|
||||
|
||||
|
Re: Radio Probs
As the poster above said - you need to set all PWM's to 127 to keep it from moving. Just put that in your autonomous loop and it won't move at all.
|
|
#3
|
|||
|
|||
|
Re: Radio Probs
Quote:
and yes we already reset the code... |
|
#4
|
||||
|
||||
|
Re: Radio Probs
Quote:
In other words, if you don't say pwm01 = pwm02 = ... = 127 at the beginning of your autonomous, the robot can do whatever it wants. |
|
#5
|
|||||
|
|||||
|
Re: Radio Probs
It is also possible that you are not loading the right code into the robot. Either that or a little detail in the code is causing all this trouble. I'd triple check if the code you edited(directory) is the code you actually uploaded to the robot. This has happen to me a couple times and its a frustrating discovery.
|
|
#6
|
|||||
|
|||||
|
Re: Radio Probs
Quote:
To add to what prograid said, you shouldn't ever assume the initialization state of any variables in your program. This can lead to very bad problems, especially since a value of 0, a common initialization value, does not halt the motor! If you do not set the PWM values to idle you can have some very weird and dangerous results. |
|
#7
|
||||
|
||||
|
Re: Radio Probs
Quote:
Even if you are doing other things in autonomous it is a bad idea not to set the PWMs to 127. |
|
#8
|
|||||
|
|||||
|
Re: Radio Probs
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: Radio Probs
Quote:
When the robot is disabled, all joystick and switch input is passed along normally. It's only the outputs that are suppressed. You can see this behavior using a Dashboard program. In autonomous mode, the inputs are indeed forced to neutral (all joysticks at 127, all switches off). But if your program doesn't do anything in autonomous, that can be a problem. Not doing anything means not shutting off things that were trying to move just before autonomous was selected. That's what Eric and Tom are trying to warn about. If you want to remove all autonomous actions, make sure to leave in the part at the beginning that sets all the pwm outputs to 127. Otherwise, a mistrimmed joystick or flipped switch can cause things to start moving and not stop until the teleoperated code starts running. Here's another piece of useful advice: if you have limit switches to protect mechanisms from moving too far, put the code to read the switches (and take action based on them) in the Process_Data_From_Local_IO() function, and call that function from within the autonomous loop. The default code only calls it when in teleoperated mode. |
|
#10
|
|||||
|
|||||
|
Re: Radio Probs
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Ham Radio and Radio at FIRST | bcieslak | General Forum | 41 | 06-04-2007 10:41 |
| T_Packet_Data.mx probs | Ryan O | Programming | 4 | 14-02-2006 00:34 |
| need 2003 radio/help with old radio | MaxM | Technical Discussion | 2 | 04-01-2004 15:31 |
| FM radio transmitter | Alexander McGee | Electrical | 11 | 29-10-2003 19:41 |
| radio transmitters | Arin | Technical Discussion | 2 | 18-12-2002 01:59 |