Sunday, 12 August 2012

Building a Plane for OpenRelief

Lately there has been a bit of a buzz about a new UAV project called OpenRelief. The goal of the project it to be able to deploy a drone to a devastated area and perform recon work allowing resources to be targeted to where they are needed.

As i live in Australia and most of our emergencies cover vast distances I have decided to build a glider for the body and thus give the maximum air time for the recon work.

This has lead to me re-building my home made milling machine that was unable to handle the lateral forces of a rotating cutting head to now be a laser cutter/pattern maker. I have hacked a 2003 DVD burner into a laser assembly that I had from an old Varityper VT600 photo type setter. I find that this allows me to burn the balsa frames at ~60mm/min which makes for easier cutting.

Sunday, 13 May 2012

Buildbot and mutliple SVN projects

So as you all know by now I have been using buildbot to compile and upload code to my arduino.

This took so work as my SVN repo is laed out as follows;
SVN / Project 1 / branches
                / tags
                / trunk
    / Project 2 / branches
                / tags
                / trunk
 
So how do you make buildbot "see" the change in a project and compile just that project? You use a file splitter.

In the master.cfg you place a file splitter like the following one
########## Custom file spliter

def my_file_splitter(path):
    print "path " +  path
    pieces = path.split('/')
    if pieces[0] == 'trunk':
        branch = None
        pieces.pop(0) # remove 'trunk'
    elif pieces[0] == 'branches':
        pieces.pop(0) # remove 'branches'
        # grab branch name
        branch =  None
        projectname = None
        return
    elif pieces[0] == 'RETIRED':
        branch = None
        projectname = None
        return
    else:
        branch = pieces.pop(0)
    projectname = pieces.pop(0)
    print branch
    print projectname
    return (branch, '/'.join(pieces))
This splits the path to find where the change is and ignores any change but trunk.

This splitter is called by the Poller on the repo like like the following

SVNPoller(
         "svn://localhost/data/svn/arduino/"
         , cachepath="/tmp/arduino"
         , pollinterval=30
         , split_file=my_file_splitter
         )
Once this is all time it time to setup the build factory to use the properties of the splitter.
arduino = BuildFactory()
arduino.addStep(ShellCommand(command=["pwd"],workdir= WithProperties("build/%s", 'branch'), usePTY=True))
arduino.addStep(ShellCommand(command=["rm","-fr",WithProperties("%s*", 'branch')],workdir="build/",usePTY=True))
arduino.addStep(ShellCommand(command=["svn", "co",  WithProperties("svn://localhost/data/svn/arduino/%s" ,'branch') , Property('branch')],workdir="build/",usePTY=True))
arduino.addStep(ShellCommand(command=["pwd"],workdir= WithProperties("build/%s", 'branch'), usePTY=True))
arduino.addStep(ShellCommand(command=["ls", "-l"],workdir= WithProperties("build/%s", 'branch'),usePTY=True))
arduino.addStep(ShellCommand(command=["trunk/build.sh"],workdir= WithProperties("build/%s", 'branch'), usePTY=True))

Saturday, 28 April 2012

Globelock SVN is now working correctly

So I plan on using my Galaxy Tab to do the code development on for the Arduino code.
I located a a nice little utility called Anjedi.It allows for checkout, editing and commit back.

I found that it did not support the way I had setup Apache + SVN on the server.
Found a few changes and now it works.

If you want to place projects on the server and have write access I can set it up under this configuration :)