Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 16:53 19 May 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : GUI LED Colors?

Author Message
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 10:41pm 01 Jun 2017
Copy link to clipboard 
Print this post

Stupid question.

I know I can turn a GUI LED on or off. But is it possible to turn an LED a different color? Say Green for good, Red for a fault condition?

Cheers,

GTG!
...... Don't worry mate, it'll be GoodToGo!
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1805
Posted: 11:10pm 01 Jun 2017
Copy link to clipboard 
Print this post


Edited by palcal 2017-06-03
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 12:58am 02 Jun 2017
Copy link to clipboard 
Print this post

Page 49 of the manual mentions the colour when defining the LED, then goes on to say:-

[Quote]The colour can be changed with the GUI FCOLOUR command.[/quote]

But I don't quite understand that bit.

I get the impression that it's colour is set once when it's defined.

I have some coloured LED's on a couple of my MM2's, but they are really just RBOX's that I re-write in a different colour.

Phil.
 
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 01:09am 02 Jun 2017
Copy link to clipboard 
Print this post

Hmmmm, I'm reading the burst in the manual about the GUI FCOLOUR command. Looks like I'll have to play around with some code and see what happens.

GTG!
...... Don't worry mate, it'll be GoodToGo!
 
GoodToGo!

Senior Member

Joined: 23/04/2017
Location: Australia
Posts: 188
Posted: 01:22am 02 Jun 2017
Copy link to clipboard 
Print this post

Yep, works as advertised. Thanks Phil!

GTG!
...... Don't worry mate, it'll be GoodToGo!
 
Phil23
Guru

Joined: 27/03/2016
Location: Australia
Posts: 1664
Posted: 10:37am 02 Jun 2017
Copy link to clipboard 
Print this post

  GoodToGo! said   Yep, works as advertised. Thanks Phil!

GTG!


Cool,

My RBOX LED's flick from yellow to green,
but the E100 ones only go on/off.

Would like it to blink Green (as it does) when a good coms packet is received,
but also blink red if a bad packet is received.

ATM bad packets cause no LED activity at all.

Any chance of posting a small bit of code showing how you are using FCOLOUR to change the LED.

Phil.

Edit:= Pretty simple, think I had a different command in mind.

[Code]GUI FCOLOUR colour,
#ref1 [, #ref2, #ref3, etc]
This will change the foreground colour of the specified controls to 'colour'
which is an RGB value for the drawing colour.
'#ref' is the control's reference (a number from 1 to 100).[/code]Edited by Phil23 2017-06-03
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024