Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Where? Quick explanation please... (http://www.chiefdelphi.com/forums/showthread.php?t=64464)

mikaljr 18-02-2008 12:24

Where? Quick explanation please...
 
Okay, I am just wondering where I am to put the code for the tele-operable mode. Does it go in the user_routines file or where?

Also can anyone tell me the difference between these variables...

rc_dig_out
rc_dig_in
digital_io

Thanks to anyone who can give me any help! ::)

psy_wombats 18-02-2008 12:35

Re: Where? Quick explanation please...
 
All teleop code should be in user_routines.c, in the function void Process_Data_From_Master_uP(void).

Jon Stratis 18-02-2008 12:44

Re: Where? Quick explanation please...
 
Quote:

Originally Posted by mikaljr (Post 701597)
Also can anyone tell me the difference between these variables...

rc_dig_out
rc_dig_in
digital_io

Thanks to anyone who can give me any help! ::)

the digital_io variables need to be set to either INTPUT or OUTPUT, depending on how you're using them. for example, if you have a switch hooked up to one, it would be an INPUT. if you have an LED hooked up to one, then that would be an OUTPUT.

You then use the rc_dig_in or rc_dig_out to read/set your digital_io ports. only use the rc_dig_in for ports you set as an input, and rc_dig_out for ports you set as an output.


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

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