![]() |
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? |
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. |
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 |
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 ) ; } |
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