Re: [Owfs-developers] Bug in DS2409 code, patch included

2006-12-14 Thread Paul Alfille

Jan,

Thank you very much!

Paul Alfille


On 12/14/06, Jan Kandziora [EMAIL PROTECTED] wrote:


Hi All, Hi Paul

I think I found a bug in the DS2409 code. According to the datasheet, the
discharge lines command is 0x99, not 0xCC (that's Smart-On Main). Proposed
patch:

--- owfs.orig/module/owlib/src/c/ow_2409.c  2006-12-14 20:50:
04.0
+0100
+++ owfs/module/owlib/src/c/ow_2409.c   2006-12-14 20:51:16.0+0100
@@ -128,7 +128,7 @@
}

static int OW_discharge( const struct parsedname * pn ) {
-BYTE dis[] = { 0xCC, } ;
+BYTE dis[] = { 0x99, } ;
struct transaction_log t[] = {
TRXN_START,
{ dis, NULL, 1, trxn_match } ,

Kind regards

   Jan
--
Vollkommener Blödsinn: Selbst wenn man den mit was Vernünftigen
mischt, kommt immer noch mindestens 50%er Blödsinn 'bei 'raus.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Bug in DS2409 code, patch included

2006-12-14 Thread Jan Kandziora
Am Donnerstag, 14. Dezember 2006 22:29 schrieb Paul Alfille:
 Jan,

 Thank you very much!

I think I found another occurrence of this bug. As the discharge lines command 
is not really needed for branch turnoff, I left it out.



diff -Naur owfs.orig/module/owlib/src/c/ow_select.c 
owfs/module/owlib/src/c/ow_select.c
--- owfs.orig/module/owlib/src/c/ow_select.c2006-12-14 20:50:04.0 
+0100
+++ owfs/module/owlib/src/c/ow_select.c 2006-12-14 23:49:21.0 +0100
@@ -148,14 +148,14 @@

 /* find every DS2409 (family code 1F) and switch off, at this depth */
 static int Turnoff( int depth, const struct parsedname * pn ) {
-BYTE sent[2] = { 0xCC, 0x66,} ;
+BYTE sent[] = { 0x66,} ;
 int ret ;

 //printf(TURNOFF entry depth=%d\n,depth) ;

 if( (ret= BUS_reset(pn)) ) return ret ;
 if ( depth  (ret=BUS_select_subbranch((pn-bp[depth-1]),pn)) ) return 
ret ;
-return BUS_send_data(sent,2,pn)  ;
+return BUS_send_data(sent,1,pn)  ;
 }

 static int BUS_selection_error( int ret ) {



Kind regards

Jan
-- 
Wie kann eigentlich eine 1:1-Kopie nicht wörtlich sein?
Wahrscheinlich hat das Fernsehen meine Phantasie zerstört.
(Das habe ich jetzt nicht-wörtlich von den Simpsons geklaut,
selbst wäre ich zu einem solchen Gedanken natürlich nicht imstande.)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Bug in DS2409 code, patch included

2006-12-14 Thread Jan Kandziora
Am Donnerstag, 14. Dezember 2006 23:52 schrieb Jan Kandziora:
 Am Donnerstag, 14. Dezember 2006 22:29 schrieb Paul Alfille:
  Jan,
 
  Thank you very much!

 I think I found another occurrence of this bug. As the discharge lines
 command is not really needed for branch turnoff, I left it out.

Ahhh, forget the previous posting... 0xCC is required there.

Kind regards

Jan
-- 
Linux - It's now safe to turn on your computer.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers


Re: [Owfs-developers] Bug in DS2409 code, patch included

2006-12-14 Thread Paul Alfille

I've applied the origical patch.

As soon as we get the simultaneous/single and simultaneous/present stable,
I'll make another release.

Paul



On 12/14/06, Jan Kandziora [EMAIL PROTECTED] wrote:


Am Donnerstag, 14. Dezember 2006 23:52 schrieb Jan Kandziora:

Ahhh, forget the previous posting... 0xCC is required there.

Kind regards

Jan

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers