c0ntr0l patch

Discuss mods, hacks, tweaks, etc.

Moderators: Altitude, adafruit_support_bill, adafruit, phono, mome rath

c0ntr0l patch

Postby eil » Tue Nov 04, 2008 12:43 am

Heya,

Still trying out all the fun things that can be done with my shiny new x0xb0x. One of them was checking into the c0ntr0l program thingy. The CVS repo hasn't been touched in 3 years and one of the comments said something like, "we should be ready for a beta release soon!" As you can imagine, I didn't have much confidence that it would even run... and it didn't.

But with some tweaking, I got it to come up and work mostly okay on my Ubuntu machine. It looks like wxPython has changed quite a bit over the last three years and much that was probably deprecated then simply generates a fatal error now. Ditto for a few things in Python. The patch below addresses these main points:

- the "wx" prefix on methods, variables, and constants seems to be no more
- evt.KeyCode apparently became an int rather than a method which returns an int
- booleans must be 'True' or 'False', not 'true', 'TRUE', 'false', or 'FALSE'
- 'None' rather than 'NULL'

Fixing these allowed c0ntr0l to work on my Ubuntu 8.04 machine. The last three changes shouldn't harm anything, but I'm not sure if removing the "wx" prefix is really the right thing to do since the wxPython docs still have it everywhere. I'd be happy if someone could test it on their machine.

Since the forum won't let me attach files with a .diff or .txt extension, I've uploaded the patch here: http://img.bityard.net/forum/c0ntr0l-patch.diff
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 10:09 pm

Re: c0ntr0l patch

Postby j00lz » Wed Nov 05, 2008 6:01 am

Hey Dude, good to find someone who knows Python!

I recently wrote a converter to convert and import Rebirth patterns into the x0xb0x, but unfortunately it relies on c0ntr0l to import the patterns into the b0x... And a few c0ntr0l bugs are preventing it from working 100%. I have been considering re-implementing c0ntr0l from scratch, or at least the pattern upload portion of it, but time is lacking (I am nearing completion of a TR-9090)...

The first bug is easy to fix (I've provided a patch), and this would greatly benefit the whole community.

The two other ones I'm not so sure, but feel free to have a go :wink:

See:
http://forums.ladyada.net/viewtopic.php?f=7&t=6783
and
http://forums.ladyada.net/viewtopic.php?f=7&t=6822

Cheers,

j00lz
User avatar
j00lz
 
Posts: 65
Joined: Fri Mar 31, 2006 5:03 am
Location: Perth, Western Australia

Re: c0ntr0l patch

Postby alex_dubinsky » Wed Nov 05, 2008 12:58 pm

Has anyone figured out why c0ntr0l repeatedly refuses to connect, saying "x0xb0x not found"? This is the main killer in c0ntr0l, imo.
alex_dubinsky
 
Posts: 188
Joined: Wed Jul 30, 2008 4:17 pm

Re: c0ntr0l patch

Postby GoldDope » Wed Nov 05, 2008 1:32 pm

alex_dubinsky wrote:Has anyone figured out why c0ntr0l repeatedly refuses to connect, saying "x0xb0x not found"? This is the main killer in c0ntr0l, imo.

alex,
i always get this,however i find if i ignore that its telling me that and just go ahead and "upload" firmware ,. often than not it works ;)
and connects purely to transfer the software.
GoldDope
 
Posts: 240
Joined: Wed Dec 05, 2007 1:46 pm

Re: c0ntr0l patch

Postby eil » Wed Nov 05, 2008 7:14 pm

"Knows Python" is a huge stretch. :P I basically know enough to be dangerous and fix the occasional easy bug.

But I'll take a look at those bugs and see what I can find out. A couple of questions:

Does the "Play Pattern" button work for anyone else? It's greyed out on mine no matter what mode the x0x is in.

Does the Sokkos firmware keep c0ntr0l compatibility?
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 10:09 pm

Re: c0ntr0l patch

Postby phono » Thu Nov 06, 2008 3:19 am

the main bug with control is that memry dumping/loading doesnt work 100%, if someone can fix that would be awesome
Image
x0x #733 Image SH-101 MC-202 TB-303 TR-606 TR-808 TR-909 MKS-50 Juno-106 A-100 Virus-B E-6400 SX-150 Monotron
User avatar
phono
 
Posts: 1502
Joined: Wed May 02, 2007 3:01 pm
Location: forum whore aka 2Cv

Re: c0ntr0l patch

Postby j00lz » Thu Nov 06, 2008 4:12 am

Pretty sure Sokkos doesn't alter the serial comms or pattern dump parts of the firmware.

The problems with dumping and reloading the patterns are the ones I have reported in my previous post (although more may exist).
User avatar
j00lz
 
Posts: 65
Joined: Fri Mar 31, 2006 5:03 am
Location: Perth, Western Australia

Re: c0ntr0l patch

Postby alex_dubinsky » Fri Nov 07, 2008 1:05 am

GoldDope wrote:
alex_dubinsky wrote:Has anyone figured out why c0ntr0l repeatedly refuses to connect, saying "x0xb0x not found"? This is the main killer in c0ntr0l, imo.

alex,
i always get this,however i find if i ignore that its telling me that and just go ahead and "upload" firmware ,. often than not it works ;)
and connects purely to transfer the software.

Yeah, the firmware upgrading works, but it's the saving patterns that requires the x0xb0x to be found.
alex_dubinsky
 
Posts: 188
Joined: Wed Jul 30, 2008 4:17 pm

bughunting

Postby eil » Fri Nov 07, 2008 3:12 pm

@j00lz: I reproduced the bug you reported where the pattern 8 and bank 16 aren't getting saved from the EEPROM. Your patch was applied and I verified that it fixed the problem. I have the other bug you mentioned on my todo list.

@alex_dubinsky: can you provide some info surrounding this? Which OS you're using, how you're running c0ntr0l, etc. Has anybody else run into this?

@all: I'm going to try to update my Python skills a bit and fix as many bugs as I can reproduce, so feel free to post them here or start a new thread. If I can get the EEPROM-related ones fixed (these seem to be the biggest showstoppers for people), I'll upload a fixed copy of c0ntr0l along with a diff so that ladyada can apply the fixes to CVS if she so chooses. But remember I'm not a miracle worker so some bugs (particularly those related to the GUI) may be beyond my reach for now. :)
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 10:09 pm

Re: c0ntr0l patch

Postby j00lz » Fri Nov 07, 2008 9:12 pm

@eil: You, sir, are a l.e.g.e.n.d. :D
User avatar
j00lz
 
Posts: 65
Joined: Fri Mar 31, 2006 5:03 am
Location: Perth, Western Australia

Re: c0ntr0l patch

Postby Sokkan » Thu Dec 11, 2008 3:25 pm

I just(*) had a look at c0ntr0l and installed twohundredandfortytwelve different python utilities to get it up and running. I noticed that there are quite some differences between the versions. Maybe we who plan to have a look at it should use _one_ common version? I used 2.6, since there are some problems with backward compatibility between 2.x and 3.x and c0ntr0l was written for 2.something.

I have it up and running on my computer at work, unfortunately I forgot to pack some dll's needed so I couldn't try it at home tonight. I believe I fixed all bugs except the strange ones related to saving/restoring pattern 10 and D#s that joolz mentioned. I'll verify it tomorrow.

How should I proceed with this? The zip is large and I am unsure of how legal it is to redistribute some of the dll's. The best would be if ladyada picket up the package of python files and compiled and distributed it via sourceforge as the alpha-version already there. This, however, means that she needs to review the code(I would personally never take some unknown coders stuff and merge it with my own). This is also, contrary to SokkOS, not a hack, just bug fixes.

* boring morning at work... :)
Sokkan
 
Posts: 230
Joined: Sat Sep 01, 2007 11:56 am
Location: Stockholm

Re: c0ntr0l patch

Postby eil » Fri Dec 12, 2008 3:04 am

I'll have to check tomorrow to be sure, but I think c0ntr0l as whole is built of these three main parts and is thus subject to their licenses if you want to distribute the whole thing as one big package:

- c0ntr0l seems to be licensed under the banned license, which basically says "do whatever you want"

- Python (and its included libraries) is similar to the banned license

- wxWidgets says they're similar to the LGPL which basically says, "do whatever you want but if you modify and distribute the wxWidgets library, then you have to distribute those modifications freely as well." Pretty sure c0ntr0l doesn't rely on a modified wxWidgets, so the exception wouldn't apply to us.

All of these require the copyright to stay intact. So to answer your question, I don't *believe* there are any restrictions on packaging and distributing c0ntr0l or anything of the libraries used by it. I doubt ladyada would have knowingly used anything with a restrictive license on it.

I'm going to do some more work on c0ntr0l tomorrow. Probably start working on a command-line interface so I can focus on rewriting some of the internals without having to mess with the GUI code yet.
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 10:09 pm

Re: c0ntr0l patch

Postby eil » Tue Dec 16, 2008 11:20 pm

Alrighty, I think I might have jumped the shark a little bit. I found out this week that I'm pretty good at reading Python and okay at fixing bugs, but writing new Python code is not yet my forte. Although I've written a few simple applications in my day, I don't think I have the patience or time right now to go overhauling the internals of c0ntr0l like I originally planned.

That said, I'm happy to continue to bugfixing and I'm even willing to host a repository containing a bleeding-edge version of c0ntr0l with the latest patches and whatnot until ladyada can integrate them into the official tree.
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 10:09 pm

Re: c0ntr0l patch

Postby j00lz » Thu Dec 18, 2008 11:44 pm

Hey eil,

Good to see you are progressing with this :D

Rewriting c0ntr0l from scratch would require substantial work, even for a competent programmer. IMHO your time will be better spent trying to fix whatever bugs are found.

If you are able to upload a binary version somewhere that would be awesome as we can all benefit from your changes. It looks ladyada is either unwilling or (more likely) too busy to merge patches into the official version.

IMHO a fully working c0ntr0l app would really unlock the potential of the b0x.
User avatar
j00lz
 
Posts: 65
Joined: Fri Mar 31, 2006 5:03 am
Location: Perth, Western Australia

Re: c0ntr0l patch

Postby G303 » Mon Jan 05, 2009 5:40 am

any more progress?

especially the 'can't find x0xb0x' is makin me crazy, as i want to dump all patts on my boxes.. i'd go crazy if c0ntr0l would work properly :-)

greetz and thanx a lot for looking at this software in the first place..

G
G303
 
Posts: 1
Joined: Sun Mar 16, 2008 12:01 pm

Next

Return to x0xm0dz

Who is online

Users browsing this forum: No registered users and 0 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]