![]() |
Main loop wierd problem
We hooked up our sensors, and use Kevin's ADC code to pull them.
Then we check for new adc data in the Process_Data_From_Local_IO() function in user rutines fast. That is all fine and well (as in, it works exacly like it should). We recently started to mess around with the autonomus mode, and our debug messages show us that sensor data isn't being updated while we set the autonomus button. when we unset it, the sensor data does gets updated. We checked and Process_Data_From_Local_IO() isn't even called. Code:
while (1) /* This loop will repeat indefinitely. */HELP!!! |
Re: Main loop wierd problem
Liron
Are you using Kevin's new code that uses the 3.0 C compiler? The ADC functions included in that build work well. Jon |
Re: Main loop wierd problem
No, we are still using 2.6.
|
Re: Main loop wierd problem
Try this code. ifi_frc_sensor.zip at http://www.kevin.org/frc/
from Kevin.org you can get the C compiler update and MPLab update (8.0) from microchip.com |
Re: Main loop wierd problem
the problem dosen't appear to be in kevin's code. it's the first thing we checked. the "cpu" dosn't seem to get to our sensor data pooling function for no aperent reason.
|
Re: Main loop wierd problem
Just add a call to Process_Data_From_Local_IO() in User_Autonomous_Code()
between the while and the if NEW_SPI_DATA check. |
| All times are GMT -5. The time now is 23:53. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi