Vex start up code run PWM outputs without Rx

With the default startup code (the MPLAB project available at http://www.vexlabs.com/vex-robotics-downloads.shtml)

The PWM outputs are not updated when the Reciever unit is not plugged in/transmitter is off. If in Process_Data_From_Local_IO I try to set pwm01=255, nothing happens. I tried to call Process_Data_From_Master_uP(); every loop but that did not help. I would like to use my robot autonomously without having to have the transmitter on or the reciever plugged in.
Thanks.

2 comments:

  1. Search before posting.
  2. This question comes up often.

Actually I did search before I posted this message and I read that thread, if I understood correctly, that method was not for me. When I put in

   txdata.user_cmd = 0x02;       /* Tell master you want to be in auton mode. */ 

in user init, the autonomous code runs, but I want to maintain the normal program as it is, most of the code is in the function “Process_Data_From_Local_IO”. As I look at the code, it appears as if the main loop is calling User_Autonomous_Code and it is never leaving that loop because the flag “autonomous_mode” is never being cleared. Is there another solution to this other than calling “Process_Data_From_Local_IO” from the autonomous loop?

[EDIT]: I have found another way by setting the autonomous loop to “0” is there a prettier way?

If you want to run your regular code autonomously, but don’t want to put it in the autonomous loop, you can bypass the autonomous loop by commenting out the call in main.c and arranging it so you just fall through your normal code.