I agree that debug library should not only be for print. I have thought that format.jal should also be added to the debug library. What do you think?
I have suggested a led_blink library in the past, it was small and not so useful. We should create one that can make various patterns on one or more led's. I think some may disagree about this led library if there are blocking delay's. Should we use blocking delays or a timer interrupt? or maybe add a constant so the user may choose? I think the proper syntax would be: debug_led_strobe(pattern_led_0,debug_level) To make numbers/debug levels on led's, you could do binary where a short pulse is a 0 and a long pulse is a 1. so the number 2 would be LONG .... SHORT. and possibly separate numbers with a very short pulse the pin tools lib may be useful for this. Matt. On Oct 2, 4:48 am, Sebastien Lelong <[email protected]> wrote: > Hi guys, > > I'm late on this topic... but... as you know, using LEDs is also a way to > debug code. Could there be a way to put some LED logic in debug.jal, or is > it too closed to print ? > > Instead of printing messages, there could be a way to "print" light patterns > ? > > -- in a led.jal library ? > const STROBE_PATTERN = "0-1000,1-10,R10" -- off for 1000ms, on for 10ms, > repeat 10 times" > > -- main > alias pattern_led0 is pin_b5 > include led.jal > const bit DEBUG_MASTER_ENABLE = TRUE > include debug > debug_lvl_0 = ON -- LED0 will be used as a way to debug code for level0 > debug_led(pattern_led0,STROBE_PATTERN) > > pattern_led is a pseudo-var which actually parse the given string (pattern) > and act on the registered LED (problem is we need as many parse/pseudo-vars > as LEDs using this logic). Note we could add a print_led() procedure to > print.jal too... "Pattern language" could be more advanced, but should be > kept simple to easily define new patterns. > > Do you get the rough idea ? What do you think ? > > Cheers, > Seb > > 2010/9/19 mattschinkel <[email protected]> > > > > > > Okay, I missed the 'normal var' context, so I guess we agree that with > > > the current compiler, there is no way to get it to work without > > > substantial overhead, right? > > > > Joep > > > If you mean the current compiler (with a bug), then yes. I will put in > > a bug report and we can re-visit this topic later. > > > Matt. > > > -- > > You received this message because you are subscribed to the Google Groups > > "jallib" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<jallib%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/jallib?hl=en. > > -- > Sébastien Lelonghttp://www.sirloon.nethttp://sirbot.org -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
