Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Development => Topic started by: timmerk15 on September 30, 2012, 07:50:38 am

Title: Difference between SVN repos?
Post by: timmerk15 on September 30, 2012, 07:50:38 am
I see Bus Pirate code in two different Google Code projects. One is here:

https://code.google.com/p/the-bus-pirat ... nk/source/ (https://code.google.com/p/the-bus-pirate/source/browse/trunk/source/)

and the other is here: https://code.google.com/p/dangerous-pro ... /Firmware/ (https://code.google.com/p/dangerous-prototypes-open-hardware/source/browse/trunk/Bus_Pirate/Firmware/)

What is the difference? Did the code move to a newer repo, and the other repo is obsolete? Or is one a fork?

Thanks!
Title: Re: Difference between SVN repos?
Post by: tayken on September 30, 2012, 01:52:15 pm
Bus Pirate source was used to have it's own SVN (the first one on your message). Then they got merged together as with BPv4 we needed a USB stack which was maintained under the second SVN. So the first repo you mentioned is obsolete, the latest code is in dangerous-prototypes.
Title: Re: Difference between SVN repos?
Post by: timmerk15 on September 30, 2012, 06:18:29 pm
Ah, I see. That helps a lot - thanks!
Title: Re: Difference between SVN repos?
Post by: ian on October 12, 2012, 04:10:17 pm
Sorry, I really do need to make that clearer!
Title: Re: Difference between SVN repos?
Post by: Fake0Name on January 30, 2013, 08:59:06 pm
Is this completely true?

The code for pyBusPirateLite in the the-bus-pirate googlecode repository is more up-to-date then the dangerous-prototypes-open-hardware repository.

Anyways, I'm working through the more recent versions, and making them largely PEP8 compliant, and reworking a lot of the functions to make them easier to use.
Title: Re: Difference between SVN repos?
Post by: ian on January 31, 2013, 07:18:32 am
I thought it was true. I deprecated the old SVN and moved everything.

If you have updates I'm happy to copy them over.
Title: Re: Difference between SVN repos?
Post by: Fake0Name on January 31, 2013, 07:43:12 am
Here are the patches I have so far.

I've mostly been working with the SPI module, though I went through the whole package and did formatting cleanup (I run sublime text with sublimelinter, which makes it very hard to work on code that's not PEP8 compliant).

The main thing I've done is the `0b00000100 - Write then read` function is now exposed as the function `large_bulk_write_read` in the `SPI` class.

There is also a `check_in_SPI_mode` function in the SPI class as well, which I'm using to make my code capable of exiting and restarting without causing any of the BP IO lines to toggle. It turns out if you try to re-enter binary mode when the BP is already in binary SPI mode, it kicks you out of the SPI mode, which de-asserts the CS line until you re-enter SPI mode. This is a way to get around this.

Ideally, there should be a dedicated "What mode am I in" command, that if issues when you're in basic binary mode before switching to a certain bus mode won't cause the system to switch to one of the bus modes.
The problem is, right now, if you're not in any bus mode, issuing the "What mode am I in" command (0b00000001) will put the BP in SPI mode.

I'll probably continue tweaking, though the test-harness I am building with the BP is now working. I'm not sure how SVN write access is managed (I've only used SVN in very small groups), but I can push my updates to the repo myself, if you let me know how.
Title: Re: Difference between SVN repos?
Post by: Fake0Name on February 04, 2013, 12:03:52 pm
Incidentally, if you've depreciated the old SVN, it would probably be a good idea to delete everything from the head of the repo. Just have a single file with info about the new repository in it.

That way, if someone (like me), does a checkout (like I did), you would just get a "Nothing here, go to the new place" message.
With a VCS, all the history will still be there, it would just be more apparent that the repo contents are depreciated.
Title: Re: Difference between SVN repos?
Post by: ian on February 04, 2013, 02:02:35 pm
The problem I see is numerous links on the web to places in the code, as well as to utilities that are still there. I'm really hesitant to to destroy all that work in one fell swoop.
Title: Re: Difference between SVN repos?
Post by: Fake0Name on February 17, 2013, 09:51:16 am
It seems like the solution is to generate a set of files in an image of the old repo that each point to the same path in the new repo.

Simple plain-text with a raw URL should work. I could hack something together in a hour or two in python.

Oh, I have more patches to the bus-pirate library. I removed the timeouts, and instead rely on checking the number of received bytes against the number of bytes I'm waiting for (with an eventual timeout if the connection is lost). 

This results in the turn around for many commands (like large_bulk_write_read) dropping from ~0.1 second execution to ~0.015 execution time, and that includes the USB latency and the time it takes the hardware the bus-pirate is talking to to respond.

Can I IM you to get SVN write access? I'd be happy to take over maintenance of the pyBusPirate library.
Title: Re: Difference between SVN repos?
Post by: ian on February 19, 2013, 02:38:33 pm
Sure thing, send me a google code registered email and I will add you to the project.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00972068728session_write_close ( )...(null):0
20.01002200304ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01002201080Database_MySQL->query( ).../DatabaseHandler.php:119
40.05382339800Database_MySQL->error( ).../Db-mysql.class.php:273