Quantcast

suspect typo and submission of demonstration application

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

suspect typo and submission of demonstration application

Rodney Sinclair
The following appears to be a typo on the Python interface for the FT230X:

   CBUSG_DRIVE1 should probably be CBUSH_DRIVE_1

The attached Python script demonstrates how to set the maximum current
and to configure one of the CBUS pins on an FT230X.

Rodney


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

config.py (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: suspect typo and submission of demonstration application

Thomas Jarosch
Hello Rodney,

On Thursday, 8. January 2015 10:35:14 Rodney Sinclair wrote:
> The following appears to be a typo on the Python interface for the FT230X:
>
>    CBUSG_DRIVE1 should probably be CBUSH_DRIVE_1
>
> The attached Python script demonstrates how to set the maximum current
> and to configure one of the CBUS pins on an FT230X.

thanks for the hint about the typo, it's actually wrong in the libftdi
header file. At first I thought about introducing a compat enum entry,
but given that this has never been spotted before, I don't think it's worth
the effort.

Regarding the example application: The license says it's
"released to the public". Is your intention to license it
as the same license as libftdi (GPL v2)?

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: suspect typo and submission of demonstration application

Rodney Sinclair
Thomas,

The GPL v2 license is OK.

Do I need to resubmit it or can you just change it?

Rodney

On 01/14/2015 02:42 AM, Thomas Jarosch wrote:

> Hello Rodney,
>
> On Thursday, 8. January 2015 10:35:14 Rodney Sinclair wrote:
>> The following appears to be a typo on the Python interface for the FT230X:
>>
>>     CBUSG_DRIVE1 should probably be CBUSH_DRIVE_1
>>
>> The attached Python script demonstrates how to set the maximum current
>> and to configure one of the CBUS pins on an FT230X.
> thanks for the hint about the typo, it's actually wrong in the libftdi
> header file. At first I thought about introducing a compat enum entry,
> but given that this has never been spotted before, I don't think it's worth
> the effort.
>
> Regarding the example application: The license says it's
> "released to the public". Is your intention to license it
> as the same license as libftdi (GPL v2)?
>
> Cheers,
> Thomas
>
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to [hidden email]
>
>
>


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: suspect typo and submission of demonstration application

Robin Haberkorn
In reply to this post by Thomas Jarosch
Hi,

On 14.01.2015 11:42, Thomas Jarosch wrote:
> Hello Rodney,
>
> On Thursday, 8. January 2015 10:35:14 Rodney Sinclair wrote:
>> The following appears to be a typo on the Python interface for the FT230X:
>>
>>     CBUSG_DRIVE1 should probably be CBUSH_DRIVE_1
>>

True. I also fixed that in the patch I sent yesterday. Also I didn't
mention it. Sorry :-)

>> The attached Python script demonstrates how to set the maximum current
>> and to configure one of the CBUS pins on an FT230X.
>
> thanks for the hint about the typo, it's actually wrong in the libftdi
> header file. At first I thought about introducing a compat enum entry,
> but given that this has never been spotted before, I don't think it's worth
> the effort.
>
> Regarding the example application: The license says it's
> "released to the public". Is your intention to license it
> as the same license as libftdi (GPL v2)?
>
> Cheers,
> Thomas
>
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to [hidden email]
>

--
Robin Haberkorn
Developer

metraTec GmbH
Werner-Heisenberg-Str. 1
39106 Magdeburg
Germany

[hidden email]
www.metratec.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: suspect typo and submission of demonstration application

Thomas Jarosch
Hi Robin,

On Wednesday, 14. January 2015 17:09:26 Robin Haberkorn wrote:
> On 14.01.2015 11:42, Thomas Jarosch wrote:
> > Hello Rodney,
> >
> > On Thursday, 8. January 2015 10:35:14 Rodney Sinclair wrote:
> >> The following appears to be a typo on the Python interface for the
FT230X:
> >>     CBUSG_DRIVE1 should probably be CBUSH_DRIVE_1
>
> True. I also fixed that in the patch I sent yesterday. Also I didn't
> mention it. Sorry :-)

I have to take a closer look at your two patches the next days,
especially regarding backward compatibility.

Regarding your other question: The mailinglist is
the right place to post patches :)

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Re: suspect typo and submission of demonstration application

Thomas Jarosch
In reply to this post by Rodney Sinclair
Hi Rodney,

On Wednesday, 14. January 2015 06:04:15 Rodney Sinclair wrote:
> Thomas,
>
> The GPL v2 license is OK.
>
> Do I need to resubmit it or can you just change it?

I've submitted it with a modified header:
http://developer.intra2net.com/git/?p=libftdi;a=commit;h=d160863c527c8a3fdf1e821a64c59192a2fc2150

Also fixed up the CBUSG_DRIVE1 -> CBUSH_DRIVE_1 change.

btw: You might want to run "pep8" on your example code.
There are a lot of line endings with ";"... ;)

Cheers,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: suspect typo and submission of demonstration application

Robin Haberkorn
In reply to this post by Thomas Jarosch
Hi Thomas,

the last patch I've sent breaks backward compatibility somewhat.
Especially since CBUSG_DRIVE1 was renamed to CBUSH_DRIVE1. If
compatibility matters, we can add a deprecated CBUSG_DRIVE1 constant/define.

Also, the larger function codes (for FT-X) have their own enum now. But
since the ftdi_cbush_function enum was not very well suited for setting
CBUS functions on FT230X and it was extended only recently, I doubt that
many people rely on the old constants.

Regarding the `ftdi_eeprom` changes: Setting CBUS functions on FT232H
and FT230X was not really possible in v1.2 -- at least not without
hacking. Also, to find out that ftdi_eeprom even supports that means you
would have had to read its source code as it wasn't documented.
On the other hand, I also renamed the CBUS function names for the
"cbusN" options on type R chips, so they match the ftdi.h constant names.
So yes, even setting CBUS function codes on type R chips with
ftdi_eeprom is not backwards compatible after applying my patch.

Another change in ftdi_eeprom was to flash the chip-specific CBUS
function defaults, unless overwritten by one of the "cbusN", "cbushN" or
"cbusxN" options. However I don't see how anyone could desire the old
behaviour of overwriting the CBUS functions if these options are not
specified. Together with the inability to set the CBUS functions on
FT232H and FT230X chips properly, this old behaviour seriously limited
ftdi_eeprom's usefulness on these chips.

Best regards,
Robin

On 14.01.2015 17:14, Thomas Jarosch wrote:

> Hi Robin,
>
> On Wednesday, 14. January 2015 17:09:26 Robin Haberkorn wrote:
>> On 14.01.2015 11:42, Thomas Jarosch wrote:
>>> Hello Rodney,
>>>
>>> On Thursday, 8. January 2015 10:35:14 Rodney Sinclair wrote:
>>>> The following appears to be a typo on the Python interface for the
> FT230X:
>>>>      CBUSG_DRIVE1 should probably be CBUSH_DRIVE_1
>>
>> True. I also fixed that in the patch I sent yesterday. Also I didn't
>> mention it. Sorry :-)
>
> I have to take a closer look at your two patches the next days,
> especially regarding backward compatibility.
>
> Regarding your other question: The mailinglist is
> the right place to post patches :)
>
> Cheers,
> Thomas
>
>
> --
> libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
> To unsubscribe send a mail to [hidden email]
>

--
Robin Haberkorn
Developer

metraTec GmbH
Werner-Heisenberg-Str. 1
39106 Magdeburg
Germany

[hidden email]
www.metratec.com

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [hidden email]  

Loading...