Perfect. This will be included in the next release. Thank you.
Well. I tested it and the CVS version does not seem to work.
I display all the special characters except the first zero one.
#!/bin/bash
printf "1" > /mnt/owfs/lcd/LCD_H/home
printf "1" > /mnt/owfs/lcd/LCD_H/clear
printf "1" > /mnt/owfs/lcd/LCD_H/home
printf "A" > /mnt/owfs/lcd/LCD_H/message
nazwa1=0
for nazwa2 in 0 1 2 3 4 5 6 7 ; do
echo "$nazwa1 $nazwa2"
printf "\x$nazwa1$nazwa2" > /mnt/owfs/lcd/LCD_H/screen
done
printf "A" > /mnt/owfs/lcd/LCD_H/screen
printf "1" > /mnt/owfs/lcd/LCD_H/home
printf "1" > /mnt/owfs/lcd/LCD_H/clear
printf "1" > /mnt/owfs/lcd/LCD_H/home
printf "A" > /mnt/owfs/lcd/LCD_H/message
nazwa1=0
for nazwa2 in 0 1 2 3 4 5 6 7 ; do
echo "$nazwa1 $nazwa2"
printf "\x$nazwa1$nazwa2" > /mnt/owfs/lcd/LCD_H/screen
done
printf "A" > /mnt/owfs/lcd/LCD_H/screen
This prints the 8 defined chars stored in display RAM.
Then I try the hourglass
- a hourglass on char '\3' : "31F1F0E04040E1F1F"
> ##### => "1F"
> ##### => "1F"
> .###. => "0E"
> ..#.. => "04"
> ..#.. => "04"
> .###. => "0E"
> ##### => "1F"
> ##### => "1F"
> ##### => "1F"
> ##### => "1F"
> .###. => "0E"
> ..#.. => "04"
> ..#.. => "04"
> .###. => "0E"
> ##### => "1F"
> ##### => "1F"
I omitted the first "3"
I tried
printf "1F1F0E04040E1F1F" > /mnt/owfs/lcd/LCD_H/redefchar_hex.1
but nothing happens.
I don know exactly how to output binary but something like this
printf "1F1F0E04040E1F1F" > /mnt/owfs/lcd/LCD_H/redefchar_.1
changes the displayed char but obviously not displays the right thing.
Another problem is when writing those the 3 pins not used for display are changed.
I'm not sure but maybe
// Add pattern
for ( i = 0 ; i < LCD_REDEFCHAR_LENGTH ; ++i ) {
data[j++] = (pattern[i] & 0xF0) | 0x08;
data[j++] = ((pattern[i] << 4) & 0xF0) | 0x08;
}
for ( i = 0 ; i < LCD_REDEFCHAR_LENGTH ; ++i ) {
data[j++] = (pattern[i] & 0xF0) | 0x08;
data[j++] = ((pattern[i] << 4) & 0xF0) | 0x08;
}
shouldn't there be 0x07 instead of 0x08 like in NIBBLE.. ?
--
p4trykx
On Thu, Nov 1, 2012 at 2:32 PM, Maxime Soulé <[email protected]> wrote:
Hi Paul,
I just tested the feature, sorry for the delay, and it does not work.
The attached patch correct the problems :
1. as specified in the documentation I set redefchar and redefchar_hex
under LCD_H directory, as LCD did not exist;
2. redefchar_hex was not declared with the correct data length
(LCD_REDEFCHAR_LENGTH_HEX);
3. in FS_redefchar_hex the buffer passed to OW_redefchar was not the
converted one.
Best regards,
Max.
Le 27.05.2012 00:11, Paul Alfille a écrit :
> 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]
> - both in one write : "__61F1111111111111F31F1F0E04040E__1F1F"> <mailto:[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"
>
>> <mailto:[email protected]>
> 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
>
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________ Owfs-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/owfs-developers
