Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » LED Ctrl (for characters and numbers)
LED Ctrl (for characters and numbers) [message #27727] Fri, 30 July 2010 15:40 Go to next message
cb31_fr is currently offline  cb31_fr
Messages: 5
Registered: April 2007
Promising Member
Hello,

I have discovered your marvellous IDE some months ago.
Congratulations ! Very powerful and complete tool...

Here is my little contribution for displaying LED characters.
If you find it useful, you can insert it into Upp.
You can also modify this package for improving it.

Sorry, my code is certainly not perfect, but my knowledge in C++ is limited.

My english too ; sorry again Wink

Regards
Christian
Re: LED Ctrl (for characters and numbers) [message #27734 is a reply to message #27727] Fri, 30 July 2010 17:33 Go to previous messageGo to next message
jerson is currently offline  jerson
Messages: 202
Registered: June 2010
Location: Bombay, India
Experienced Member

Christian

Could you please attach a screenshot? I am unable to load the project files / I don't know how to do it.

Jerson

Never mind, I managed to get it working and here is the screenshotindex.php?t=getfile&id=2697&private=0 Super!!!
  • Attachment: led.gif
    (Size: 10.79KB, Downloaded 514 times)

[Updated on: Fri, 30 July 2010 17:58]

Report message to a moderator

Re: LED Ctrl (for characters and numbers) [message #27736 is a reply to message #27734] Fri, 30 July 2010 21:44 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3398
Registered: August 2008
Senior Veteran
Ja ja, very pretty Smile

If it is not in CtrlLib it has to be in Bazaar soon!

Christian, if you cannot do it I can help you.


Best regards
Iñaki
Re: LED Ctrl (for characters and numbers) [message #27742 is a reply to message #27736] Sat, 31 July 2010 18:00 Go to previous messageGo to next message
cb31_fr is currently offline  cb31_fr
Messages: 5
Registered: April 2007
Promising Member
Thanks a lot.

I let you to insert this LED control into CtrlLib or into Bazaar part.

And if someone wants to improve it with new effects, no problem !!

Regards
Christian
Re: LED Ctrl (for characters and numbers) [message #27755 is a reply to message #27727] Sun, 01 August 2010 23:18 Go to previous message
koldo is currently offline  koldo
Messages: 3398
Registered: August 2008
Senior Veteran
Hello cb31_fr

It is now added in Bazaar.

I have done some changes relating with this:

Before
	MyLED = new LEDCtrl( "<>@^&~\"{A¨\\'Z`(E#|_R)\"N°Y}=!-+*/0:12.3[45],;?%", 3, White, Blue ) ;
	MyLED->SetBgColor( LtBlue ) ;


After
	MyLED.SetString("<>@^&~\"{A¨\\'Z`(E#|_R)\"N°Y}=!-+*/0:12.3[45],;?%")
		 .SetLEDSize(3).SetFgLightOnColor(White).SetFgLightOffColor(Blue).SetBgColor(LtBlue);


I have removed the "new" in code. The U++ coding style is protective so recommends not to use new or malloc. Because of it it is not possible to initialize a Ctrl in the constructor, so I have added some functions to do it after.

The advantage of it is that you will not see heap leaks.

Please check the code. The changes have been light so the order of function calls could change the result.

Thank you very much Smile. Please improve it as many times as you like.

Included in Bazaar table too here http://www.ultimatepp.org/www$uppweb$bazaar$en-us.html (on Monday).


Best regards
Iñaki

[Updated on: Sun, 01 August 2010 23:26]

Report message to a moderator

Previous Topic: NEW: PortQueue (M$ CCR port to u++)
Next Topic: NEW: Dispatcher (templateable dispatcher helper for MVC pattern and more)
Goto Forum:
  


Current Time: Fri Nov 01 00:22:32 CET 2024

Total time taken to generate the page: 0.03201 seconds