Re: [Owfs-developers] New device driver - write function not being called
Am 16.02.2017 um 09:10 schrieb Alastair D'Silva: >> -Original Message- >> From: Alastair D'Silva [mailto:alast...@d-silva.org] >> Sent: Thursday, 16 February 2017 7:02 PM >> To: 'OWFS (One-wire file system) discussion and help' > develop...@lists.sourceforge.net> >> Subject: Re: [Owfs-developers] New device driver - write function not > being >> called >> >> if (channel->fade_time >= (2^24)) { >> return gbBAD; >> } > > And there's the problem - that's not how you perform a power operation :) > You're welcome. __[^_^]__ Kind regards Jan -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
Re: [Owfs-developers] New device driver - write function not being called
> -Original Message- > From: Alastair D'Silva [mailto:alast...@d-silva.org] > Sent: Thursday, 16 February 2017 7:02 PM > To: 'OWFS (One-wire file system) discussion and help' develop...@lists.sourceforge.net> > Subject: Re: [Owfs-developers] New device driver - write function not being > called > > if (channel->fade_time >= (2^24)) { > return gbBAD; > } And there's the problem - that's not how you perform a power operation :) -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
Re: [Owfs-developers] New device driver - write function not being called
> -Original Message- > From: Jan Kandziora [mailto:j...@gmx.de] > Sent: Thursday, 16 February 2017 3:01 AM > To: OWFS (One-wire file system) discussion and help develop...@lists.sourceforge.net> > Subject: Re: [Owfs-developers] New device driver - write function not being > called > > Am 15.02.2017 um 12:54 schrieb Alastair D'Silva: > > > > Command: > > > > echo "5,10,15,20,300" > /mnt/1wire/FE.DECEA5EDBEEF/channel0 > > -bash: echo: write error: Invalid argument > > > Is your parse_rgbw_string() tolerant against \n? Thanks Jan, it should be, but for completeness, here it is: static GOOD_OR_BAD parse_rgbw_string(char *buf, RGBW_CHANNEL *channel) { if (sscanf(buf, "%hhu,%hhu,%hhu,%hhu,%d", >red, >green, >blue, >white, >fade_time) != 5) { LEVEL_DEBUG("Parsing failed"); return gbBAD; } if (channel->fade_time >= (2^24)) { return gbBAD; } return gbGOOD; } Note that I don't get the debug message out. I did notice that this might be the first time that writes are used on a ft_vascii field, so I may not be following a well-tested path. -- Alastair D'Silva mob: 0423 762 819 skype: alastair_dsilva msn: alast...@d-silva.org blog: http://alastair.d-silva.orgTwitter: @EvilDeece -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers
Re: [Owfs-developers] New device driver - write function not being called
Am 15.02.2017 um 12:54 schrieb Alastair D'Silva: > > Command: > > echo "5,10,15,20,300" > /mnt/1wire/FE.DECEA5EDBEEF/channel0 > -bash: echo: write error: Invalid argument > Is your parse_rgbw_string() tolerant against \n? Kind regards Jan -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Owfs-developers mailing list Owfs-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/owfs-developers