Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   OI LED programming (http://www.chiefdelphi.com/forums/showthread.php?t=45139)

P1h3r1e3d13 07-03-2006 19:35

OI LED programming
 
After using the OI LED block to hijack an LED for my own nefarious schemes (or subroutines), is there any way to return it to its rightful purpose (displaying PWM, relay, or switch status) or is it stuck how I set it until the RC resets?

Or does the mysterious EasyC default code map it every time the code loops, so I don't have to worry about it?

Kingofl337 08-03-2006 08:48

Re: OI LED programming
 
EasyC doesn't use default code your OI LEDs only function when
you program them to. So, they don't monitor the state of relays, or limits
like the default code would.

Also, something to note if you use the small LCD display the LED's don't function and vise versa.

P1h3r1e3d13 08-03-2006 20:20

Re: OI LED programming
 
Oh really? I hadn't noticed that EasyC didn't run the LEDs - thanks.
Know any way to get it to? It would seem they would have to be mapped to pointers to the switches, PWMs, and relays, something like:
Code:

OI_LED_08 = &switch_01
But I can't seem to figure out how to use pointers in EasyC, even though the camera capture function uses them.

Kingofl337 12-03-2006 09:11

Re: OI LED programming
 
2 Attachment(s)
You can type a variable name in any input or output. You don't have
to set numbers.

void Autonomous ( void )
{
unsigned char LED_0_State;
unsigned char Enabled;

Enabled = IsEnabled ( ) ;
LED_0_State = Enabled ;
SetOILED ( 0 , LED_0_State ) ;
}

P1h3r1e3d13 12-03-2006 18:54

Re: OI LED programming
 
Thanks, but that part I knew. What I don't is how to grab output values (from PWMs, relays, etc.) to variables. That's what I thought would require pointers.

I think this thread has devolved into the same thing you're helping me with over here, Kingof1337. Weird.
Anyway the difference between the two questions was based on my misunderstanding of EasyC LED code, so I guess this thread is kinda moot now.


All times are GMT -5. The time now is 03:21.

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