Thank you. It's always great to get a patch, especially for a new feature
like this.

Added to the next release, with a slight change. Instead of a single string
that includes the character number, we will have an array of 8, one for
each user-redefinable character. This matches owfs style better.

Paul Alfille

On Sun, Mar 11, 2012 at 7:48 AM, Maxime Soulé <[email protected]>wrote:

> Hi,
>
> This patch add a new file to the DS2408 LCD_H/ directory: redefchar
>
> It allows to redefine up to 8 chars corresponding to the ASCII codes 0 to
> 7. Once the chars are redefined, they can be displayed with screen*
> functions.
>
> The format of the entry follows:
> - each character definition is 17 bytes long (several characters can be
> defined at one time by concatenating their definition)
> - first char is the index of the redefined character: '0' -> '7' (human
> form) or '\0' -> '\10' (binary form)
> - 16 others define the 8 lines of each character, a pair of hexadecimal
> digit for each char between "00" and "1F" (or "1f", but see the note at the
> end). When a bit is set the corresponding pixel is on. For example:
>
> 18421 <- bits columns
> ..... => "00"
> ..#.. => "04"
> .#.#. => "0A" (because 8 + 2)
> #...# => "11"
> #...# => "11"
> .#.#. => "0A" (because 8 + 2)
> ..#.. => "04"
> ..... => "00"
>
> So to define this character on ascii code '\1', we will use the string:
> "100040A11110A0400"
>
> Other examples:
> - an empty square on char '\6': "61F1111111111111F"
> ##### => "1F"
> #...# => "11"
> #...# => "11"
> #...# => "11"
> #...# => "11"
> #...# => "11"
> #...# => "11"
> ##### => "1F"
>
> - a hourglass on char '\3' : "31F1F0E04040E1F1F"
> ##### => "1F"
> ##### => "1F"
> .###. => "0E"
> ..#.. => "04"
> ..#.. => "04"
> .###. => "0E"
> ##### => "1F"
> ##### => "1F"
>
> - both in one write : "**61F1111111111111F31F1F0E04040E**1F1F"
>
> Note that if redefined chars are already displayed on the LCD, redefining
> them again will change all of them on the display. This behavior is
> hard-coded in the LCD.
>
> Note that one can redefine the character '\0' but it is not always easy to
> manipulate it and/or to display it due to libraries or interfaces
> constraints (like null terminated string handling)...
>
> Lastly, this code use the function hex_digit() in ow_bae.c. This function
> does not work well for lower case hexadecimal digits, except if you apply
> the "ow_bae.c patch" I posted this morning.
>
> Best regards,
>
> Max.
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to