| | tweaking around dlcd_show( ) Alexandre Bec
|
| | Hi all legOS users, need help about dlcd_* utilities I'd like to display on the lcd a sequence of digits: something like : dlcd_show (LCD_4_BOTL); lcd_refresh(); msleep(250); lcd_clear(); dlcd_show (LCD_4_TOPL); lcd_refresh(); msleep(250); (...) (23 years ago, 25-Aug-01, to lugnet.robotics.rcx.legos)
|
| | |
| | | | Re: tweaking around dlcd_show( ) Martin Scragg
|
| | | | Hi, I haven't used LegOs (yet), but looking at the dlcd_show function, it expects 2 parameters. The defines are also for 2 parameters, so you would need to define and use it like this: int progressPattern[PATT...S_NB][2]={ {LCD_4_BOTL} , (...) (23 years ago, 25-Aug-01, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: tweaking around dlcd_show( ) Alexandre Bec
|
| | | | | Thanks Martin, I tried this too but it doesn't work : progress.c:27: macro `dlcd_show' used with too many (2) args progress.c:27: macro `BIT_OF' used with just one arg progress.c:27: macro `BYTE_OF' used with just one arg The hint seems to fit two (...) (23 years ago, 25-Aug-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | | | | Re: tweaking around dlcd_show( ) Martin Scragg
|
| | | | | (...) Ooops! I obviously wasn't looking at it properly last night (only browsing through the zip file). As 'dlcd_show' is defined as a macro that takes one parameter, but uses it twice to each of BIT_OF and BYTE_OF, which in turn both take 2 (...) (23 years ago, 26-Aug-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | | | | Re: tweaking around dlcd_show( ) Ross Crawford
|
| | | | | (...) Nope - bit_set(0xef46,0x4) will work, but not dlcd_show(0xef46,0x4), as it needs only 1 parameter. (...) Choosing the types of the struct elements is the problem - these are passed to the h8's bset instruction. First, I tried void* & char, but (...) (23 years ago, 27-Aug-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | | | | Re: tweaking around dlcd_show( ) Martin Scragg
|
| | | | | (...) Since writing this, I have set up a LegOs build environment, so had a play with it. It doesn't seem very useful the way it is written. See my bit about it below. (...) I had a bit of a go doing this as well, and since I didn't know what the (...) (23 years ago, 27-Aug-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | | | | Re: tweaking around dlcd_show( ) Ross Crawford
|
| | | | | (...) LCD_4_BOTL (...) I agree it's a bit bodgy. The one advantage is you only need to pass a single #define when calling it directly (OK not a huge advantage, but if you look at the values in the #defines, you'll see why it was done that way). But (...) (23 years ago, 27-Aug-01, to lugnet.robotics.rcx.legos)
|
| | | | | |
| | | | Re: tweaking around dlcd_show( ) Bernardo Dal Seno
|
| | | | (...) The macros LCD_?_* expand to two integers, separated by a comma; dlc_show() is a macro that expects one argument but uses it as an argument to macros expecting two arguments. I don't know exactly how this works, but it's to do with the order (...) (23 years ago, 3-Sep-01, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: tweaking around dlcd_show( ) Alexandre Bec
|
| | | | Thank you Bernardo. As I explained during the discussion with Martin, I decided to use rather arrays of functions. So now I've got my own functions like void Lcd4BotL(){ dlcd_show(LCD_4_BOTL); } and the use of the array with an index is now fully (...) (23 years ago, 4-Sep-01, to lugnet.robotics.rcx.legos)
|
| | | | |
| | | | | | Re: tweaking around dlcd_show( ) Bernardo Dal Seno
|
| | | | (...) Due to an error of my news-reader I missed some answers to your original post. Probably mine is a little late. bye Bernardo e-mail: dibbe@freestation.it (23 years ago, 4-Sep-01, to lugnet.robotics.rcx.legos)
|
| | | | |