Go to Post Weight down low is a good thing. Weight up high is not. - s_forbes [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
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
  #2   Spotlight this post!  
Unread 05-02-2008, 10:47
David Bryan David Bryan is offline
Registered User
#0818 (Steel Armadillo)
 
Join Date: Jan 2002
Location: Warren Consolidated Schools
Posts: 8
David Bryan is an unknown quantity at this point
Question Re: paper: A programming template for Autonomous Mode


Dear GaryK or anyone willing to hear.

I took this working section out of user_routines.c and renamed part of it and placed it into user_routines_fast.c. It will not compile. I cannot find my error. The same program will compile back in user_routines.c.

Here is the program:

/************************************************** *****************************
* FUNCTION NAME: Lim_Mix
* PURPOSE: Limits the mixed value for one joystick drive.
* CALLED FROM: Default_Routine, this file
* ARGUMENTS:
* Argument Type IO Description
* -------- ---- -- -----------
* intermediate_value int I
* RETURNS: unsigned char
************************************************** *****************************/
unsigned char Lim_Mix (int intermediate_valu)
{ // < I get a compile error here.
static int limited_valu;

if (intermediate_valu < 2000)
{
limited_valu = 2000;
}
else if (intermediate_valu > 2254)
{
limited_valu = 2254;
}
else
{
limited_valu = intermediate_valu;
}
return (unsigned char) (limited_valu - 2000);
}

// when i place the cursor over the variable, limited_valu
// i get the bubble [limited_valu = Out of Scope].
// please help

// thanks - David Bryan Team 818
Reply With Quote
 


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
A programming template for Autonomous Mode garyk Programming 2 05-02-2008 20:08
Help needed in autonomous programming for hybrid mode Team_STORM Programming 3 21-01-2008 19:11
White Paper Discuss: C Programming and Autonomous Modes for Newbies cbolin Extra Discussion 3 09-01-2008 19:32
Help for finding Autonomous Programming Template vito3693 VEX 2 23-11-2006 19:01
Programming Autonomous mode Jared Stofflett Programming 3 11-11-2003 09:32


All times are GMT -5. The time now is 00:18.

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