Go to Post As we were lying the robot down to work on it "CAD me like one of your french robots" - 1uan [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-02-2008, 14:40
Tottanka's Avatar
Tottanka Tottanka is offline
It isnt about bots,its about humans
AKA: Liron Gurvitz
FRC #3211 (The Y Team)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2006
Location: Hadera, Israel
Posts: 1,418
Tottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond reputeTottanka has a reputation beyond repute
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. */
  {
#ifdef _SIMULATOR
    statusflag.NEW_SPI_DATA = 1;
#endif

    if (statusflag.NEW_SPI_DATA)      /* 26.2ms loop area */
    {                                 /* I'm slow!  I only execute every 26.2ms because */
                                      /* that's how fast the Master uP gives me data. */
      Process_Data_From_Master_uP();  /* You edit this in user_routines.c */

      if (autonomous_mode)            /* DO NOT CHANGE! */
      {
        User_Autonomous_Code();        /* You edit this in user_routines_fast.c */
      }
    }
    Process_Data_From_Local_IO();     /* You edit this in user_routines_fast.c */
                                      /* I'm fast!  I execute during every loop.*/
  } /* while (1) */
There is no aperent reason for the autonomus code and mode to affect the runing of the main loop, but for some reason it does.
HELP!!!
__________________
My FRC record: 10 Years,FTA (2008-9), 3 Teams(1947,2669,3211).3 RCA, 1 Championship EI(2016), 1 Divisional finalist (2016), 1 Regional winner.
Israeli 2016 Volunteer of the year.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wierd search behavior.... Salik Syed Programming 7 23-02-2006 13:12
Very wierd compiling problem! Max Brin Programming 6 08-02-2006 15:43
problem with using a loop CompMaster Programming 7 03-02-2006 16:44
Rewriting main loop Max Lobovsky Programming 4 04-01-2005 18:35
Wierd basic init Jeremy J Programming 5 06-02-2003 11:42


All times are GMT -5. The time now is 23:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi