aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Delmar Davis <don@suspectdevices.com>2015-06-01 12:44:28 -0700
committerDonald Delmar Davis <don@suspectdevices.com>2015-06-01 12:44:28 -0700
commitdbb49b7c3aba71c7f2d6d9d5e38e0239da3876b8 (patch)
treed55f15be80393d286ab532290967a0396d96e852
parent919a9ea9007a3b8a472e0a92dac43143b1001662 (diff)
Add last bit of last minute stuff requested by Chrome which failed on the road
-rw-r--r--bikewedge/shield/README.md1
-rw-r--r--bikewedge/shield/clockshield.brd (renamed from shield/clockshield.brd)bin64532 -> 64532 bytes
-rw-r--r--bikewedge/shield/clockshield.sch (renamed from shield/clockshield.sch)bin31666 -> 31666 bytes
-rw-r--r--bikewedge/shield/eagle.epf429
-rw-r--r--bikewedge/shield/power.brd (renamed from shield/power.brd)bin74053 -> 74053 bytes
-rw-r--r--bikewedge/shield/power.pro25
-rw-r--r--bikewedge/shield/power.sch (renamed from shield/power.sch)bin61627 -> 61627 bytes
-rw-r--r--bikewedge/software/NewClock.ino135
-rw-r--r--bikewedge/software/README.md4
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/NewClock/NewClock.ino128
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/RaceInABox2/RaceInABox2.ino61
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/basic_msg/basic_msg.ino229
-rwxr-xr-xbikewedge/software/RetoolingForOpenSprints/bin/bikewedge.py159
-rwxr-xr-xbikewedge/software/RetoolingForOpenSprints/bin/serproxybin0 -> 32432 bytes
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/bin/serproxy.cfg38
-rwxr-xr-xbikewedge/software/RetoolingForOpenSprints/raceinabox/raceInABox.py210
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/.cvsignore5
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/AUTHORS7
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/COPYING340
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/ChangeLog18
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-macosx.txt9
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-unix20
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-win32.txt17
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/Makefile59
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/README163
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/TODO5
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/VERSION1
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.c126
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.h34
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.c106
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h33
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.c68
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.h26
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/README-wiring.txt55
-rwxr-xr-xbikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.command4
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.pbxproj472
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.xcworkspace/contents.xcworkspacedata4
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/main.c538
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.c43
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h30
-rwxr-xr-xbikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxybin0 -> 32432 bytes
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy.cfg38
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.c383
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.h61
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.c206
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.h38
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.c70
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.h9
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.c149
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.h44
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.c250
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.h55
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/.cvsignore5
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsp162
-rw-r--r--bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsw29
-rw-r--r--shield/untitled.brdbin9739 -> 0 bytes
-rw-r--r--shield/untitled.schbin23041 -> 0 bytes
57 files changed, 5101 insertions, 0 deletions
diff --git a/bikewedge/shield/README.md b/bikewedge/shield/README.md
new file mode 100644
index 0000000..77558a2
--- /dev/null
+++ b/bikewedge/shield/README.md
@@ -0,0 +1 @@
+# Suspect-Devices-Open-Hardware
diff --git a/shield/clockshield.brd b/bikewedge/shield/clockshield.brd
index 3a7a7cd..3a7a7cd 100644
--- a/shield/clockshield.brd
+++ b/bikewedge/shield/clockshield.brd
Binary files differ
diff --git a/shield/clockshield.sch b/bikewedge/shield/clockshield.sch
index b7abb17..b7abb17 100644
--- a/shield/clockshield.sch
+++ b/bikewedge/shield/clockshield.sch
Binary files differ
diff --git a/bikewedge/shield/eagle.epf b/bikewedge/shield/eagle.epf
new file mode 100644
index 0000000..c0b097c
--- /dev/null
+++ b/bikewedge/shield/eagle.epf
@@ -0,0 +1,429 @@
+[Eagle]
+Version="05 11 00"
+Platform="Mac OS X"
+Serial="62191E841E-LSR-WLM-1EL"
+Globals="Globals"
+Desktop="Desktop"
+
+[Globals]
+AutoSaveProject=1
+UsedLibrary="/Applications/Eagle/lbr/19inch.lbr"
+UsedLibrary="/Applications/Eagle/lbr/40xx.lbr"
+UsedLibrary="/Applications/Eagle/lbr/41xx.lbr"
+UsedLibrary="/Applications/Eagle/lbr/45xx.lbr"
+UsedLibrary="/Applications/Eagle/lbr/74ac-logic.lbr"
+UsedLibrary="/Applications/Eagle/lbr/74ttl-din.lbr"
+UsedLibrary="/Applications/Eagle/lbr/74xx-eu.lbr"
+UsedLibrary="/Applications/Eagle/lbr/74xx-little-de.lbr"
+UsedLibrary="/Applications/Eagle/lbr/74xx-little-us.lbr"
+UsedLibrary="/Applications/Eagle/lbr/74xx-us.lbr"
+UsedLibrary="/Applications/Eagle/lbr/751xx.lbr"
+UsedLibrary="/Applications/Eagle/lbr/advanced-test-technologies.lbr"
+UsedLibrary="/Applications/Eagle/lbr/agilent-technologies.lbr"
+UsedLibrary="/Applications/Eagle/lbr/allegro.lbr"
+UsedLibrary="/Applications/Eagle/lbr/altera-cyclone-II.lbr"
+UsedLibrary="/Applications/Eagle/lbr/altera-cyclone-III.lbr"
+UsedLibrary="/Applications/Eagle/lbr/altera-stratix-iv.lbr"
+UsedLibrary="/Applications/Eagle/lbr/altera.lbr"
+UsedLibrary="/Applications/Eagle/lbr/am29-memory.lbr"
+UsedLibrary="/Applications/Eagle/lbr/amd-mach.lbr"
+UsedLibrary="/Applications/Eagle/lbr/amd.lbr"
+UsedLibrary="/Applications/Eagle/lbr/amis.lbr"
+UsedLibrary="/Applications/Eagle/lbr/analog-devices.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ase.lbr"
+UsedLibrary="/Applications/Eagle/lbr/atmel.lbr"
+UsedLibrary="/Applications/Eagle/lbr/austriamicrosystems.lbr"
+UsedLibrary="/Applications/Eagle/lbr/avago.lbr"
+UsedLibrary="/Applications/Eagle/lbr/axis.lbr"
+UsedLibrary="/Applications/Eagle/lbr/battery.lbr"
+UsedLibrary="/Applications/Eagle/lbr/burr-brown.lbr"
+UsedLibrary="/Applications/Eagle/lbr/busbar.lbr"
+UsedLibrary="/Applications/Eagle/lbr/buzzer.lbr"
+UsedLibrary="/Applications/Eagle/lbr/c-trimm.lbr"
+UsedLibrary="/Applications/Eagle/lbr/california-micro-devices.lbr"
+UsedLibrary="/Applications/Eagle/lbr/capacitor-wima.lbr"
+UsedLibrary="/Applications/Eagle/lbr/chipcard-siemens.lbr"
+UsedLibrary="/Applications/Eagle/lbr/cirrus-logic.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-3m.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-4ucon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amp-champ.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amp-micromatch.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amp-mt.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amp-mt6.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amp-quick.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-amphenol.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-avx.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-berg.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-bosch.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-chipcard-iso7816.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-coax.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-commcon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-conrad.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-cpci.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-cui.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-cypressindustries.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-deutsch.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-dil.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-ebyelectro.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-elco.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-erni.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-faston.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-fci.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-friwo.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-harting-h.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-harting-ml.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-harting-v.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-harting.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-hirose.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-hirschmann.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-jack.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-jae.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-jst.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-kycon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-kyocera-elco.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-lemo.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-leotronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-lsta.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-lstb.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-lumberg.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-ml.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-molex.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-neutrik_ag.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-omron.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-panasonic.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-panduit.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-pc.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-pc104.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-254.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-3.81.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-350.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-500.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-508.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-762.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-me_max.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-mkds_5.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-phoenix-smkdsp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-ptr500.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-pulse.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-rib.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-samtec.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-shiua-chyuan.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-stewart.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-stocko.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-subd.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-sullinselectronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-thomas-betts.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-tyco.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-tycoelectronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-vg.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-wago-500.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-wago-508.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-wago.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-wago255.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-weidmueller-sl35.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-wenzhou-yihua.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-xmultiple.lbr"
+UsedLibrary="/Applications/Eagle/lbr/con-yamaichi.lbr"
+UsedLibrary="/Applications/Eagle/lbr/crystal.lbr"
+UsedLibrary="/Applications/Eagle/lbr/csr.lbr"
+UsedLibrary="/Applications/Eagle/lbr/cypress.lbr"
+UsedLibrary="/Applications/Eagle/lbr/davicom.lbr"
+UsedLibrary="/Applications/Eagle/lbr/dc-dc-converter.lbr"
+UsedLibrary="/Applications/Eagle/lbr/dimensions.lbr"
+UsedLibrary="/Applications/Eagle/lbr/diode.lbr"
+UsedLibrary="/Applications/Eagle/lbr/discrete.lbr"
+UsedLibrary="/Applications/Eagle/lbr/display-hp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/display-kingbright.lbr"
+UsedLibrary="/Applications/Eagle/lbr/display-lcd.lbr"
+UsedLibrary="/Applications/Eagle/lbr/docu-dummy.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ecl.lbr"
+UsedLibrary="/Applications/Eagle/lbr/em-microelectronic.lbr"
+UsedLibrary="/Applications/Eagle/lbr/etx-board.lbr"
+UsedLibrary="/Applications/Eagle/lbr/exar.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fairchild-semic.lbr"
+UsedLibrary="/Applications/Eagle/lbr/farnell.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fiber-optic-hp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fiber-optic-siemens.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fifo.lbr"
+UsedLibrary="/Applications/Eagle/lbr/flexipanel.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fox-electronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/frames.lbr"
+UsedLibrary="/Applications/Eagle/lbr/freescale.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ftdichip.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fujitsu.lbr"
+UsedLibrary="/Applications/Eagle/lbr/fuse.lbr"
+UsedLibrary="/Applications/Eagle/lbr/gennum.lbr"
+UsedLibrary="/Applications/Eagle/lbr/halo-electronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/heatsink.lbr"
+UsedLibrary="/Applications/Eagle/lbr/holes.lbr"
+UsedLibrary="/Applications/Eagle/lbr/holtek.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ic-package.lbr"
+UsedLibrary="/Applications/Eagle/lbr/inductor-coilcraft.lbr"
+UsedLibrary="/Applications/Eagle/lbr/inductor-neosid.lbr"
+UsedLibrary="/Applications/Eagle/lbr/inductor-nkl.lbr"
+UsedLibrary="/Applications/Eagle/lbr/inductors.lbr"
+UsedLibrary="/Applications/Eagle/lbr/infineon-tricore.lbr"
+UsedLibrary="/Applications/Eagle/lbr/infineon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/intersil.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ir.lbr"
+UsedLibrary="/Applications/Eagle/lbr/isd.lbr"
+UsedLibrary="/Applications/Eagle/lbr/jump-0r-smd.lbr"
+UsedLibrary="/Applications/Eagle/lbr/jumper.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lantronix.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lattice.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lc-filter.lbr"
+UsedLibrary="/Applications/Eagle/lbr/led-7-segment.lbr"
+UsedLibrary="/Applications/Eagle/lbr/led-citizen-electronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/led-lumiled.lbr"
+UsedLibrary="/Applications/Eagle/lbr/led.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lem.lbr"
+UsedLibrary="/Applications/Eagle/lbr/linear-technology.lbr"
+UsedLibrary="/Applications/Eagle/lbr/linear.lbr"
+UsedLibrary="/Applications/Eagle/lbr/linx.lbr"
+UsedLibrary="/Applications/Eagle/lbr/logo.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lprs.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lsi-computer-systems.lbr"
+UsedLibrary="/Applications/Eagle/lbr/lumiled.lbr"
+UsedLibrary="/Applications/Eagle/lbr/marks.lbr"
+UsedLibrary="/Applications/Eagle/lbr/maxim.lbr"
+UsedLibrary="/Applications/Eagle/lbr/maxstream.lbr"
+UsedLibrary="/Applications/Eagle/lbr/melexis.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-hitachi.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-idt.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-micron.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-motorola-dram.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-nec.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-samsung.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory-sram.lbr"
+UsedLibrary="/Applications/Eagle/lbr/memory.lbr"
+UsedLibrary="/Applications/Eagle/lbr/mems.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micrel.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-cyrod.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-fujitsu.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-harris.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-hitachi.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-infineon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-intel.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-mc68000.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-motorola.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-philips.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-renesas.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-samsung.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micro-siemens.lbr"
+UsedLibrary="/Applications/Eagle/lbr/microchip.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micron.lbr"
+UsedLibrary="/Applications/Eagle/lbr/micronas.lbr"
+UsedLibrary="/Applications/Eagle/lbr/microphon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/microwave.lbr"
+UsedLibrary="/Applications/Eagle/lbr/midori-sensor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/minicircuits.lbr"
+UsedLibrary="/Applications/Eagle/lbr/mitsubishi-semiconductor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/motorola-sensor-driver.lbr"
+UsedLibrary="/Applications/Eagle/lbr/murata-filter.lbr"
+UsedLibrary="/Applications/Eagle/lbr/murata-sensor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/nanotec.lbr"
+UsedLibrary="/Applications/Eagle/lbr/national-instruments.lbr"
+UsedLibrary="/Applications/Eagle/lbr/national-semiconductor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/nec-lqfp100-pack.lbr"
+UsedLibrary="/Applications/Eagle/lbr/nec.lbr"
+UsedLibrary="/Applications/Eagle/lbr/nrj-semiconductor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/omnivision.lbr"
+UsedLibrary="/Applications/Eagle/lbr/on-semiconductor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-honeywell-3000.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-honeywell-4000.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-honeywell.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-micro-linear.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-trans-siemens.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-transmittter-hp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/opto-vishay.lbr"
+UsedLibrary="/Applications/Eagle/lbr/optocoupler.lbr"
+UsedLibrary="/Applications/Eagle/lbr/pal.lbr"
+UsedLibrary="/Applications/Eagle/lbr/philips-semiconductors.lbr"
+UsedLibrary="/Applications/Eagle/lbr/photo-elements.lbr"
+UsedLibrary="/Applications/Eagle/lbr/piher.lbr"
+UsedLibrary="/Applications/Eagle/lbr/pinhead.lbr"
+UsedLibrary="/Applications/Eagle/lbr/plcc-socket.lbr"
+UsedLibrary="/Applications/Eagle/lbr/pld-intel.lbr"
+UsedLibrary="/Applications/Eagle/lbr/plxtech.lbr"
+UsedLibrary="/Applications/Eagle/lbr/pot-vitrohm.lbr"
+UsedLibrary="/Applications/Eagle/lbr/pot-xicor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/pot.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ptc-ntc.lbr"
+UsedLibrary="/Applications/Eagle/lbr/quantum-research-group.lbr"
+UsedLibrary="/Applications/Eagle/lbr/rcl.lbr"
+UsedLibrary="/Applications/Eagle/lbr/recom-international.lbr"
+UsedLibrary="/Applications/Eagle/lbr/rectifier.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ref-packages-longpad.lbr"
+UsedLibrary="/Applications/Eagle/lbr/ref-packages.lbr"
+UsedLibrary="/Applications/Eagle/lbr/relay.lbr"
+UsedLibrary="/Applications/Eagle/lbr/renesas.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-bourns.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-dil.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-net.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-power.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-ruf.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-shunt.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor-sil.lbr"
+UsedLibrary="/Applications/Eagle/lbr/resistor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/rf-micro-devices.lbr"
+UsedLibrary="/Applications/Eagle/lbr/rf-solutions.lbr"
+UsedLibrary="/Applications/Eagle/lbr/rohm.lbr"
+UsedLibrary="/Applications/Eagle/lbr/semicon-smd-ipc.lbr"
+UsedLibrary="/Applications/Eagle/lbr/sensor-comus-group.lbr"
+UsedLibrary="/Applications/Eagle/lbr/sensor-heraeus.lbr"
+UsedLibrary="/Applications/Eagle/lbr/sensor-infratec.lbr"
+UsedLibrary="/Applications/Eagle/lbr/sharp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/silabs.lbr"
+UsedLibrary="/Applications/Eagle/lbr/sim-technology.lbr"
+UsedLibrary="/Applications/Eagle/lbr/sipex.lbr"
+UsedLibrary="/Applications/Eagle/lbr/smd-ipc.lbr"
+UsedLibrary="/Applications/Eagle/lbr/smd-special.lbr"
+UsedLibrary="/Applications/Eagle/lbr/solomon-systech.lbr"
+UsedLibrary="/Applications/Eagle/lbr/solpad.lbr"
+UsedLibrary="/Applications/Eagle/lbr/special-drill.lbr"
+UsedLibrary="/Applications/Eagle/lbr/special.lbr"
+UsedLibrary="/Applications/Eagle/lbr/st-microelectronics.lbr"
+UsedLibrary="/Applications/Eagle/lbr/supertex.lbr"
+UsedLibrary="/Applications/Eagle/lbr/supply1.lbr"
+UsedLibrary="/Applications/Eagle/lbr/supply2.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch-alps.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch-coto.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch-dil.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch-misc.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch-omron.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch-raychem.lbr"
+UsedLibrary="/Applications/Eagle/lbr/switch.lbr"
+UsedLibrary="/Applications/Eagle/lbr/telcom.lbr"
+UsedLibrary="/Applications/Eagle/lbr/telecontrolli.lbr"
+UsedLibrary="/Applications/Eagle/lbr/telefunken.lbr"
+UsedLibrary="/Applications/Eagle/lbr/testpad.lbr"
+UsedLibrary="/Applications/Eagle/lbr/texas.lbr"
+UsedLibrary="/Applications/Eagle/lbr/toshiba.lbr"
+UsedLibrary="/Applications/Eagle/lbr/traco-electronic.lbr"
+UsedLibrary="/Applications/Eagle/lbr/trafo-bei.lbr"
+UsedLibrary="/Applications/Eagle/lbr/trafo-siemens.lbr"
+UsedLibrary="/Applications/Eagle/lbr/trafo-xicon.lbr"
+UsedLibrary="/Applications/Eagle/lbr/trafo.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor-fet.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor-neu-to92.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor-npn.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor-pnp.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor-power.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor-small-signal.lbr"
+UsedLibrary="/Applications/Eagle/lbr/transistor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/triac.lbr"
+UsedLibrary="/Applications/Eagle/lbr/tripas.lbr"
+UsedLibrary="/Applications/Eagle/lbr/u-blox.lbr"
+UsedLibrary="/Applications/Eagle/lbr/uln-udn.lbr"
+UsedLibrary="/Applications/Eagle/lbr/v-reg-micrel.lbr"
+UsedLibrary="/Applications/Eagle/lbr/v-reg.lbr"
+UsedLibrary="/Applications/Eagle/lbr/varistor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/wafer-scale-psd.lbr"
+UsedLibrary="/Applications/Eagle/lbr/wirepad.lbr"
+UsedLibrary="/Applications/Eagle/lbr/wuerth-elektronik.lbr"
+UsedLibrary="/Applications/Eagle/lbr/xicor.lbr"
+UsedLibrary="/Applications/Eagle/lbr/xilinx-virtex-v5.lbr"
+UsedLibrary="/Applications/Eagle/lbr/xilinx-xc18v.lbr"
+UsedLibrary="/Applications/Eagle/lbr/xilinx-xc9.lbr"
+UsedLibrary="/Applications/Eagle/lbr/xilinx-xcv.lbr"
+UsedLibrary="/Applications/Eagle/lbr/zetex.lbr"
+UsedLibrary="/Applications/Eagle/lbr/zilog.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/3d.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/3d2010.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/3d2011.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/adafruit.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/frames.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/nuvoton.lbr"
+UsedLibrary="/Users/don/www/embedded/hardware/libraries/opto-resistor.lbr"
+
+[Win_1]
+Type="Schematic Editor"
+Loc="420 222 1019 621"
+State=0
+Number=2
+File="/Users/don/www/embedded/suspectDevices/MIDI/Midigate.sch"
+View="-1311569 1967960 1461585 3041704"
+WireWidths=" 0 3048 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 4064 1524"
+PadDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
+PadDrills=" 5000 6000 7000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 8000"
+ViaDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
+ViaDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
+HoleDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
+TextSizes=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 19304 21844 25400 38100 50800 64516 17780"
+PolygonSpacings=" 2540 3048 4064 6096 8128 10160 14224 16764 17780 19304 21844 25400 38100 50800 64516 12700"
+PolygonIsolates=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
+MiterRadiuss=" 2540 3175 6350 12700 25400 10000 20000 25000 50000 75000 100000 0"
+SmdSizes=" 3048 1524 4064 2032 6096 3048 8128 4064 10160 5080 12700 6604 14224 7112 16764 8128 17780 9144 19304 9652 21844 10668 25400 12700 38100 19304 50800 25400 64516 32512 12700 6350"
+WireBend=0
+WireBendSet=31
+WireCap=1
+MiterStyle=0
+PadShape=0
+ViaShape=0
+PolygonPour=0
+PolygonRank=7
+PolygonThermals=1
+PolygonOrphans=0
+TextRatio=8
+PinDirection=3
+PinFunction=0
+PinLength=2
+PinVisible=3
+SwapLevel=0
+ArcDirection=0
+AddLevel=2
+PadsSameType=0
+Layer=91
+Sheet=1
+
+[Win_2]
+Type="Board Editor"
+Loc="420 222 1019 621"
+State=2
+Number=1
+File="/Users/don/www/embedded/suspectDevices/MIDI/Midigate.brd"
+View="-33100 -76247 756300 320983"
+WireWidths=" 0 2540 3048 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 4064"
+PadDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
+PadDrills=" 5000 6000 7000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 8000"
+ViaDiameters=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
+ViaDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
+HoleDrills=" 5000 7000 8000 9000 10000 11000 12000 13000 14000 15000 16000 20000 22000 28000 32000 6000"
+TextSizes=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 19304 21844 25400 38100 50800 64516 17780"
+PolygonSpacings=" 2540 3048 4064 6096 8128 10160 14224 16764 17780 19304 21844 25400 38100 50800 64516 12700"
+PolygonIsolates=" 2540 3048 4064 6096 8128 10160 12700 14224 16764 17780 19304 21844 25400 38100 64516 0"
+MiterRadiuss=" 2540 3175 6350 12700 25400 10000 20000 25000 50000 75000 100000 0"
+SmdSizes=" 3048 1524 4064 2032 6096 3048 8128 4064 10160 5080 12700 6604 14224 7112 16764 8128 17780 9144 19304 9652 21844 10668 25400 12700 38100 19304 50800 25400 64516 32512 12700 6350"
+WireBend=0
+WireBendSet=0
+WireCap=1
+MiterStyle=0
+PadShape=0
+ViaShape=0
+PolygonPour=0
+PolygonRank=1
+PolygonThermals=1
+PolygonOrphans=0
+TextRatio=8
+PinDirection=3
+PinFunction=0
+PinLength=2
+PinVisible=3
+SwapLevel=0
+ArcDirection=0
+AddLevel=2
+PadsSameType=0
+Layer=16
+
+[Win_3]
+Type="Control Panel"
+Loc="420 215 1345 583"
+State=2
+Number=0
+
+[Desktop]
+Screen="1440 900"
+Window="Win_1"
+Window="Win_2"
+Window="Win_3"
diff --git a/shield/power.brd b/bikewedge/shield/power.brd
index a10744d..a10744d 100644
--- a/shield/power.brd
+++ b/bikewedge/shield/power.brd
Binary files differ
diff --git a/bikewedge/shield/power.pro b/bikewedge/shield/power.pro
new file mode 100644
index 0000000..9657d10
--- /dev/null
+++ b/bikewedge/shield/power.pro
@@ -0,0 +1,25 @@
+EAGLE AutoRouter Statistics:
+
+Job : /Users/don/Sites/embedded/suspectDevices/bikestuff/shield/power.brd
+
+Start at : 20:11:19 (6/1/13)
+End at : 20:11:19 (6/1/13)
+Elapsed time : 00:00:00
+
+Signals : 15 RoutingGrid: 50 mil Layers: 2
+Connections : 45 predefined: 32 ( 3 Vias )
+
+Router memory : 12432
+
+Passname : Route Optimize1 Optimize2 Optimize3 Optimize4
+
+Time per pass : 00:00:00 00:00:00 00:00:00 00:00:00 00:00:00
+Number of Ripups : 0 0 0 0 0
+max. Level : 0 0 0 0 0
+max. Total : 0 0 0 0 0
+
+Routed : 0 11 11 11 11
+Vias : 0 5 6 6 6
+Resolution : 71.1 % 95.6 % 95.6 % 95.6 % 95.6 %
+
+Final : 97.0% finished. Polygons may have fallen apart.
diff --git a/shield/power.sch b/bikewedge/shield/power.sch
index d14d487..d14d487 100644
--- a/shield/power.sch
+++ b/bikewedge/shield/power.sch
Binary files differ
diff --git a/bikewedge/software/NewClock.ino b/bikewedge/software/NewClock.ino
new file mode 100644
index 0000000..e76cdd7
--- /dev/null
+++ b/bikewedge/software/NewClock.ino
@@ -0,0 +1,135 @@
+/*------------------------------------------------------------------------------------
+ * rough in of new clock.
+ * bikewedge proxy provides the number of steps wanted from goldsprints data.
+ * this should do some pid ling around so that it will be less jerkey.
+ * requires the modified stepper motors to do half stepping.
+ *
+ * (c) 2013 Donald Delmar Davis, Suspect Devices
+ *
+ */
+
+#include <Stepper.h>
+#define MIN_MILLIS_PER_STEP 8
+#define DEFAULT_MILLIS_PER_STEP 15
+#define STEPPER_STEPS 200
+#define STEPS_PER_REVOLUTION 2132
+#define INBUFFERLENGTH 100
+char inbuffer[INBUFFERLENGTH];
+int bufferIndex;
+int yellowGoal=0;
+int blueGoal=0;
+int yellowPosition=0;
+int bluePosition=0;
+int stepCount = 0;
+
+long int lastStepMillis;
+long int blueReadMillis;
+long int blueStepMillis;
+long int blueDeltaT;
+long int blueStepDelta;
+long int yellowReadMillis;
+long int yellowStepMillis;
+long int yellowDeltaT;
+long int yellowStepDelta;
+
+Stepper blue(STEPPER_STEPS, 8,9,10,11,1);
+Stepper yellow(STEPPER_STEPS, 2,3,4,5,1);
+
+void setup() {
+ // initialize the serial port:
+ Serial.begin(115200);
+}
+
+void loop() {
+ int target;
+ int delta;
+ while (Serial.available()) {
+ // get the new byte:
+ char inChar = (char)Serial.read();
+ // add it to the inputString:
+ if (bufferIndex<INBUFFERLENGTH)
+ inbuffer[bufferIndex++]=inChar;
+ if (inChar == '\n') {
+ inbuffer[bufferIndex]=0;
+ if ((inbuffer[0]=='d') && bufferIndex>3) {
+ target=atoi(inbuffer+3);
+ if (target>STEPS_PER_REVOLUTION) target=STEPS_PER_REVOLUTION;
+ if (inbuffer[1]=='1') {
+ blueGoal=target;
+ delta = target - bluePosition;
+ if (delta>0) {
+ blueStepDelta = (millis() - blueReadMillis) / delta;
+ if (blueStepDelta<MIN_MILLIS_PER_STEP) {
+ blueStepDelta=MIN_MILLIS_PER_STEP;
+ }
+ } else {
+ blueStepDelta = DEFAULT_MILLIS_PER_STEP;
+ }
+ blueReadMillis=millis();
+ } else {
+ yellowGoal=target;
+ delta = target - yellowPosition;
+ if (delta>0) {
+ yellowStepDelta = (millis() - yellowReadMillis) / delta;
+ if (yellowStepDelta<MIN_MILLIS_PER_STEP) {
+ yellowStepDelta=MIN_MILLIS_PER_STEP;
+ }
+
+ } else {
+ yellowStepDelta = DEFAULT_MILLIS_PER_STEP;
+ }
+ yellowReadMillis=millis();
+ }
+ } else if (inbuffer[0]=='v') {
+ Serial.println("RaceClock 0.");
+ Serial.flush();
+ } else if (inbuffer[0]=='s') {
+ if (blueGoal||yellowGoal) {
+ blueGoal=yellowGoal=STEPS_PER_REVOLUTION;
+ }
+ blueDeltaT = 0L;
+ blueStepDelta = DEFAULT_MILLIS_PER_STEP;
+ blueStepMillis = blueReadMillis = millis();
+ yellowDeltaT = 0L;
+ yellowStepDelta = DEFAULT_MILLIS_PER_STEP;
+ yellowStepMillis = yellowReadMillis = millis();
+
+ } else if (inbuffer[0]=='g') {
+ blueDeltaT = 0L;
+ blueStepDelta = DEFAULT_MILLIS_PER_STEP;
+ blueStepMillis = blueReadMillis = millis();
+ yellowDeltaT = 0L;
+ yellowStepDelta = DEFAULT_MILLIS_PER_STEP;
+ yellowStepMillis = yellowReadMillis = millis();
+ }
+
+ bufferIndex=0; //reset input
+
+ }
+ }
+// if ((millis()-lastStepMillis)>MIN_MILLIS_PER_STEP){
+ if ((millis()-blueStepMillis)>blueStepDelta) {
+ if ((blueGoal==STEPS_PER_REVOLUTION)&&((bluePosition==0)||(blueGoal==bluePosition))){
+ blueGoal=bluePosition=0;
+ }
+ if ((blueGoal>bluePosition) && (bluePosition<STEPS_PER_REVOLUTION)){
+ blue.step(-1);
+ bluePosition++;
+ }
+ blueStepMillis=millis();
+ } else if ((millis()-yellowStepMillis)>yellowStepDelta) {
+ if ((yellowGoal==STEPS_PER_REVOLUTION)&&((yellowPosition==0)||(yellowGoal==yellowPosition))){
+ yellowGoal=yellowPosition=0;
+ }
+ if ((yellowGoal>yellowPosition) && (yellowPosition<STEPS_PER_REVOLUTION)) {
+ yellow.step(-1);
+ yellowPosition++;
+ }
+ yellowStepMillis=millis();
+ }
+// }
+
+
+}
+
+
diff --git a/bikewedge/software/README.md b/bikewedge/software/README.md
new file mode 100644
index 0000000..06a7983
--- /dev/null
+++ b/bikewedge/software/README.md
@@ -0,0 +1,4 @@
+bikewedge
+=========
+
+Retooling opensprints/goldsprintfx to allow for projectorless races
diff --git a/bikewedge/software/RetoolingForOpenSprints/NewClock/NewClock.ino b/bikewedge/software/RetoolingForOpenSprints/NewClock/NewClock.ino
new file mode 100644
index 0000000..a868cba
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/NewClock/NewClock.ino
@@ -0,0 +1,128 @@
+/*------------------------------------------------------------------------------------
+ * rough in of new clock.
+ * bikewedge proxy provides the number of steps wanted from goldsprints data.
+ * this should do some pid ling around so that it will be less jerkey.
+ *
+ * Copyright 2013 (c) Donald Delmar Davis, Suspect Devices,
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the <organization> nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <Stepper.h>
+#define MIN_MILLIS_PER_STEP 20
+#define STEPPER_STEPS 200
+//#define STEPS_PER_REVOLUTION 2132
+#define STEPS_PER_REVOLUTION 1067
+#define INBUFFERLENGTH 100
+
+#define BLUE_BCK_BUTTON 17
+#define BLUE_FWD_BUTTON 15
+#define YELLOW_BCK_BUTTON 16
+#define YELLOW_FWD_BUTTON 14
+
+
+char inbuffer[INBUFFERLENGTH];
+int bufferIndex;
+int yellowGoal=0;
+int blueGoal=0;
+int yellowPosition=0;
+int bluePosition=0;
+int stepCount = 0;
+unsigned long int lastStepMillis;
+
+Stepper blue(STEPPER_STEPS, 8,9,10,11);
+Stepper yellow(STEPPER_STEPS, 2,3,4,5);
+
+void setup() {
+ // initialize the serial port:
+ Serial.begin(115200);
+ pinMode(BLUE_BCK_BUTTON,INPUT_PULLUP);
+ pinMode(BLUE_FWD_BUTTON,INPUT_PULLUP);
+ pinMode(YELLOW_BCK_BUTTON,INPUT_PULLUP);
+ pinMode(YELLOW_FWD_BUTTON,INPUT_PULLUP);
+}
+
+void loop() {
+ int target;
+ while (Serial.available()) {
+ // get the new byte:
+ char inChar = (char)Serial.read();
+ // add it to the inputString:
+ if (bufferIndex<INBUFFERLENGTH)
+ inbuffer[bufferIndex++]=inChar;
+ if (inChar == '\n') {
+ inbuffer[bufferIndex]=0;
+ if ((inbuffer[0]=='d') && bufferIndex>3) {
+ target=atoi(inbuffer+3);
+ if (target>STEPS_PER_REVOLUTION) target=STEPS_PER_REVOLUTION;
+ if (inbuffer[1]=='1') {
+ blueGoal=target;
+ Serial.println(inbuffer+3);
+ } else {
+ yellowGoal=target;
+ }
+ } else if (inbuffer[0]=='v') {
+ Serial.println("RaceClock 0.1");
+ Serial.flush();
+ } else if (inbuffer[0]=='s') {
+ if (blueGoal||yellowGoal) {
+ blueGoal=yellowGoal=STEPS_PER_REVOLUTION;
+ }
+ }
+
+ bufferIndex=0; //reset input
+
+ }
+ }
+
+ if ((millis()-lastStepMillis)>MIN_MILLIS_PER_STEP){
+
+ if (!digitalRead(BLUE_BCK_BUTTON)) bluePosition++;
+ if (!digitalRead(BLUE_FWD_BUTTON)) bluePosition--;
+ if (!digitalRead(YELLOW_BCK_BUTTON)) yellowPosition++;
+ if (!digitalRead(YELLOW_FWD_BUTTON)) yellowPosition--;
+
+ if ((blueGoal==STEPS_PER_REVOLUTION)&&((bluePosition==0)||(blueGoal==bluePosition))){
+ blueGoal=bluePosition=0;
+ }
+ if ((yellowGoal==STEPS_PER_REVOLUTION)&&((yellowPosition==0)||(yellowGoal==yellowPosition))){
+ yellowGoal=yellowPosition=0;
+ }
+
+ if ((blueGoal>bluePosition) && (bluePosition<STEPS_PER_REVOLUTION)){
+ blue.step(1);
+ bluePosition++;
+ }
+ if ((yellowGoal>yellowPosition) && (yellowPosition<STEPS_PER_REVOLUTION)) {
+ yellow.step(1);
+ yellowPosition++;
+
+ }
+ lastStepMillis=millis();
+ }
+
+
+}
+
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/RaceInABox2/RaceInABox2.ino b/bikewedge/software/RetoolingForOpenSprints/RaceInABox2/RaceInABox2.ino
new file mode 100644
index 0000000..06a3251
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/RaceInABox2/RaceInABox2.ino
@@ -0,0 +1,61 @@
+/*
+ RaceInABox
+
+ */
+#define MOTOR1DIR 2
+#define MOTOR2DIR 4
+#define MOTOR1PWM 3
+#define MOTOR2PWM 5
+#define MOTOR1CLOCKWISE digitalWrite(MOTOR1DIR, HIGH);
+#define MOTOR1COUNTERCLOCKWISE digitalWrite(MOTOR1DIR, LOW);
+#define MOTOR2CLOCKWISE digitalWrite(MOTOR2DIR, HIGH);
+#define MOTOR2COUNTERCLOCKWISE digitalWrite(MOTOR2DIR, LOW);
+#define INBUFFERLENGTH 32
+char inbuffer[INBUFFERLENGTH];
+
+void setup() {
+ Serial.begin(115200);
+ pinMode(MOTOR1DIR, OUTPUT);
+ pinMode(MOTOR2DIR, OUTPUT);
+ pinMode(MOTOR1PWM, OUTPUT);
+ pinMode(MOTOR2PWM, OUTPUT);
+ analogWrite(MOTOR1PWM, 0);
+ analogWrite(MOTOR2PWM, 0);
+
+ MOTOR1CLOCKWISE;
+ MOTOR2CLOCKWISE;
+}
+bool isClockwise = true;
+uint8_t bufferIndex=0;
+uint8_t bike1speed;
+
+void loop() {
+ while (Serial.available()) {
+ // get the new byte:
+ char inChar = (char)Serial.read();
+ // add it to the inputString:
+ if (bufferIndex<INBUFFERLENGTH)
+ inbuffer[bufferIndex++]=inChar;
+ // if the incoming character is a newline, set a flag
+ // so the main loop can do something about it:
+ if (inChar == '\n') {
+ inbuffer[bufferIndex]=0;
+ if ((inbuffer[0]=='b') && bufferIndex>3) {
+ bike1speed=(uint8_t) atoi(inbuffer+3);
+ if (inbuffer[1]=='1') {
+ analogWrite(MOTOR1PWM,bike1speed);
+ } else {
+ analogWrite(MOTOR2PWM,bike1speed);
+ }
+ } else if (inbuffer[0]=='v') {
+ Serial.println("RaceInABox 0.1");
+ Serial.flush();
+ }
+
+ bufferIndex=0; //reset input
+
+ }
+}
+}
+
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/basic_msg/basic_msg.ino b/bikewedge/software/RetoolingForOpenSprints/basic_msg/basic_msg.ino
new file mode 100644
index 0000000..21a94c7
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/basic_msg/basic_msg.ino
@@ -0,0 +1,229 @@
+/*
+ * Arduino wiring:
+ *
+ * Digital pin Connected to
+ * ----------- ------------
+ * 2 Sensor 0
+ * 3 Sensor 1
+ * 4 Sensor 2
+ * 5 Sensor 3
+ *
+ * 9 Racer0 Start LED anode, Stop LED cathode
+ * 10 Racer1 Start LED anode, Stop LED cathode
+ * 11 Racer2 Start LED anode, Stop LED cathode
+ * 12 Racer3 Start LED anode, Stop LED cathode
+ *
+ */
+
+int statusLEDPin = 13;
+long statusBlinkInterval = 250;
+int lastStatusLEDValue = LOW;
+long previousStatusBlinkMillis = 0;
+
+boolean raceStarted = false;
+boolean raceStarting = false;
+boolean mockMode = false;
+unsigned long raceStartMillis;
+unsigned long currentTimeMillis;
+
+int val = 0;
+
+int racer0GoLedPin = 9;
+int racer1GoLedPin = 10;
+int racer2GoLedPin = 11;
+int racer3GoLedPin = 12;
+
+int sensorPins[4] = {2,3,4,5};
+int previoussensorValues[4] = {HIGH,HIGH,HIGH,HIGH};
+int values[4] = {0,0,0,0};
+unsigned long racerTicks[4] = {0,0,0,0};
+unsigned long racerFinishTimeMillis[4];
+
+unsigned long lastCountDownMillis;
+int lastCountDown;
+
+unsigned int charBuff[8];
+unsigned int charBuffLen = 0;
+boolean isReceivingRaceLength = false;
+
+int raceLengthTicks = 20;
+int previousFakeTickMillis = 0;
+
+int updateInterval = 50;
+unsigned long lastUpdateMillis = 0;
+
+void setup() {
+ Serial.begin(115200);
+ pinMode(statusLEDPin, OUTPUT);
+ pinMode(racer0GoLedPin, OUTPUT);
+ pinMode(racer1GoLedPin, OUTPUT);
+ pinMode(racer2GoLedPin, OUTPUT);
+ pinMode(racer3GoLedPin, OUTPUT);
+ digitalWrite(racer0GoLedPin, LOW);
+ digitalWrite(racer1GoLedPin, LOW);
+ digitalWrite(racer2GoLedPin, LOW);
+ digitalWrite(racer3GoLedPin, LOW);
+ for(int i=0; i<=3; i++)
+ {
+ pinMode(sensorPins[i], INPUT);
+ digitalWrite(sensorPins[i], HIGH);
+ }
+
+}
+
+void blinkLED() {
+ if (millis() - previousStatusBlinkMillis > statusBlinkInterval) {
+ previousStatusBlinkMillis = millis();
+
+ lastStatusLEDValue = !lastStatusLEDValue;
+
+ digitalWrite(statusLEDPin, lastStatusLEDValue);
+ }
+
+}
+
+void raceStart() {
+ raceStartMillis = millis();
+}
+
+
+void checkSerial(){
+ if(Serial.available()) {
+ val = Serial.read();
+ if(isReceivingRaceLength) {
+ if(val != '\r') {
+ charBuff[charBuffLen] = val;
+ charBuffLen++;
+ }
+ else if(charBuffLen==2) {
+ // received all the parts of the distance. time to process the value we received.
+ // The maximum for 2 chars would be 65 535 ticks.
+ // For a 0.25m circumference roller, that would be 16384 meters = 10.1805456 miles.
+ raceLengthTicks = charBuff[1] * 256 + charBuff[0];
+ isReceivingRaceLength = false;
+ Serial.print("OK ");
+ Serial.println(raceLengthTicks,DEC);
+ }
+ else {
+ Serial.println("ERROR receiving tick lengths");
+ }
+ }
+ else {
+ if(val == 'l') {
+ charBuffLen = 0;
+ isReceivingRaceLength = true;
+ }
+ if(val == 'v') {
+ Serial.print("basic-1");
+ }
+ if(val == 'g') {
+ for(int i=0; i<=3; i++)
+ {
+ racerTicks[i] = 0;
+ racerFinishTimeMillis[i] = 256*0;
+ }
+
+ raceStarting = true;
+ raceStarted = false;
+ lastCountDown = 4;
+ lastCountDownMillis = millis();
+ }
+
+ else if(val == 'm') {
+ // toggle mock mode
+ mockMode = !mockMode;
+ }
+
+ if(val == 's') {
+ raceStarted = false;
+
+ digitalWrite(racer0GoLedPin,LOW);
+ digitalWrite(racer1GoLedPin,LOW);
+ digitalWrite(racer2GoLedPin,LOW);
+ digitalWrite(racer3GoLedPin,LOW);
+ }
+ }
+ }
+}
+
+void printStatusUpdate() {
+ if(currentTimeMillis - lastUpdateMillis > updateInterval) {
+ lastUpdateMillis = currentTimeMillis;
+ for(int i=0; i<=3; i++)
+ {
+ Serial.print(i);
+ Serial.print(": ");
+ Serial.println(racerTicks[i], DEC);
+ }
+ Serial.print("t: ");
+ Serial.println(currentTimeMillis, DEC);
+ }
+}
+
+void loop() {
+ blinkLED();
+
+ checkSerial();
+
+
+ if (raceStarting) {
+ if((millis() - lastCountDownMillis) > 1000){
+ lastCountDown -= 1;
+ lastCountDownMillis = millis();
+ }
+ if(lastCountDown == 0) {
+ raceStart();
+ raceStarting = false;
+ raceStarted = true;
+
+ digitalWrite(racer0GoLedPin,HIGH);
+ digitalWrite(racer1GoLedPin,HIGH);
+ digitalWrite(racer2GoLedPin,HIGH);
+ digitalWrite(racer3GoLedPin,HIGH);
+ }
+ }
+ if (raceStarted) {
+ currentTimeMillis = millis() - raceStartMillis;
+
+ for(int i=0; i<=3; i++)
+ {
+ if(!mockMode) {
+ values[i] = digitalRead(sensorPins[i]);
+ if(values[i] == HIGH && previoussensorValues[i] == LOW){
+ racerTicks[i]++;
+ if(racerFinishTimeMillis[i] == 0 && racerTicks[i] >= raceLengthTicks) {
+ racerFinishTimeMillis[i] = currentTimeMillis;
+ Serial.print(i);
+ Serial.print("f: ");
+ Serial.println(racerFinishTimeMillis[i], DEC);
+ digitalWrite(racer0GoLedPin+i,LOW);
+ }
+ }
+ previoussensorValues[i] = values[i];
+ }
+ else {
+ if(currentTimeMillis - lastUpdateMillis > updateInterval) {
+ racerTicks[i]+=(i+1);
+ if(racerFinishTimeMillis[i] == 0 && racerTicks[i] >= raceLengthTicks) {
+ racerFinishTimeMillis[i] = currentTimeMillis;
+ Serial.print(i);
+ Serial.print("f: ");
+ Serial.println(racerFinishTimeMillis[i], DEC);
+ digitalWrite(racer0GoLedPin+i,LOW);
+ }
+ }
+ }
+ }
+ }
+
+
+ if(racerFinishTimeMillis[0] != 0 && racerFinishTimeMillis[1] != 0 && racerFinishTimeMillis[2] != 0 && racerFinishTimeMillis[3] != 0){
+ if(raceStarted) {
+ raceStarted = false;
+ printStatusUpdate();
+ }
+ } else {
+ printStatusUpdate();
+ }
+}
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/bin/bikewedge.py b/bikewedge/software/RetoolingForOpenSprints/bin/bikewedge.py
new file mode 100755
index 0000000..7bbdba5
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/bin/bikewedge.py
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+
+"""------------------------------------------------------------------------bikewedge.py
+
+ DESCRIPTION: This code intercepts both sides of opensprints/goldsprintsfx
+ "conversation" to control a visual indication of progress using something
+ like a phsical clock or a race tree.
+ This makes it possible to not have a projector that costs more than your rollers.
+ It also makes it possible to do outdoor or mobile events.
+
+ TECHNICAL: This is a basic combination of the client and server software from the
+ python in a nutshell book. It makes a lot of assumtions and should do a better
+ job of recovering when the pile of flash or the serial proxy crashes (which
+ happens).
+ It creates a server on 5331 (the only port gold sprints checks) and expects
+ to listen to serproxy on 5330 it talks to the clock on 5332
+ it should eventually check and start serproxy and the goldsprints programs.
+ it should also do a better job of recovering from issues created by externals.
+
+ It has a lot of number foo (hard coding) in it that should be cleaned up
+
+ Copyright 2013 (c) Donald Delmar Davis, Suspect Devices,
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"""
+import socket
+import re
+import time
+from subprocess import Popen
+
+#TODO: get rid of the foo
+# * (constants for bike ticks / clock ticks)
+# * hardcoded paths
+
+
+#start up serproxy.
+#TODO: ERROR HANDLING in here.
+p1=Popen('./serproxy')
+time.sleep(.5)
+isocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+osocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+csocket = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
+isocket.connect(('localhost',5330))
+isocket.settimeout(0.2)
+print "Connected to serproxy"
+csocket.connect(('localhost',5332))
+csocket.settimeout(0.2)
+print "Connected to clock"
+osocket.bind(('',5331))
+osocket.listen(1)
+#open goldsprints
+p2=Popen('/Applications/GoldsprintsFX_b2.2.app/Contents/MacOS/GoldsprintsFX_b2.2')
+
+try:
+ while True:
+ connection,address=osocket.accept()
+ if not connection: break
+ print "Connected From", address
+ #connection.setblocking(0)
+ connection.settimeout(0.2)
+ while True:
+ try:
+ receivedData = connection.recv(8192)
+ except socket.error:
+ receivedData=None
+ if receivedData is not None:
+ #print ">"+re.escape(str(receivedData))+">"+str(len(receivedData))
+ isocket.sendall(receivedData)
+ for chunk in receivedData.split('\x00'):
+ if len(chunk)>0 and chunk[0] == 's':
+ print "(RE)SET RACE !!!"
+ csocket.sendall("s\n");
+ if len(chunk)>0 and chunk[0] == 'g':
+ print "GO!!!!!!!!!!"
+ csocket.sendall("g\n");
+ if len(receivedData)==0:
+ print "ISSUE WITH GOLDSPRINTSFX"
+ #TODO kill/restart goldsprintsfx
+
+ try:
+ sentData = isocket.recv(8192)
+ except socket.error:
+ sentData=None
+ if sentData is not None:
+ #print "<"+re.escape(str(sentData))+"<"+str(len(sentData))
+ connection.sendall(sentData)
+ for chunk in sentData.split('\x00'):
+ #if len(chunk.rstrip('\r')):
+ # print "<",re.escape(chunk),len(chunk)
+ if len(chunk) > 4 and chunk[0]=='0' :
+ done1=(float(chunk[3:])/1566.0) * 100.00
+ if done1>100.00 :
+ done1=100.00
+ print "Bike # 1 is ", str(int(done1)), "percent done"
+ csocket.sendall("d1:"+str((int(10.66*(done1)))+0.9)+"\n")
+ if len(chunk) > 4 and chunk[0]=='1' :
+ done2=(float(chunk[3:])/1566.0) * 100.00
+ if done2>100.00 :
+ done2=100.00
+ print "Bike # 2 is ", str(int(done2)), "percent done"
+ csocket.sendall("d2:"+str(int((10.66*(done2)))+0.9)+"\n")
+
+ if len(sentData)==0:
+ print "ISSUE WITH SERPROXY"
+ try:
+ isocket.sendall("\rv\r\x00")
+ except socket.error:
+ #TODO kill/restart serproxy
+ isocket.close()
+ isocket.connect(('localhost',5330))
+ break
+
+except KeyboardInterrupt:
+ print "Killed by user.\n"
+
+except Exception as e:
+ print "HRRM didn't see this coming..", str(e), "\n"
+
+finally:
+ p1.kill()
+ p2.kill()
+ print "...killing any straglers..."
+
+ if connection is not None:
+ connection.close()
+
+ csocket.close()
+ osocket.close()
+ isocket.close()
+ # serproxy leaves connected children so kill them.
+ p=Popen(['killall', 'serproxy'])
+ time.sleep(.2)
+ p=Popen(['killall', 'serproxy'])
+ p=Popen(['killall', 'serproxy'])
+ time.sleep(.2)
+ print ""
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/bin/serproxy b/bikewedge/software/RetoolingForOpenSprints/bin/serproxy
new file mode 100755
index 0000000..235d1ba
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/bin/serproxy
Binary files differ
diff --git a/bikewedge/software/RetoolingForOpenSprints/bin/serproxy.cfg b/bikewedge/software/RetoolingForOpenSprints/bin/serproxy.cfg
new file mode 100644
index 0000000..0827f7a
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/bin/serproxy.cfg
@@ -0,0 +1,38 @@
+# Config file for serproxy
+# See serproxy's README file for documentation
+
+# Transform newlines coming from the serial port into nils
+# true (e.g. if using Flash) or false
+newlines_to_nils=true
+#newlines_to_nils=false
+
+# Comm ports used
+comm_ports=1,2,3
+serial_device1=/dev/cu.usbserial-A700ew2y
+serial_device2=/dev/cu.usbserial-A601EYSU
+serial_device3=/dev/cu.usbserial-A601EYTR
+#serial_device1=/dev/cu.usbserial-A601EYTR
+#comm_baud=9600
+# Default settings
+comm_baud=115200
+#comm_baud2=9600
+#comm_baud3=9600
+comm_databits=8
+comm_stopbits=1
+comm_parity=none
+
+# Idle time out in seconds
+timeout=30000
+
+# Port 1 settings (sensors)
+net_port1=5330
+
+# Port 2 settings (clock)
+net_port2=5332
+
+# Port 3 settings (race)
+net_port3=5333
+
+# Port 4 settings (ttyS3)
+net_port4=5334
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/raceinabox/raceInABox.py b/bikewedge/software/RetoolingForOpenSprints/raceinabox/raceInABox.py
new file mode 100755
index 0000000..710ad63
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/raceinabox/raceInABox.py
@@ -0,0 +1,210 @@
+#!/usr/bin/env python
+"""
+ Copyright 2013 Donald Delmar Davis, Suspect Devices, All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+import wx
+import wx.lib.buttons
+
+[wxID_FRAME1, wxID_FRAME1BLAH1, wxID_FRAME1BLAH2, wxID_FRAME1RACER1,
+ wxID_FRAME1RACER1SPEED, wxID_FRAME1RACER1STATUS, wxID_FRAME1RACER1STATUS,
+ wxID_FRAME1RACER2, wxID_FRAME1SLIDER2, wxID_FRAME1STARTBUTTON,
+ wxID_FRAME1STOPBUTTON,
+] = [wx.NewId() for _init_ctrls in range(11)]
+
+class Frame1(wx.Frame):
+
+ #def create(parent):
+ # return Frame1(parent)
+
+
+ def _init_sizers(self):
+ # generated method, don't edit
+ self.boxSizer0 = wx.BoxSizer(orient=wx.VERTICAL)
+ self.boxSizer1 = wx.BoxSizer(orient=wx.HORIZONTAL)
+ self.boxSizer0.AddSizer(self.boxSizer1)
+
+ self.boxSizer2 = wx.BoxSizer(orient=wx.VERTICAL)
+ self.boxSizer1.AddSizer(self.boxSizer2,border=1,flag=wx.EXPAND)
+
+ self.boxSizer2.AddWindow(self.racer1, 0, border=0, flag=0)
+ self.boxSizer2.AddWindow(self.racer1Speed, 0, border=0, flag=0)
+ self.boxSizer2.AddWindow(self.racer1Status, 0, border=0, flag=0)
+ self.boxSizer3 = wx.BoxSizer(orient=wx.VERTICAL)
+ self.boxSizer1.AddSizer(self.boxSizer3)
+ self.boxSizer3.AddWindow(self.racer2, 0, border=0, flag=0)
+ self.boxSizer3.AddWindow(self.racer2Speed, 0, border=0, flag=0)
+ self.boxSizer3.AddWindow(self.racer2Status, 0, border=0, flag=0)
+ self.boxSizer4 = wx.BoxSizer(orient=wx.HORIZONTAL)
+ self.boxSizer0.AddSizer(self.boxSizer4)
+ self.boxSizer4.AddWindow(self.startButton, 0, border=10, flag=wx.EXPAND|wx.ALL)
+ self.boxSizer4.AddWindow(self.stopButton, 0, border=10, flag=wx.EXPAND|wx.ALL)
+ self.SetAutoLayout(True)
+ self.SetSizer(self.boxSizer0)
+ self.Layout()
+ self.Fit()
+
+
+ def _init_ctrls(self, prnt):
+ # generated method, don't edit
+ wx.Frame.__init__(self, id=wxID_FRAME1, name='', parent=None,
+ pos=wx.Point(535, 23), size=wx.Size(960, 527),
+ style=wx.DEFAULT_FRAME_STYLE, title='Frame1')
+ self.panel=wx.Panel(self)
+ self.SetClientSize(wx.Size(960, 505))
+
+ self.racer1 = wx.StaticText(id=wxID_FRAME1RACER1, label=u'racer #1',
+ name=u'racer1', parent=self, pos=wx.Point(0, 0), size=wx.Size(57,
+ 17), style=0)
+ self.racer1.SetLabelText(u'racer #1')
+
+ self.racer2 = wx.StaticText(id=wxID_FRAME1RACER2, label=u'racer #2',
+ name=u'racer2', parent=self, pos=wx.Point(0, 17), size=wx.Size(75,
+ 17), style=0)
+
+ self.racer1Speed = wx.Slider(id=wxID_FRAME1RACER1SPEED, maxValue=100,
+ minValue=0, name=u'racer1Speed', parent=self, pos=wx.Point(0, 34),
+ size=wx.Size(21, 150), style=wx.SL_HORIZONTAL, value=0)
+ self.racer1Speed.SetLabel(u'')
+ self.racer1Speed.Bind(wx.EVT_SCROLL_THUMBRELEASE,
+ self.OnRacer1SpeedScrollThumbrelease)
+ self.racer1Speed.Bind(wx.EVT_SCROLL_PAGEDOWN,
+ self.OnRacer1SpeedScrollPagedown)
+ self.racer1Speed.Bind(wx.EVT_SCROLL_PAGEUP,
+ self.OnRacer1SpeedScrollPageup)
+ self.racer1Speed.Bind(wx.EVT_SCROLL_THUMBTRACK,
+ self.OnRacer1SpeedScrollThumbtrack)
+ self.racer1Speed.Bind(wx.EVT_KEY_UP, self.OnRacer1SpeedKeyUp)
+ self.racer1Speed.Bind(wx.EVT_KEY_DOWN, self.OnRacer1SpeedKeyDown)
+
+ self.racer2Speed = wx.Slider(id=wxID_FRAME1SLIDER2, maxValue=100,
+ minValue=0, name='racer2Speed', parent=self, pos=wx.Point(0, 184),
+ size=wx.Size(21, 150), style=wx.SL_HORIZONTAL, value=14)
+ self.racer2Speed.SetLabel(u'')
+ self.racer2Speed.Bind(wx.EVT_SCROLL_THUMBRELEASE,
+ self.OnRacer2speedScrollThumbrelease)
+ self.racer2Speed.Bind(wx.EVT_SCROLL_THUMBTRACK,
+ self.OnRacer2speedScrollThumbtrack)
+ self.racer2Speed.Bind(wx.EVT_SCROLL_PAGEDOWN, self.OnRacer2speedScrollPagedown)
+ self.racer2Speed.Bind(wx.EVT_SCROLL_PAGEUP, self.OnRacer2speedScrollPageup)
+ self.racer2Speed.Bind(wx.EVT_KEY_UP, self.OnRacer2speedKeyUp)
+ self.racer2Speed.Bind(wx.EVT_KEY_DOWN, self.OnRacer2speedKeyDown)
+
+ self.racer1Status = wx.Gauge(id=wxID_FRAME1RACER1STATUS,
+ name=u'racer1Status', parent=self, pos=wx.Point(0, 334),
+ range=100, size=wx.Size(200, 16), style=wx.GA_HORIZONTAL)
+ self.racer1Status.SetInitialSize(wx.Size(200, 16))
+ self.racer1Status.SetToolTipString(u'racer1Status')
+
+ self.racer2Status = wx.Gauge(id=wxID_FRAME1RACER1STATUS,
+ name=u'racer2Status', parent=self, pos=wx.Point(0, 350),
+ range=100, size=wx.Size(200, 16), style=wx.GA_HORIZONTAL)
+ self.racer2Status.SetInitialSize(wx.Size(200, 16))
+ self.racer2Status.SetToolTipString(u'racer2Status')
+
+ self.startButton = wx.lib.buttons.GenButton(id=wxID_FRAME1STARTBUTTON,
+ label=u'start', name=u'startButton', parent=self, pos=wx.Point(0,
+ 366), size=wx.Size(86, 27), style=0)
+ self.startButton.SetToolTipString(u'Start Button')
+
+ self.stopButton = wx.lib.buttons.GenButton(id=wxID_FRAME1STOPBUTTON,
+ label=u'stop', name=u'stopButton', parent=self, pos=wx.Point(0,
+ 393), size=wx.Size(86, 27), style=0)
+ self.stopButton.SetLabelText(u'stopButton')
+ self.stopButton.SetHelpText(u'stop it!')
+ self.stopButton.SetToolTipString(u'Stop Button')
+ self.stopButton.Bind(wx.EVT_BUTTON, self.OnStopButtonButton,
+ id=wxID_FRAME1STOPBUTTON)
+
+ self.blah1 = wx.StaticText(id=wxID_FRAME1BLAH1, label=u'blah',
+ name=u'blah1', parent=self, pos=wx.Point(0, 0), size=wx.Size(57,
+ 17), style=0)
+ self.blah1.SetLabelText(u'racer #1')
+
+ self.blah2 = wx.StaticText(id=wxID_FRAME1BLAH2, label=u'blah',
+ name=u'blah2', parent=self, pos=wx.Point(0, 0), size=wx.Size(57,
+ 17), style=0)
+ self.blah2.SetLabelText(u'racer #1')
+
+ self._init_sizers()
+
+ def __init__(self, parent):
+ self._init_ctrls(parent)
+
+
+ def OnRacer1SpeedScrollThumbrelease(self, event):
+
+ event.Skip()
+
+ def OnRacer1SpeedScrollPagedown(self, event):
+ event.Skip()
+
+ def OnRacer1SpeedScrollPageup(self, event):
+ event.Skip()
+
+ def OnRacer1SpeedScrollThumbtrack(self, event):
+ event.Skip()
+
+ def OnRacer1SpeedKeyUp(self, event):
+ event.Skip()
+
+ def OnRacer1SpeedKeyDown(self, event):
+ event.Skip()
+
+ def OnRacer2speedScrollThumbrelease(self, event):
+ event.Skip()
+
+ def OnRacer2speedScrollThumbtrack(self, event):
+ event.Skip()
+
+ def OnRacer2speedScrollPagedown(self, event):
+ event.Skip()
+
+ def OnRacer2speedScrollPageup(self, event):
+ event.Skip()
+
+ def OnRacer2speedKeyUp(self, event):
+ event.Skip()
+
+ def OnRacer2speedKeyDown(self, event):
+ event.Skip()
+
+ def OnStopButtonButton(self, event):
+ event.Skip()
+
+class MyApp(wx.App):
+ def OnInit(self):
+ self.main = Frame1(parent=self)
+ self.main.Show()
+ self.SetTopWindow(self.main)
+ return True
+
+def main():
+ global application
+ application = MyApp(0)
+ application.MainLoop()
+
+if __name__ == '__main__':
+ main()
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/.cvsignore b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/.cvsignore
new file mode 100644
index 0000000..4eb10fa
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/.cvsignore
@@ -0,0 +1,5 @@
+*.ncb *.opt *.aps *.plg *.zip *.001 *.gz
+serproxy
+Debug
+Release
+Output
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/AUTHORS b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/AUTHORS
new file mode 100644
index 0000000..b5b7d9e
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/AUTHORS
@@ -0,0 +1,7 @@
+Developers
+----------
+Stefano Busti <sbusti@nildram.co.uk>
+
+Contributors
+------------
+David A. Mellis <dam@mellis.org>
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/COPYING b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/COPYING
new file mode 100644
index 0000000..a3f6b12
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/ChangeLog b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/ChangeLog
new file mode 100644
index 0000000..8452526
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/ChangeLog
@@ -0,0 +1,18 @@
+v0.1.3 - 17/05/2005 - DAM
+
+- Can now specify config file location on command line.
+- Added config file parameter for converting incoming
+ newlines to nils (e.g. for Flash)
+- Can specify the serial device to use for each comm port.
+- Search path for configuration file defaults to the executable directory.
+
+v0.1.2 - 22/12/1999
+
+- Fixed a string allocation bug in the config file parser.
+- Serproxy now displays which ports sockets are bound to
+ when it's compiled with debugging enabled.
+
+V0.1.1 - 14/12/1999
+
+- Cleaned up source code a little.
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-macosx.txt b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-macosx.txt
new file mode 100644
index 0000000..42f3d54
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-macosx.txt
@@ -0,0 +1,9 @@
+Mac OS X serproxy installation instructions
+-------------------------------------------
+
+1. Follow the UNIX installation instructions in INSTALL-unix
+2. Determine the serial device used by your adapter.
+ Connect your device, then, from the Terminal, type: ls /dev/tty.*
+ and look for something besides /dev/tty.modem
+3. Assign this device to one of the serial_device's in serproxy.cfg
+4. Connect to the net_port associated with the serial_device
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-unix b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-unix
new file mode 100644
index 0000000..0c9bcb8
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-unix
@@ -0,0 +1,20 @@
+UNIX serproxy installation instructions
+---------------------------------------
+
+Source distribution
+-------------------
+1. Unpack the sources.
+2. 'cd' into the source directory
+3. Type 'make' to compile
+4. If all goes well, Edit serproxy.cfg to configure the proxy
+5. Run from the source directory: ./serproxy
+
+Binary distribution
+-------------------
+1. Edit serproxy.cfg to configure the proxy
+2. Run from distribution: ./serproxy
+
+
+To use an alternate configuration file, specify it on the command line, e.g.:
+ ./serproxy /etc/serproxy.cfg
+For details on the configuration file format, see the README.
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-win32.txt b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-win32.txt
new file mode 100644
index 0000000..baa4878
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/INSTALL-win32.txt
@@ -0,0 +1,17 @@
+WIN32 serproxy installation instructions
+----------------------------------------
+
+From sources:
+
+1. Unpack the sources.
+2. Compile the 'win32/serproxy.dsw' workspace with VC6.
+3. Edit serproxy.cfg to configure the proxy.
+4. Make sure serproxy.cfg is in the same folder as serproxy.exe
+ before running.
+
+
+From pre-compiled binaries:
+
+1. Unzip files to a folder.
+2. Edit serproxy.cfg to configure the proxy.
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/Makefile b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/Makefile
new file mode 100644
index 0000000..2b65b6e
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/Makefile
@@ -0,0 +1,59 @@
+#
+# File: Linux serproxy makefile
+#
+# (C)1999 Stefano Busti
+#
+
+VERSION = `cat VERSION`
+
+SRCS = \
+ main.c sio.c sock.c thread.c vlist.c cfglib.c config.c string.c \
+ pipe.c error.c
+
+OBJS = \
+ main.o sio.o sock.o thread.o vlist.o cfglib.o config.o string.o \
+ pipe.c error.c
+
+CC = gcc
+
+ifdef DEBUG
+CFLAGS = -Wall -g -D__UNIX__ -DDEBUG
+else
+CFLAGS = -Wall -O2 -fomit-frame-pointer -D__UNIX__
+endif
+
+ifdef USE_EF
+LIBS= -lpthread -lefence
+else
+LIBS= -lpthread
+endif
+
+# Build the program
+
+serproxy: $(SRCS) $(OBJS)
+ $(CC) $(CFLAGS) -o serproxy $(OBJS) $(LDFLAGS) $(LIBS)
+
+install: serproxy
+ cp -f serproxy /usr/local/bin
+
+clean:
+ rm -f *.o *~
+
+realclean:
+ rm -f *.o *~ serproxy *.gz *.zip
+
+dep:
+ makedepend -Y -- $(CFLAGS) -- $(SRCS) 2&>/dev/null
+
+# DO NOT DELETE
+
+main.o: sio.h sock.h pipe.h thread.h vlist.h cfglib.h config.h error.h
+sio.o: sio.h
+sock.o: sock.h
+thread.o: thread.h
+vlist.o: vlist.h
+cfglib.o: cfglib.h
+config.o: config.h cfglib.h string.h
+string.o: string.h
+pipe.o: pipe.h sio.h sock.h thread.h
+error.o: error.h
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/README b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/README
new file mode 100644
index 0000000..b90e546
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/README
@@ -0,0 +1,163 @@
+
+Serproxy
+--------
+
+Author: Stefano Busti (sbusti@nildram.co.uk)
+Modified By: David A. Mellis (dam@mellis.org)
+
+Serproxy is a GPL multi-threaded proxy program for redirecting
+network socket connections to/from serial links, in cases where
+the remote end of the serial link doesn't have a TCP/IP
+stack (eg an embedded or microcontroller system).
+The proxy allows other hosts on the network to communicate
+with the system on the remote end of the serial link.
+When run, it listens for incoming connections on a number of tcp
+ports. Whenever a connection is made data is proxied to and from
+that connection to a serial port.
+
+
+Installation
+------------
+
+See the files INSTALL-unix, INSTALL-macosx.txt, and INSTALL-win32.txt for
+windows/mac/unix installation instructions.
+
+I have only tested the unix version under RedHat Linux 6.0,
+compiling under other unices will probably involve delving into
+the Makefile/source code. Also, the pthread library is needed
+to compile/run.
+
+
+Configuration directives
+------------------------
+
+Serproxy can be configured via the configuration file "serproxy.cfg".
+Comments are allowed by starting a line with the '#' character.
+The configuration file supports the following directives:
+
+---------------------------------------------------------------------
+comm_ports=<list>
+
+Used to configure which comm ports serproxy will use.
+<list> is a comma-separated list of port numbers, where 1 corresponds
+to ttyS0/COM1, 2 corresponds to ttyS1/COM2, etc. (though the serial
+device can be overridden; see serial_device below for details)
+
+Example:
+
+# Use ttyS0 and ttyS2
+comm_ports=1,3
+
+---------------------------------------------------------------------
+comm_baud=<n>
+
+Sets the default baud rate for serial connections.
+
+Example:
+
+# Use 38400 baud
+comm_baud=38400
+
+---------------------------------------------------------------------
+comm_databits=<n>
+
+Sets the default number of data bits.
+
+Example:
+
+# Use 8 data bits
+comm_databits=8
+
+---------------------------------------------------------------------
+comm_stopbits=<n>
+
+Sets the default number of stop bits. Possible values are 1 or 2.
+
+Example:
+
+# Use 1 stop bit
+comm_stopbits=1
+
+---------------------------------------------------------------------
+comm_parity=<p>
+
+Sets the default parity. Possible values are "none", "even" and "odd"
+
+Example:
+
+# No parity
+comm_parity=none
+
+---------------------------------------------------------------------
+timeout=<n>
+
+If a client is idle for more than <n> seconds, he will be
+disconnected.
+
+Example:
+
+# Time out after 300 seconds
+timeout=300
+
+---------------------------------------------------------------------
+newlines_to_nils=<b>
+
+Convert newlines (ASCII character 10, '\n') coming from the serial
+port to nils (ASCII character 0, '\0') before sending over the
+network. Set to "true" to enable, "false" (the default) to disable.
+Useful for reading serial data with Flash, which will not parse data
+on an XmlSocket until receiving a nil.
+
+Example:
+
+# Convert newlines to nils.
+newlines_to_nils=true
+
+---------------------------------------------------------------------
+net_port<x>=<n>
+
+Used to map tcp port numbers to serial port numbers. These define
+which serial ports serproxy tries to open when it detects a tcp
+network connection on a socket for proxying. <x> is the serial
+port number, <n> is the tcp port number.
+
+Example:
+
+# Proxy ttyS0/COM1 to/from tcp port 5331
+net_port1=5331
+
+# Proxy ttyS2/COM3 to/from tcp port 5333
+net_port3=5333
+
+---------------------------------------------------------------------
+serial_device<x>=<f>
+
+Used to map serial port device files to serial port numbers. <x> is
+the serial port number, <f> is serial port device file. Defaults to
+/dev/ttyS<x-1> on Unix, com<x> on Windows.
+
+Example:
+
+# Use /dev/tty.usbserial-1B1 instead of ttyS0/COM1
+serial_device1=/dev/tty.usbserial-1B1
+
+---------------------------------------------------------------------
+Port-specific settings
+
+The baud rate, data bits, stop bits and timeout values can also be
+configured individually for each serial port. This is achieved
+by appending a port number to the end of a particular directive.
+
+Example:
+
+# Override the global settings for ttyS0
+comm_baud1=14400
+comm_parity1=off
+
+# Override the global settings for ttyS2/COM3
+comm_baud3=9600
+comm_databits3=7
+comm_stopbits3=2
+comm_parity3=odd
+timeout3=100
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/TODO b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/TODO
new file mode 100644
index 0000000..c879085
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/TODO
@@ -0,0 +1,5 @@
+- Remote control of DTR/CTS/etc lines.
+- Syslog debugging output under Linux.
+- Win32 version may work better with a WaitForMultipleObjects call rather
+ than the current polling of the serial port (Linux version uses select()).
+- Option to only allow access from specific hosts.
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/VERSION b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/VERSION
new file mode 100644
index 0000000..b1e80bb
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/VERSION
@@ -0,0 +1 @@
+0.1.3
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.c
new file mode 100644
index 0000000..7321bbc
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.c
@@ -0,0 +1,126 @@
+/*
+ * cfglib.c
+ *
+ * Config file parsing routines
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "cfglib.h"
+
+char *cfg_getvalue(const char *key, const char *src);
+
+
+int cfg_readstr(const char *filename,
+ cfg_item_s *item,
+ const char *deflt)
+{
+ char buf[BUFSIZ];
+
+ if (cfg_readbuf(filename, item->key, buf, sizeof(buf)) == NULL) {
+ item->val = strealloc(item->val, deflt);
+ return -1;
+ }
+
+ item->val = strealloc(item->val, buf);
+ return 0;
+}
+
+
+int cfg_readint(const char *filename,
+ cfg_item_i *item,
+ int deflt)
+{
+ char buf[BUFSIZ], *perr;
+
+ if (cfg_readbuf(filename, item->key, buf, sizeof(buf)) == NULL) {
+ item->val = deflt;
+ return -1;
+ }
+
+ item->val = strtol(buf, &perr, 0);
+
+ if ((*perr != '\0') || (*buf == '\0')) {
+ item->val = deflt;
+ return -1;
+ }
+
+ return 0;
+}
+
+char *cfg_readbuf(const char *filename,
+ const char *key,
+ char *value,
+ size_t valuesiz)
+{
+ char *ptr;
+ int len;
+
+ FILE *f = fopen(filename, "rt");
+
+ if (!f)
+ return NULL;
+
+ while (fgets(value, valuesiz, f))
+ {
+ len = strlen(value);
+
+ /* strip crs */
+ if ((len > 0) && (value[len - 1] == '\n')) {
+ value[len - 1] = '\0';
+ len--;
+ }
+
+ /* ignore blank lines and comments */
+ if ((len > 0) && (value[0] != '#')) {
+ if ((ptr = cfg_getvalue(key, value)) != NULL) {
+ memmove(value, ptr, strlen(ptr) + 1);
+ fclose(f);
+ return value;
+ }
+ }
+ }
+ fclose(f);
+ return NULL;
+}
+
+char *cfg_getvalue(const char *key, const char *src)
+{
+ char *peql;
+
+ if ((peql = strchr(src, '=')) != NULL) {
+ int keylen = strlen(key);
+
+ if ((keylen == peql - src) && (strncmp(key, src, keylen) == 0))
+ return peql + 1;
+ }
+
+ return NULL;
+}
+
+char *strealloc(char *dest, const char *s)
+{
+ /*
+ * Don't reallocate if source and destination
+ * point to the same string, otherwise s becomes invalid.
+ */
+ if (dest == s)
+ return dest;
+
+ dest = realloc(dest, strlen(s) + 1);
+ if (dest == NULL)
+ return NULL;
+
+ strcpy(dest, s);
+ return dest;
+}
+
+void strdispose(char *dest)
+{
+ free(dest);
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.h
new file mode 100644
index 0000000..6bb383b
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/cfglib.h
@@ -0,0 +1,34 @@
+#ifndef CFGLIB_H
+#define CFGLIB_H
+
+#include <stdlib.h>
+
+typedef struct
+{
+ char *key;
+ char *val;
+} cfg_item_s;
+
+typedef struct
+{
+ char *key;
+ int val;
+} cfg_item_i;
+
+int cfg_readstr(const char *filename,
+ cfg_item_s *item,
+ const char *deflt);
+
+int cfg_readint(const char *filename,
+ cfg_item_i *item,
+ int deflt);
+
+char *cfg_readbuf(const char *filename,
+ const char *key,
+ char *value,
+ size_t valuesiz);
+
+char *strealloc(char *dest, const char *s);
+void strdispose(char *dest);
+
+#endif /* CFGLIB_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.c
new file mode 100644
index 0000000..4b92b5c
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.c
@@ -0,0 +1,106 @@
+/*
+ * config.c
+ *
+ * Configuration module
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "config.h"
+#include "string.h"
+
+cfg_item_i cfg_int_defs[CFG_IEND] = {
+ {"comm_baud", 9600},
+ {"comm_databits", 8},
+ {"comm_stopbits", 1},
+ {"comm_port", 0},
+ {"net_port", 3331},
+ {"timeout", 300}
+};
+
+cfg_item_s cfg_str_defs[CFG_SEND] = {
+ {"comm_parity", "none"},
+ {"net_allow", "all"},
+ {"net_deny", "none"},
+ {"newlines_to_nils", "false"},
+ {"serial_device", ""}
+};
+
+int cfg_init(cfg_s *cfg, int comm_port)
+{
+ int i;
+ char buf[BUFSIZ];
+
+ sprintf(buf, "%d", comm_port);
+
+ for (i = 0; i < CFG_IEND; i++)
+ {
+ cfg->ints[i].key = NULL;
+ str_assign(&cfg->ints[i].key, cfg_int_defs[i].key);
+
+ if (comm_port > 0)
+ str_cat(&cfg->ints[i].key, buf);
+
+ cfg->ints[i].val = cfg_int_defs[i].val;
+ }
+
+ for (i = 0; i < CFG_SEND; i++)
+ {
+ cfg->strs[i].key = NULL;
+ str_assign(&cfg->strs[i].key, cfg_str_defs[i].key);
+
+ if (comm_port > 0)
+ str_cat(&cfg->strs[i].key, buf);
+
+ cfg->strs[i].val = NULL;;
+ str_assign(&cfg->strs[i].val, cfg_str_defs[i].val);
+ }
+
+ return 0;
+}
+
+void cfg_cleanup(cfg_s *cfg)
+{
+ int i;
+
+ for (i = 0; i < CFG_IEND; i++)
+ {
+ str_cleanup(&cfg->ints[i].key);
+ }
+
+ for (i = 0; i < CFG_SEND; i++)
+ {
+ str_cleanup(&cfg->strs[i].key);
+ str_cleanup(&cfg->strs[i].val);
+ }
+}
+
+int cfg_fromfile(cfg_s *cfg, char *filename)
+{
+ int i;
+
+ /* Read integers */
+ for (i = 0; i < CFG_IEND; i++)
+ cfg_readint(filename, &cfg->ints[i], cfg->ints[i].val);
+
+ /* Read strings */
+ for (i = 0; i < CFG_SEND; i++)
+ cfg_readstr(filename, &cfg->strs[i], cfg->strs[i].val);
+
+ return 0;
+}
+
+void cfg_assign(cfg_s *dst, cfg_s *src)
+{
+ int i;
+
+ for (i = 0; i < CFG_IEND; i++)
+ dst->ints[i].val = src->ints[i].val;
+
+ for (i = 0; i < CFG_SEND; i++)
+ str_assign(&dst->strs[i].val, src->strs[i].val);
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h
new file mode 100644
index 0000000..d4a74c5
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/config.h
@@ -0,0 +1,33 @@
+#include "cfglib.h"
+
+typedef enum
+{
+ CFG_IBAUD,
+ CFG_IDATA,
+ CFG_ISTOP,
+ CFG_IPORT,
+ CFG_INETPORT,
+ CFG_ITIMEOUT,
+ CFG_IEND
+} cfg_int_t;
+
+typedef enum
+{
+ CFG_SPARITY,
+ CFG_SALLOW,
+ CFG_SDENY,
+ CFG_SNEWLINES,
+ CFG_SDEVICE,
+ CFG_SEND
+} cfg_str_t;
+
+typedef struct
+{
+ cfg_item_i ints[CFG_IEND];
+ cfg_item_s strs[CFG_SEND];
+} cfg_s;
+
+int cfg_init(cfg_s *cfg, int comm_port);
+void cfg_cleanup(cfg_s *cfg);
+int cfg_fromfile(cfg_s *cfg, char *filename);
+void cfg_assign(cfg_s *dst, cfg_s *src);
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.c
new file mode 100644
index 0000000..8850a31
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.c
@@ -0,0 +1,68 @@
+/*
+ * error.c
+ *
+ * error message routines
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include "error.h"
+
+void error(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
+
+void errend(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+
+ exit(-1);
+}
+
+void perror2(const char *fmt, ...)
+{
+ char buf[BUFSIZ];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buf, fmt, ap);
+ va_end(ap);
+
+ perror(buf);
+}
+
+void perrend(const char *fmt, ...)
+{
+ char buf[BUFSIZ];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buf, fmt, ap);
+ va_end(ap);
+
+ perror(buf);
+
+ exit(-1);
+}
+
+void dbg_msg(const char *fmt, ...)
+{
+ va_list ap;
+
+ va_start(ap, fmt);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.h
new file mode 100644
index 0000000..a50bf60
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/error.h
@@ -0,0 +1,26 @@
+#ifndef MYERROR_H
+#define MYERROR_H
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <errno.h>
+
+void error(const char *fmt, ...);
+void errend(const char *fmt, ...);
+void perror2(const char *fmt, ...);
+void perrend(const char *fmt, ...);
+void dbg_msg(const char *fmt, ...);
+
+#ifdef DEBUG
+#define DBG_MSG1(x) dbg_msg((x))
+#define DBG_MSG2(x,y) dbg_msg((x),(y))
+#define DBG_MSG3(x,y,z) dbg_msg((x),(y),(z))
+#else
+#define DBG_MSG1(x) ;
+#define DBG_MSG2(x,y) ;
+#define DBG_MSG3(x,y,z) ;
+#endif
+
+
+#endif /* MYERROR_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/README-wiring.txt b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/README-wiring.txt
new file mode 100644
index 0000000..cb4083e
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/README-wiring.txt
@@ -0,0 +1,55 @@
+Using Wiring with Flash (via serproxy)
+--------------------------------------
+Connect the Wiring board to a USB port. Take note of which USB port you use, as different ones have different identifiers.
+
+Launch Wiring. Look in the Tools | Serial Port menu and take note of the identifier corresponding to the serial device for the USB port to which the Wiring board is connected (look for something WITHOUT "modem" in its name).
+
+Open serproxy.cfg in TextEdit.
+
+The serproxy can handle multiple serial devices (each of which corresponds to a USB or serial port). For example:
+
+comm_ports=1,2
+
+tells serproxy to use two comm ports, numbered 1 and 2. To tell serproxy which serial device (from the Wiring menu) corresponds to each comm port, use a line like this:
+
+serial_device1=/dev/tty.usbserial-1B1
+
+This tells serproxy that comm port 1 uses serial device /dev/tty.usbserial-1B1. Change this to the identifier from the Wiring menu.
+
+Then, you assign a network port the comm port:
+
+net_port1=5331
+
+This tells serproxy to listen for connections on port 5331. Set this to whatever port you wish to connect to from Flash (on host "localhost").
+
+To configure another port, repeat the above instructions, plugging the Wiring board into a different USB port (you'll have to quit Wiring, plug into the new USB port, and then relaunch Wiring). Then add the appropriate lines to the serproxy.cfg. For example:
+
+serial_device2=/dev/tty.usbserial-3B1
+net_port2=5332
+
+Will configure comm port 2 to use serial device /dev/tty.usbserial-3B1 and listen for connections from Flash on port 5332.
+
+Each serial device will always correspond to the same network port, so if you plug the Wiring board into a different USB port, you'll need to connect to a different network port from Flash.
+
+If you need more than two comm ports, you'll need to change the comm_ports line. For example:
+
+comm_ports=1,2,3,4
+
+allocates four comm ports numbered 1 through 4.
+
+You need to make sure that the baud rate specified by your Wiring code:
+
+beginSerial(19200);
+
+matches the baud rate specified in serproxy.cfg:
+
+comm_baud=19200
+
+Finally, Flash will not process any incoming data (i.e. call the onData() function of your XMLSocket) until it receives a nil (ASCII code 0, '\0'). If your Wiring code uses newlines (ASCII code 10, '\n') to delimit data (so that, for example, it's easier to read in the Wiring serial monitor, HyperTerminal, zterm, Terminal, etc), you can tell serproxy to convert them into nils:
+
+newlines_to_nils=true
+
+To launch serproxy, simply double-click it. (This version does not require a .command file.)
+--
+David A. Mellis
+7 June 2005
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.command b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.command
new file mode 100755
index 0000000..7917b32
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.command
@@ -0,0 +1,4 @@
+#!/bin/sh
+cd "`dirname \"$0\"`"
+chmod 755 ./serproxy
+./serproxy serproxy.cfg
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.pbxproj b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.pbxproj
new file mode 100644
index 0000000..511a758
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.pbxproj
@@ -0,0 +1,472 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 39;
+ objects = {
+ 014CEA520018CE5811CA2923 = {
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ ZERO_LINK = YES;
+ };
+ isa = PBXBuildStyle;
+ name = Development;
+ };
+ 014CEA530018CE5811CA2923 = {
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ ZERO_LINK = NO;
+ };
+ isa = PBXBuildStyle;
+ name = Deployment;
+ };
+//010
+//011
+//012
+//013
+//014
+//080
+//081
+//082
+//083
+//084
+ 08FB7793FE84155DC02AAC07 = {
+ buildSettings = {
+ };
+ buildStyles = (
+ 014CEA520018CE5811CA2923,
+ 014CEA530018CE5811CA2923,
+ );
+ hasScannedForEncodings = 1;
+ isa = PBXProject;
+ mainGroup = 08FB7794FE84155DC02AAC07;
+ projectDirPath = "";
+ targets = (
+ 8DD76FA90486AB0100D96B5E,
+ );
+ };
+ 08FB7794FE84155DC02AAC07 = {
+ children = (
+ 33A5FA1D0851E66E006F91E2,
+ 08FB7795FE84155DC02AAC07,
+ C6A0FF2B0290797F04C91782,
+ 1AB674ADFE9D54B511CA2CBB,
+ );
+ isa = PBXGroup;
+ name = serproxy;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 08FB7795FE84155DC02AAC07 = {
+ children = (
+ 33A5F9E40851DEB2006F91E2,
+ 33A5F9E50851DEB2006F91E2,
+ 33A5F9E60851DEB2006F91E2,
+ 33A5F9E70851DEB2006F91E2,
+ 33A5F9E80851DEB2006F91E2,
+ 33A5F9E90851DEB2006F91E2,
+ 33A5F9EA0851DEB2006F91E2,
+ 33A5F9EB0851DEB2006F91E2,
+ 33A5F9EC0851DEB2006F91E2,
+ 33A5F9ED0851DEB2006F91E2,
+ );
+ isa = PBXGroup;
+ name = Source;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+//080
+//081
+//082
+//083
+//084
+//1A0
+//1A1
+//1A2
+//1A3
+//1A4
+ 1AB674ADFE9D54B511CA2CBB = {
+ children = (
+ 8DD76FB20486AB0100D96B5E,
+ );
+ isa = PBXGroup;
+ name = Products;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+//1A0
+//1A1
+//1A2
+//1A3
+//1A4
+//330
+//331
+//332
+//333
+//334
+ 336FC5F60862E7DA00A796E4 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = "INSTALL-macosx.txt";
+ path = "../INSTALL-macosx.txt";
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 336FC5F80862E7FA00A796E4 = {
+ fileRef = 33A5FA1E0851E685006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9E40851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = cfglib.c;
+ path = ../cfglib.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9E50851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = config.c;
+ path = ../config.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9E60851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = error.c;
+ path = ../error.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9E70851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = main.c;
+ path = ../main.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9E80851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = pipe.c;
+ path = ../pipe.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9E90851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = sio.c;
+ path = ../sio.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9EA0851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = sock.c;
+ path = ../sock.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9EB0851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = string.c;
+ path = ../string.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9EC0851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = thread.c;
+ path = ../thread.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9ED0851DEB2006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.c;
+ name = vlist.c;
+ path = ../vlist.c;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5F9EE0851DEB2006F91E2 = {
+ fileRef = 33A5F9E40851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9EF0851DEB2006F91E2 = {
+ fileRef = 33A5F9E50851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F00851DEB2006F91E2 = {
+ fileRef = 33A5F9E60851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F10851DEB2006F91E2 = {
+ fileRef = 33A5F9E70851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F20851DEB2006F91E2 = {
+ fileRef = 33A5F9E80851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F30851DEB2006F91E2 = {
+ fileRef = 33A5F9E90851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F40851DEB2006F91E2 = {
+ fileRef = 33A5F9EA0851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F50851DEB2006F91E2 = {
+ fileRef = 33A5F9EB0851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F60851DEB2006F91E2 = {
+ fileRef = 33A5F9EC0851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5F9F70851DEB2006F91E2 = {
+ fileRef = 33A5F9ED0851DEB2006F91E2;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ 33A5FA000851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = AUTHORS;
+ path = ../AUTHORS;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA010851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = ChangeLog;
+ path = ../ChangeLog;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA020851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = COPYING;
+ path = ../COPYING;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA030851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = "INSTALL-unix";
+ path = "../INSTALL-unix";
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA040851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = "INSTALL-win32.txt";
+ path = "../INSTALL-win32.txt";
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA050851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = README;
+ path = ../README;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA060851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = TODO;
+ path = ../TODO;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA070851E129006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = VERSION;
+ path = ../VERSION;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ 33A5FA1D0851E66E006F91E2 = {
+ children = (
+ 33A5FA1E0851E685006F91E2,
+ );
+ isa = PBXGroup;
+ name = Configuration;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ 33A5FA1E0851E685006F91E2 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = text;
+ name = serproxy.cfg;
+ path = ../serproxy.cfg;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+//330
+//331
+//332
+//333
+//334
+//8D0
+//8D1
+//8D2
+//8D3
+//8D4
+ 8DD76FA90486AB0100D96B5E = {
+ buildPhases = (
+ 8DD76FAB0486AB0100D96B5E,
+ 8DD76FAD0486AB0100D96B5E,
+ 8DD76FAF0486AB0100D96B5E,
+ );
+ buildRules = (
+ );
+ buildSettings = {
+ GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+ GCC_PREPROCESSOR_DEFINITIONS = __UNIX__;
+ INSTALL_PATH = "$(HOME)/bin";
+ PRODUCT_NAME = serproxy;
+ };
+ dependencies = (
+ );
+ isa = PBXNativeTarget;
+ name = serproxy;
+ productInstallPath = "$(HOME)/bin";
+ productName = serproxy;
+ productReference = 8DD76FB20486AB0100D96B5E;
+ productType = "com.apple.product-type.tool";
+ };
+ 8DD76FAB0486AB0100D96B5E = {
+ buildActionMask = 2147483647;
+ files = (
+ 33A5F9EE0851DEB2006F91E2,
+ 33A5F9EF0851DEB2006F91E2,
+ 33A5F9F00851DEB2006F91E2,
+ 33A5F9F10851DEB2006F91E2,
+ 33A5F9F20851DEB2006F91E2,
+ 33A5F9F30851DEB2006F91E2,
+ 33A5F9F40851DEB2006F91E2,
+ 33A5F9F50851DEB2006F91E2,
+ 33A5F9F60851DEB2006F91E2,
+ 33A5F9F70851DEB2006F91E2,
+ );
+ isa = PBXSourcesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8DD76FAD0486AB0100D96B5E = {
+ buildActionMask = 2147483647;
+ files = (
+ );
+ isa = PBXFrameworksBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8DD76FAF0486AB0100D96B5E = {
+ buildActionMask = 12;
+ dstPath = "";
+ dstSubfolderSpec = 16;
+ files = (
+ 336FC5F80862E7FA00A796E4,
+ );
+ isa = PBXCopyFilesBuildPhase;
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8DD76FB20486AB0100D96B5E = {
+ explicitFileType = "compiled.mach-o.executable";
+ includeInIndex = 0;
+ isa = PBXFileReference;
+ path = serproxy;
+ refType = 3;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+//8D0
+//8D1
+//8D2
+//8D3
+//8D4
+//C60
+//C61
+//C62
+//C63
+//C64
+ C6A0FF2B0290797F04C91782 = {
+ children = (
+ 33A5FA000851E129006F91E2,
+ 33A5FA010851E129006F91E2,
+ 33A5FA020851E129006F91E2,
+ 33A5FA030851E129006F91E2,
+ 33A5FA040851E129006F91E2,
+ 33A5FA050851E129006F91E2,
+ 336FC5F60862E7DA00A796E4,
+ 33A5FA060851E129006F91E2,
+ 33A5FA070851E129006F91E2,
+ );
+ isa = PBXGroup;
+ name = Documentation;
+ refType = 4;
+ sourceTree = "<group>";
+ };
+ };
+ rootObject = 08FB7793FE84155DC02AAC07;
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.xcworkspace/contents.xcworkspacedata b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..94b2795
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/macosx/serproxy.xcode/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+</Workspace>
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/main.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/main.c
new file mode 100644
index 0000000..2411920
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/main.c
@@ -0,0 +1,538 @@
+/*
+ * main.c
+ *
+ * main module for serproxy
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined(__UNIX__)
+# include <unistd.h>
+# include <fcntl.h>
+# include <sys/time.h>
+#elif defined(__WIN32__)
+# include <windows.h>
+# include <io.h>
+#endif
+
+#include "string.h"
+#include "sio.h"
+#include "sock.h"
+#include "pipe.h"
+#include "thread.h"
+#include "vlist.h"
+#include "cfglib.h"
+#include "config.h"
+#include "error.h"
+
+int readcfg(char *);
+void cleanup(void);
+int waitclients(void);
+thr_startfunc_t serve_pipe(void *data);
+void debug(void);
+
+#if defined(__UNIX__)
+char defcfgfile[] = "/etc/serproxy.cfg";
+#elif defined(__WIN32__)
+char defcfgfile[] = "serproxy.cfg";
+#endif
+
+cfg_s cfg;
+vlist_s pipes;
+
+int main(int argc, char **argv)
+{
+ char *cfgfile;
+
+ if (sock_start())
+ return -1;
+ vlist_init(&pipes, pipe_destroy);
+ cfg_init(&cfg, 0);
+ atexit(cleanup);
+
+ /* Look for the config file in the executable directory. Windows
+ * uses it as the working directory, so we can use a relative
+ * filename. On UNIX or the Mac, use the executable path and
+ * filename from argv[0].
+ */
+#ifdef __WIN32__
+ cfgfile = defcfgfile;
+#else
+ cfgfile = malloc(strlen(argv[0]) + 4 + 1);
+ strcpy(cfgfile, argv[0]);
+ strcat(cfgfile, ".cfg");
+#endif
+ /* Prefer a config file specified on the command line */
+ readcfg(argc > 1 ? argv[argc - 1] : cfgfile);
+#ifdef DEBUG
+ debug();
+#endif
+ waitclients();
+
+ return 0;
+}
+
+void cleanup(void)
+{
+ cfg_cleanup(&cfg);
+ vlist_cleanup(&pipes);
+ sock_finish();
+}
+
+int readcfg(char *cfgfile)
+{
+ char ports[BUFSIZ], *p;
+ int port;
+ pipe_s *pipe;
+ cfg_s local;
+ serialinfo_s sinfo;
+ char *parity, *newlines;
+
+ /* Read the global config settings */
+ cfg_fromfile(&cfg, cfgfile);
+
+ /* Read the comm port list */
+ if (cfg_readbuf(cfgfile, "comm_ports", ports, sizeof(ports)) == NULL)
+ errend("Couldn't find 'comm_ports' entry in config file '%s'", cfgfile);
+
+ vlist_clear(&pipes);
+
+ /* Parse the comm ports list */
+ p = strtok(ports, ",");
+ while (p)
+ {
+ if (sscanf(p, "%d", &port) > 0)
+ {
+ pipe = malloc(sizeof(pipe_s));
+ //pipe_init(pipe);
+ if (pipe == NULL)
+ perrend("malloc(pipe_s)");
+
+ cfg_init(&local, port);
+
+ /* Copy global settings to those for current pipe */
+ cfg_assign(&local, &cfg);
+
+ /* Set the comm port */
+ local.ints[CFG_IPORT].val = port;
+
+ /* Load this pipe's config */
+ cfg_fromfile(&local, cfgfile);
+
+ /* Try initializing the pipe */
+ if (pipe_init(pipe, local.ints[CFG_INETPORT].val))
+ perrend("pipe_init");
+
+ /* Copy over the rest of the pipe's config */
+ pipe->timeout = local.ints[CFG_ITIMEOUT].val;
+ serialinfo_init(&sinfo);
+ sinfo.port = port;
+ sinfo.baud = local.ints[CFG_IBAUD].val;
+ sinfo.stopbits = local.ints[CFG_ISTOP].val;
+ sinfo.databits = local.ints[CFG_IDATA].val;
+ str_assign(&sinfo.device, local.strs[CFG_SDEVICE].val);
+
+ parity = local.strs[CFG_SPARITY].val;
+
+ if (strcmp(parity, "none") == 0)
+ {
+ sinfo.parity = SIO_PARITY_NONE;
+ }
+ else if (strcmp(parity, "even") == 0)
+ {
+ sinfo.parity = SIO_PARITY_EVEN;
+ }
+ else if (strcmp(parity, "odd") == 0)
+ {
+ sinfo.parity = SIO_PARITY_ODD;
+ }
+ else
+ {
+ errend("Unknown parity string '%s'", parity);
+ }
+
+ newlines = local.strs[CFG_SNEWLINES].val;
+
+ if (strcmp(newlines, "true") == 0)
+ {
+ pipe->newlines = 1;
+ }
+ else if (strcmp(newlines, "false") == 0)
+ {
+ pipe->newlines = 0;
+ }
+ else
+ {
+ errend("Unknown value '%s' for newlines to nils (must be 'true' or 'false')", newlines);
+ }
+
+ if (sio_setinfo(&pipe->sio, &sinfo))
+ errend("Unable to configure comm port %d", port);
+
+ /* Finally add the pipe to the pipes list */
+ vlist_add(&pipes, pipes.tail, pipe);
+
+ serialinfo_cleanup(&sinfo);
+
+ cfg_cleanup(&local);
+ }
+
+ p = strtok(NULL, ",");
+ }
+
+ /* Clean up local cfg struct */
+ cfg_cleanup(&local);
+
+ return 0;
+}
+
+int waitclients(void)
+{
+ int fd_max;
+ fd_set fds;
+ vlist_i *it;
+ pipe_s *pit, *newpipe;
+ tcpsock_s *newsock;
+ thr_t thread;
+
+ fd_max = 0;
+ FD_ZERO(&fds);
+
+ /* Set all sockets to listen */
+ for (it = pipes.head; it; it = it->next)
+ {
+ pit = (pipe_s *)it->data;
+
+ if (tcp_listen(&pit->sock))
+ perror("waitclients() - tcp_listen()");
+ }
+
+ printf("Serproxy - (C)1999 Stefano Busti, (C)2005 David A. Mellis - Waiting for clients\n");
+
+ while (1)
+ {
+ /* Iterate through the pipe list */
+ for (it = pipes.head; it; it = it->next)
+ {
+ pit = (pipe_s *)it->data;
+
+ /* Monitor socket fd of each */
+ FD_SET(pit->sock.fd, &fds);
+
+ /* Track max fd */
+ if (pit->sock.fd > fd_max)
+ fd_max = pit->sock.fd;
+ }
+
+ /* Wait for a read ( == accept() in this case) */
+ if (select(fd_max + 1, &fds, NULL, NULL, NULL) == -1)
+ perrend("waitclients() - select()");
+
+
+ /* Find which sockets are involved */
+ for (it = pipes.head; it; it = it->next)
+ {
+ pit = (pipe_s *)it->data;
+
+ if (FD_ISSET(pit->sock.fd, &fds))
+ {
+ /* Create a new pipe struct for the new thread */
+ newpipe = malloc(sizeof(pipe_s));
+ if (!newpipe)
+ perrend("waitclients() - malloc(pipe_s)");
+
+ sio_init(&newpipe->sio);
+ sio_assign(&newpipe->sio, &pit->sio);
+
+ /* Try to open serial port */
+ if (sio_open(&newpipe->sio))
+ {
+ tcp_refuse(&pit->sock);
+ error("Failed to open comm port - connection refused");
+ free(newpipe);
+ continue;
+ }
+
+ /* Accept the connection */
+ newsock = tcp_accept(&pit->sock);
+
+ /* All ok? */
+ if (newsock)
+ {
+ newpipe->sock = *newsock;
+ free(newsock);
+
+ newpipe->newlines = pit->newlines;
+ newpipe->timeout = pit->timeout;
+ newpipe->mutex = pit->mutex;
+
+ /* Create the server thread */
+ if (thr_create(&thread, 1, serve_pipe, newpipe))
+ {
+ error("Feck - thread creation failed");
+ free(newpipe);
+ }
+ else
+ {
+ fprintf(stderr, "Server thread launched\n");
+ }
+ }
+ else
+ {
+ perror("waitclients() - accept()");
+ free(newpipe);
+ }
+ }
+ }
+ }
+ return 0;
+}
+
+/* Main routine for the server threads */
+thr_startfunc_t serve_pipe(void *data)
+{
+ char sio_buf[BUFSIZ], sock_buf[BUFSIZ];
+ int fd_max, sio_fd, sock_fd;
+ int sio_count, sock_count;
+ int res, port;
+ int i;
+ fd_set rfds, wfds;
+ pipe_s *pipe = (pipe_s *)data;
+#if defined(__UNIX__)
+ struct timeval tv = {pipe->timeout, 0};
+ struct timeval *ptv = &tv;
+#elif defined(__WIN32__)
+ struct timeval tv = {0,10000};
+ struct timeval *ptv = &tv;
+ DWORD msecs = 0, timeout = pipe->timeout * 1000;
+#endif
+
+ port = pipe->sio.info.port;
+
+ /* Only proceed if we can lock the mutex */
+ if (thr_mutex_trylock(pipe->mutex))
+ {
+ error("server(%d) - resource is locked", port);
+ }
+ else
+ {
+
+ sio_count = 0;
+ sock_count = 0;
+ sio_fd = pipe->sio.fd;
+ sock_fd = pipe->sock.fd;
+#if defined(__UNIX__)
+ fd_max = sio_fd > sock_fd ? sio_fd : sock_fd;
+#elif defined(__WIN32__)
+ fd_max = sock_fd;
+ msecs = GetTickCount();
+#endif
+ fprintf(stderr, "server(%d) - thread started\n", port);
+
+ while (1)
+ {
+ FD_ZERO(&rfds);
+ FD_ZERO(&wfds);
+
+#if defined(__UNIX__)
+ /* Always ask for read notification to check for EOF */
+ FD_SET(sio_fd, &rfds);
+ /* Only ask for write notification if we have something to write */
+ if (sock_count > 0)
+ FD_SET(sio_fd, &wfds);
+
+ /* Reset timeout values */
+ tv.tv_sec = pipe->timeout;
+ tv.tv_usec = 0;
+
+#endif
+ /* Always ask for read notification to check for EOF */
+ FD_SET(sock_fd, &rfds);
+ /* Only ask for write notification if we have something to write */
+ if (sio_count > 0)
+ FD_SET(sock_fd, &wfds);
+
+ //DBG_MSG2("server(%d) waiting for events", port);
+
+ /* Wait for read/write events */
+ res = select(fd_max + 1, &rfds, &wfds, NULL, ptv);
+ if (res == -1)
+ {
+ perror2("server(%d) - select()", port);
+ break;
+ }
+#if defined(__UNIX__)
+
+ /* Use the select result for timeout detection */
+ if (res == 0)
+ {
+ fprintf(stderr, "server(%d) - timed out\n", port);
+ break;
+ }
+
+ /* Input from serial port? */
+ if (FD_ISSET(sio_fd, &rfds))
+#elif defined(__WIN32__)
+
+ if (1)
+#endif
+ {
+ /* Only read input if buffer is empty */
+ if (sio_count == 0)
+ {
+ sio_count = sio_read(&pipe->sio, sio_buf, sizeof(sio_buf));
+ if (sio_count <= 0)
+ {
+ if (sio_count == 0)
+ {
+#if defined(__UNIX__)
+ fprintf(stderr, "server(%d) - EOF from sio\n", port);
+ break;
+#endif
+ }
+ else
+ {
+ perror2("server(%d) - read(sio)", port);
+ break;
+ }
+ }
+ else
+ {
+ DBG_MSG3("server(%d) - read %d bytes from sio", port, sio_count);
+ }
+ }
+ }
+
+ if (pipe->newlines)
+ {
+ /* Replace incoming newlines with nils. */
+ for (i = 0; i < sio_count; i++)
+ {
+ if (sio_buf[i] == '\n')
+ sio_buf[i] = 0;
+ }
+ }
+
+ /* Write to socket possible? */
+ if (FD_ISSET(sock_fd, &wfds))
+ {
+ if (sio_count > 0)
+ {
+ if ((res = tcp_write(&pipe->sock, sio_buf, sio_count)) < 0)
+ {
+ perror2("server(%d) - write(sock)", port);
+ break;
+ }
+ DBG_MSG3("server(%d) - Wrote %d bytes to sock", port, res);
+ sio_count -= res;
+ }
+ }
+
+
+ /* Input from socket? */
+ if (FD_ISSET(sock_fd, &rfds))
+ {
+ /* Only read input if buffer is empty */
+ if (sock_count == 0)
+ {
+ sock_count = tcp_read(&pipe->sock, sock_buf, sizeof(sock_buf));
+ if (sock_count <= 0)
+ {
+ if (sock_count == 0)
+ {
+ fprintf(stderr, "server(%d) - EOF from sock\n", port);
+ break;
+ }
+ else
+ {
+ perror2("server(%d) - read(sock)", port);
+ break;
+ }
+ }
+ DBG_MSG3("server(%d) - read %d bytes from sock", port, sock_count);
+ }
+ }
+
+#if defined(__UNIX__)
+ /* Write to serial port possible? */
+ if (FD_ISSET(sio_fd, &wfds))
+#elif defined(__WIN32__)
+
+ /* No socket IO performed? */
+ if ((!FD_ISSET(sock_fd, &rfds)) && (!FD_ISSET(sock_fd, &wfds)))
+ {
+ /* Break on a time out */
+ if (GetTickCount() - msecs > timeout)
+ {
+ fprintf(stderr, "server(%d) - timed out\n", port);
+ break;
+ }
+ }
+ else
+ {
+ msecs = GetTickCount();
+ }
+
+ if (1)
+#endif
+ {
+ if (sock_count > 0)
+ {
+ if ((res = sio_write(&pipe->sio, sock_buf, sock_count)) < 0)
+ {
+ perror2("server(%d) - write(sio)", port);
+ break;
+ }
+ DBG_MSG3("server(%d) - wrote %d bytes to sio", port, res);
+ sock_count -= res;
+ }
+ }
+
+ }
+
+ /* Unlock our mutex */
+ thr_mutex_unlock(pipe->mutex);
+ }
+
+ fprintf(stderr, "server(%d) exiting\n", port);
+
+ /* Clean up - don't call pipe_cleanup() as that would nuke our mutex */
+ sio_cleanup(&pipe->sio);
+ tcp_cleanup(&pipe->sock);
+
+
+ free(pipe);
+
+ thr_exit((thr_exitcode_t)0);
+
+ return (thr_exitcode_t)0;
+}
+
+void debug(void)
+{
+ vlist_i *it;
+ pipe_s *pit;
+ int i = 1;
+
+ fprintf(stderr, "pipes:\n\n");
+ vlist_debug(&pipes, stderr);
+
+ for (it = pipes.head; it; it = it->next)
+ {
+ pit = (pipe_s *)it->data;
+
+ fprintf(stderr, "sio[%d]:\n\n", i);
+ sio_debug(&pit->sio, stderr);
+
+ fprintf(stderr, "sock[%d]:\n\n", i);
+ tcp_debug(&pit->sock, stderr);
+
+ i++;
+ }
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.c
new file mode 100644
index 0000000..48a82f3
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.c
@@ -0,0 +1,43 @@
+/*
+ * pipe.c
+ *
+ * serial port <-> TCP/IP piping
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include <stdlib.h>
+
+#include "pipe.h"
+
+int pipe_init(pipe_s *pipe, int sock_port)
+{
+ if (sio_init(&pipe->sio))
+ return -1;
+
+ if (tcp_init(&pipe->sock, sock_port))
+ return -1;
+
+ pipe->mutex = malloc(sizeof(thr_mutex_t));
+ *(pipe->mutex) = thr_mutex_create();
+
+ return 0;
+}
+
+void pipe_cleanup(pipe_s *pipe)
+{
+ sio_cleanup(&pipe->sio);
+ tcp_cleanup(&pipe->sock);
+ thr_mutex_unlock(pipe->mutex);
+ thr_mutex_destroy(pipe->mutex);
+ free(pipe->mutex);
+}
+
+void pipe_destroy(void *data)
+{
+ pipe_s *pipe = (pipe_s *)data;
+
+ pipe_cleanup(pipe);
+ free(pipe);
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h
new file mode 100644
index 0000000..a0786ab
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/pipe.h
@@ -0,0 +1,30 @@
+#ifndef PIPE_H
+#define PIPE_H
+
+#include "sio.h"
+#include "sock.h"
+#include "thread.h"
+
+typedef struct
+{
+ /* Serial port */
+ sio_s sio;
+
+ /* Socket */
+ tcpsock_s sock;
+
+ /* Mutex lock */
+ thr_mutex_t *mutex;
+
+ /* Time out in seconds */
+ int timeout;
+
+ /* Convert newlines from the serial port to nils? */
+ int newlines;
+} pipe_s;
+
+int pipe_init(pipe_s *pipe, int sock_port);
+void pipe_cleanup(pipe_s *pipe);
+void pipe_destroy(void *data);
+
+#endif /* PIPE_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy
new file mode 100755
index 0000000..235d1ba
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy
Binary files differ
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy.cfg b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy.cfg
new file mode 100644
index 0000000..0827f7a
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/serproxy.cfg
@@ -0,0 +1,38 @@
+# Config file for serproxy
+# See serproxy's README file for documentation
+
+# Transform newlines coming from the serial port into nils
+# true (e.g. if using Flash) or false
+newlines_to_nils=true
+#newlines_to_nils=false
+
+# Comm ports used
+comm_ports=1,2,3
+serial_device1=/dev/cu.usbserial-A700ew2y
+serial_device2=/dev/cu.usbserial-A601EYSU
+serial_device3=/dev/cu.usbserial-A601EYTR
+#serial_device1=/dev/cu.usbserial-A601EYTR
+#comm_baud=9600
+# Default settings
+comm_baud=115200
+#comm_baud2=9600
+#comm_baud3=9600
+comm_databits=8
+comm_stopbits=1
+comm_parity=none
+
+# Idle time out in seconds
+timeout=30000
+
+# Port 1 settings (sensors)
+net_port1=5330
+
+# Port 2 settings (clock)
+net_port2=5332
+
+# Port 3 settings (race)
+net_port3=5333
+
+# Port 4 settings (ttyS3)
+net_port4=5334
+
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.c
new file mode 100644
index 0000000..b14c784
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.c
@@ -0,0 +1,383 @@
+/*
+ * sio.c
+ *
+ * serial port routines
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+
+#include "sio.h"
+#include "string.h"
+
+#if defined(SIO_TTY)
+# include <unistd.h>
+# include <termios.h>
+#elif defined(SIO_WIN32)
+# include <io.h>
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+void serialinfo_init(serialinfo_s *sinfo)
+{
+ sinfo->device = NULL;
+ sinfo->port = 1;
+ sinfo->baud = 9600;
+ sinfo->parity = SIO_PARITY_NONE;
+ sinfo->stopbits = 1;
+ sinfo->databits = 8;
+}
+
+void serialinfo_assign(serialinfo_s *dst, serialinfo_s *src)
+{
+ dst->port = src->port;
+ dst->baud = src->baud;
+ dst->parity = src->parity;
+ dst->stopbits = src->stopbits;
+ dst->databits = src->databits;
+ str_assign(&dst->device, src->device);
+}
+
+void serialinfo_cleanup(serialinfo_s *sinfo)
+{
+ str_cleanup(&sinfo->device);
+}
+
+int sio_init(sio_s *sio)
+{
+ sio->fd = 0;
+
+ serialinfo_init(&sio->info);
+
+ return 0;
+}
+
+void sio_cleanup(sio_s *sio)
+{
+ if (sio_isopen(sio))
+ sio_close(sio);
+
+ serialinfo_cleanup(&sio->info);
+}
+
+void sio_assign(sio_s *dst, sio_s *src)
+{
+ dst->fd = src->fd;
+#ifdef SIO_WIN32
+ dst->hComm = src->hComm;
+#endif
+ serialinfo_assign(&dst->info, &src->info);
+}
+
+int sio_open(sio_s *sio)
+{
+ char filename[20];
+
+#if defined(SIO_TTY)
+ struct termios t;
+ int fd, c_stop, c_data, i_parity, c_parity;
+ speed_t speed;
+
+ if (sio_isopen(sio))
+ return -1;
+
+ if (sio->info.device && strlen(sio->info.device) > 0)
+ {
+ fd = open(sio->info.device, O_RDWR);
+ }
+ else
+ {
+ sprintf(filename, "/dev/ttyS%hd", sio->info.port - 1);
+ fd = open(filename, O_RDWR);
+ }
+
+ if (fd == -1)
+ return -1;
+
+ if (tcgetattr(fd, &t))
+ {
+ close(fd);
+ return -1;
+ }
+
+ switch(sio->info.baud)
+ {
+ case 0: speed = B0; break;
+ case 50: speed = B50; break;
+ case 75: speed = B75; break;
+ case 110: speed = B110; break;
+ case 134: speed = B134; break;
+ case 150: speed = B150; break;
+ case 300: speed = B300; break;
+ case 600: speed = B600; break;
+ case 1200: speed = B1200; break;
+ case 1800: speed = B1800; break;
+ case 2400: speed = B2400; break;
+ case 4800: speed = B4800; break;
+ case 9600: speed = B9600; break;
+ case 19200: speed = B19200; break;
+ case 38400: speed = B38400; break;
+ case 57600: speed = B57600; break;
+ case 115200: speed = B115200; break;
+ case 230400: speed = B230400; break;
+ default: speed = B0; break;
+ }
+
+ if (speed == B0)
+ {
+ close(fd);
+ return -1;
+ }
+
+ if (cfsetospeed(&t, speed))
+ {
+ close(fd);
+ return -1;
+ }
+
+ if (cfsetispeed(&t, speed))
+ {
+ close(fd);
+ return -1;
+ }
+
+ switch(sio->info.stopbits)
+ {
+ case 1: c_stop = 0; break;
+ case 2: c_stop = CSTOPB; break;
+ default: close(fd); return -1;
+ }
+
+ switch(sio->info.databits)
+ {
+ case 5: c_data = CS5; break;
+ case 6: c_data = CS6; break;
+ case 7: c_data = CS7; break;
+ case 8: c_data = CS8; break;
+ default: close(fd); return -1;
+ }
+
+ switch(sio->info.parity)
+ {
+ case SIO_PARITY_NONE:
+ i_parity = IGNPAR;
+ c_parity = 0;
+ break;
+
+ case SIO_PARITY_EVEN:
+ i_parity = INPCK;
+ c_parity = PARENB;
+ break;
+
+ case SIO_PARITY_ODD:
+ i_parity = INPCK;
+ c_parity = PARENB | PARODD;
+ break;
+
+ default:
+ close(fd);
+ return -1;
+ }
+
+ if (tcsetattr(fd, TCSANOW, &t))
+ {
+ close(fd);
+ return -1;
+ }
+
+ sio->fd = fd;
+
+ return 0;
+#elif defined(SIO_WIN32)
+ int fd;
+ HANDLE hComm;
+ DCB dcb;
+ COMMTIMEOUTS cto = { MAXDWORD, 0, 0, 4, 4 };
+
+ if (sio_isopen(sio))
+ return -1;
+
+ if (sio->info.device && strlen(sio->info.device) > 0)
+ {
+ fd = _open(sio->info.device, _O_RDWR);
+ }
+ else
+ {
+ sprintf(filename, "COM%hd", sio->info.port);
+ fd = _open(filename, _O_RDWR);
+ }
+
+ if (fd == -1)
+ return -1;
+
+ /* Grab the fd's windows handle */
+ hComm = (HANDLE)_get_osfhandle(fd);
+
+ if (!SetCommTimeouts(hComm, &cto))
+ {
+ _close(fd);
+ return -1;
+ }
+
+ dcb.DCBlength = sizeof(dcb);
+ memset(&dcb, sizeof(dcb), 0);
+
+ if (!GetCommState(hComm, &dcb))
+ {
+ _close(fd);
+ return -1;
+ }
+
+ dcb.BaudRate = sio->info.baud;
+ //dcb.fBinary = TRUE;
+ dcb.fParity = (sio->info.parity == SIO_PARITY_NONE) ? FALSE : TRUE;
+ dcb.fOutxCtsFlow = FALSE;
+ dcb.fOutxDsrFlow = FALSE;
+ dcb.fDtrControl = DTR_CONTROL_DISABLE;
+ dcb.fDsrSensitivity = FALSE;
+ dcb.fTXContinueOnXoff = FALSE;
+ dcb.fOutX = FALSE;
+ dcb.fInX = FALSE;
+ dcb.fErrorChar = FALSE;
+ dcb.fNull = FALSE;
+ dcb.fRtsControl = RTS_CONTROL_DISABLE;
+ dcb.fAbortOnError = FALSE;
+ dcb.ByteSize = sio->info.databits;
+
+ switch (sio->info.parity)
+ {
+ case SIO_PARITY_NONE: dcb.Parity = 0; break;
+ case SIO_PARITY_ODD: dcb.Parity = 1; break;
+ case SIO_PARITY_EVEN: dcb.Parity = 2; break;
+ default: _close(fd); return -1;
+ }
+
+ switch (sio->info.stopbits)
+ {
+ case 1: dcb.StopBits = 0; break;
+ case 2: dcb.StopBits = 2; break;
+ default: _close(fd); return -1;
+ }
+
+ if (!SetCommState(hComm, &dcb))
+ {
+ _close(fd);
+ return -1;
+ }
+
+ sio->fd = fd;
+ sio->hComm = hComm;
+
+ return 0;
+#endif
+}
+
+void sio_close(sio_s *sio)
+{
+#if defined(SIO_TTY)
+ close(sio->fd);
+ sio->fd = 0;
+#elif defined(SIO_WIN32)
+ _close(sio->fd);
+ sio->fd = 0;
+ sio->hComm = INVALID_HANDLE_VALUE;
+#endif
+}
+
+#ifdef SIO_TTY
+__inline
+#endif
+int sio_read(sio_s *sio, void *buf, size_t count)
+{
+#if defined(SIO_TTY)
+ return read(sio->fd, buf, count);
+#elif defined(SIO_WIN32)
+ int res;
+ if (!ReadFile(sio->hComm, buf, count, &res, NULL))
+ return -1;
+ return res;
+#endif
+}
+
+#ifdef SIO_TTY
+__inline
+#endif
+int sio_write(sio_s *sio, void *buf, size_t count)
+{
+#if defined(SIO_TTY)
+ return write(sio->fd, buf, count);
+#elif defined(SIO_WIN32)
+ int res;
+ if (!WriteFile(sio->hComm, buf, count, &res, NULL))
+ return -1;
+ return res;
+#endif
+}
+
+int sio_isopen(sio_s *sio)
+{
+ return (sio->fd != 0);
+}
+
+int sio_setinfo(sio_s *sio, serialinfo_s *info)
+{
+ serialinfo_assign(&sio->info, info);
+ return 0;
+}
+
+void sio_flush(sio_s *sio, int dir)
+{
+ if (sio_isopen(sio))
+ {
+#if defined(SIO_TTY)
+ switch(dir)
+ {
+ case SIO_IN: tcflush(sio->fd, TCIFLUSH); break;
+ case SIO_OUT: tcflush(sio->fd, TCOFLUSH); break;
+ case SIO_IN | SIO_OUT: tcflush(sio->fd, TCIOFLUSH); break;
+ }
+#elif defined(SIO_WIN32)
+ DWORD flags = 0;
+
+ if (sio_isopen(sio))
+ {
+ if (dir & SIO_IN)
+ flags |= PURGE_RXCLEAR | PURGE_RXABORT;
+ if (dir & SIO_OUT)
+ flags |= PURGE_TXCLEAR | PURGE_TXABORT;
+ }
+
+ PurgeComm(sio->hComm, flags);
+#endif
+ }
+}
+
+void sio_drain(sio_s *sio)
+{
+ if (sio_isopen(sio))
+ {
+#if defined(SIO_TTY)
+ tcdrain(sio->fd);
+#elif defined(SIO_WIN32)
+ FlushFileBuffers(sio->hComm);
+#endif
+ }
+}
+
+void sio_debug(sio_s *sio, FILE *f)
+{
+ fprintf(f, "sio {\n");
+ fprintf(f, "\tfd = %d\n", sio_isopen(sio) ? sio->fd : 0);
+ fprintf(f, "\tport = %d\n", sio->info.port);
+ fprintf(f, "\tbaud = %ld\n", sio->info.baud);
+ fprintf(f, "\tparity = %d\n", sio->info.parity);
+ fprintf(f, "\tstopbits = %d\n", sio->info.stopbits);
+ fprintf(f, "\tdatabits = %d\n", sio->info.databits);
+ fprintf(f, "\topen = %d\n", sio_isopen(sio));
+ fprintf(f, "}\n\n");
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.h
new file mode 100644
index 0000000..591a81d
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sio.h
@@ -0,0 +1,61 @@
+#ifndef SIO_H
+#define SIO_H
+
+#define SIO_OUT 0x01
+#define SIO_IN 0x02
+
+#define SIO_PARITY_NONE 0
+#define SIO_PARITY_EVEN 1
+#define SIO_PARITY_ODD 2
+
+#include <stdio.h>
+
+#if defined(__WIN32__)
+# define SIO_WIN32
+//# define SIO_TTY
+#elif defined(__UNIX__)
+# define SIO_TTY
+#endif
+
+#if defined(SIO_WIN32)
+# include <windows.h>
+#endif
+
+typedef struct
+{
+ short port;
+ long baud;
+ int parity;
+ int stopbits;
+ int databits;
+ char *device;
+} serialinfo_s;
+
+void serialinfo_init(serialinfo_s *sinfo);
+void serialinfo_cleanup(serialinfo_s *sinfo);
+void serialinfo_assign(serialinfo_s *dst, serialinfo_s *src);
+
+typedef struct
+{
+ int fd;
+#ifdef SIO_WIN32
+ HANDLE hComm;
+#endif
+ serialinfo_s info;
+} sio_s;
+
+int sio_init(sio_s *sio);
+void sio_cleanup(sio_s *sio);
+void sio_assign(sio_s *dst, sio_s *src);
+
+int sio_open(sio_s *sio);
+void sio_close(sio_s *sio);
+int sio_read(sio_s *sio, void *buf, size_t count);
+int sio_write(sio_s *sio, void *buf, size_t count);
+int sio_isopen(sio_s *sio);
+int sio_setinfo(sio_s *sio, serialinfo_s *info);
+void sio_flush(sio_s *sio, int dir);
+void sio_drain(sio_s *sio);
+void sio_debug(sio_s *sio, FILE *f);
+
+#endif /* SIO_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.c
new file mode 100644
index 0000000..9b6980b
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.c
@@ -0,0 +1,206 @@
+/*
+ * sock.c
+ *
+ * socket routines
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+
+#include <stdlib.h>
+
+#include "sock.h"
+
+#if defined(SOCK_BSD)
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/socket.h>
+# include <netdb.h>
+# include <netinet/in.h>
+# include <arpa/inet.h>
+# include <fcntl.h>
+# include <sys/ioctl.h>
+#elif defined(SOCK_WIN)
+# define ioctl ioctlsocket
+#endif
+
+int sock_start(void)
+{
+#if defined(SOCK_BSD)
+ return 0;
+#elif defined (SOCK_WIN)
+ WORD wVersionRequested;
+ WSADATA wsaData;
+ wVersionRequested = MAKEWORD(1, 1);
+ return WSAStartup(wVersionRequested, &wsaData);
+#endif
+}
+
+
+void sock_finish(void)
+{
+#if defined(SOCK_WIN)
+ WSACleanup();
+#endif
+}
+
+int tcp_init(tcpsock_s *sock, int port)
+{
+ int optval = 1;
+
+ //struct protoent *ent;
+ struct sockaddr_in name;
+
+ //ent = getprotobyname("TCP");
+
+ //if (!ent)
+ // return -1;
+
+ sock->fd = socket(AF_INET, SOCK_STREAM, 0/*ent->p_proto*/);
+
+ if (sock->fd < 0)
+ return -1;
+
+ /* Allow reuse of existing TIME_WAIT sockets */
+ if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR,
+ (void *)&optval, sizeof(optval)))
+ {
+ tcp_cleanup(sock);
+ return -1;
+ }
+
+ if (ioctl(sock->fd, FIONBIO, &optval))
+ {
+ tcp_cleanup(sock);
+ return -1;
+ }
+
+ name.sin_family = AF_INET;
+ name.sin_port = htons(port);
+ name.sin_addr.s_addr = htonl(INADDR_ANY);
+
+ if (bind(sock->fd, (struct sockaddr *)&name, sizeof(name)) < 0)
+ {
+ tcp_cleanup(sock);
+ return -1;
+ }
+
+ sock->port = port;
+
+ return 0;
+}
+
+void tcp_cleanup(tcpsock_s *sock)
+{
+#if defined(SOCK_BSD)
+ close(sock->fd);
+#elif defined(SOCK_WIN)
+ closesocket(sock->fd);
+#endif
+}
+
+int tcp_listen(tcpsock_s *sock)
+{
+ return listen(sock->fd, 0);
+}
+
+tcpsock_s *tcp_accept(tcpsock_s *sock)
+{
+ struct sockaddr addr;
+ int addrlen;
+ int fd;
+ tcpsock_s *newsock;
+
+ addrlen = sizeof(addr);
+
+ fd = accept(sock->fd, &addr, &addrlen);
+
+ if (fd < 0)
+ return NULL;
+
+ newsock = malloc(sizeof(tcpsock_s));
+
+ if (newsock)
+ newsock->fd = fd;
+
+ return newsock;
+}
+
+void tcp_refuse(tcpsock_s *sock)
+{
+ tcpsock_s *temp = tcp_accept(sock);
+
+ if (temp)
+ {
+ /* Disconnect immediately */
+ tcp_disconnect(temp);
+
+ /* Clean up */
+ tcp_cleanup(temp);
+ free(temp);
+ }
+}
+
+int tcp_connect(tcpsock_s *sock, char *host, int port)
+{
+ struct sockaddr_in name;
+ struct hostent *hostinfo;
+ u_long addr;
+
+ name.sin_family = AF_INET;
+ name.sin_port = htons(port);
+
+ addr = inet_addr(host);
+ hostinfo = gethostbyaddr((char *)&addr, 4, PF_INET);
+ /*hostinfo = gethostbyname(hostname);*/
+
+ if (hostinfo == NULL)
+ return -1;
+
+ name.sin_addr = *(struct in_addr *) hostinfo->h_addr;
+
+ return connect(sock->fd, (struct sockaddr *)&name, sizeof(name));
+}
+
+void tcp_disconnect(tcpsock_s *sock)
+{
+ shutdown(sock->fd, 2);
+}
+
+#ifdef SOCK_BSD
+__inline
+#endif
+int tcp_read(tcpsock_s *sock, void *buf, size_t count)
+{
+#if defined(SOCK_BSD)
+ return read(sock->fd, buf, count);
+#elif defined(SOCK_WIN)
+ return recv(sock->fd, buf, count, 0);
+#endif
+}
+
+#ifdef SOCK_BSD
+__inline
+#endif
+int tcp_write(tcpsock_s *sock, void *buf, size_t count)
+{
+#if defined(SOCK_BSD)
+ return write(sock->fd, buf, count);
+#elif defined(SOCK_WIN)
+ return send(sock->fd, buf, count, 0);
+#endif
+}
+
+int tcp_getport(tcpsock_s *sock)
+{
+ return sock->port;
+}
+
+void tcp_debug(tcpsock_s *sock, FILE *f)
+{
+ fprintf(f, "tcp_socket {\n");
+ fprintf(f, "\tfd = %d\n", sock->fd);
+ fprintf(f, "\tport = %d\n", sock->port);
+ fprintf(f, "}\n\n");
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.h
new file mode 100644
index 0000000..19ddf42
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/sock.h
@@ -0,0 +1,38 @@
+#ifndef SOCK_H
+#define SOCK_H
+
+#include <stdio.h>
+
+#if defined (__UNIX__)
+# define SOCK_BSD
+#elif defined (__WIN32__)
+# define SOCK_WIN
+#endif
+
+#if defined(SOCK_WIN)
+# include <winsock.h>
+//#define sockaddr_in SOCKADDR_IN
+#endif
+
+typedef struct
+{
+ int fd;
+ int port;
+} tcpsock_s;
+
+int sock_start(void);
+void sock_finish(void);
+
+int tcp_init(tcpsock_s *sock, int port);
+void tcp_cleanup(tcpsock_s *sock);
+int tcp_listen(tcpsock_s *sock);
+tcpsock_s *tcp_accept(tcpsock_s *sock);
+void tcp_refuse(tcpsock_s *sock);
+int tcp_connect(tcpsock_s *sock, char *host, int port);
+void tcp_disconnect(tcpsock_s *sock);
+int tcp_read(tcpsock_s *sock, void *buf, size_t count);
+int tcp_write(tcpsock_s *sock, void *buf, size_t count);
+int tcp_getport(tcpsock_s *sock);
+void tcp_debug(tcpsock_s *sock, FILE *f);
+
+#endif /* SOCK_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.c
new file mode 100644
index 0000000..a15fef5
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.c
@@ -0,0 +1,70 @@
+/*
+ * string.c
+ *
+ * string handling routines
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "string.h"
+
+int str_assign(char **pstr, char *text)
+{
+ char *p;
+
+ if (!text)
+ {
+ free(*pstr);
+ *pstr = NULL;
+ return 0;
+ }
+
+ p = realloc(*pstr, strlen(text) + 1);
+ if (!p)
+ return -1;
+ *pstr = p;
+ strcpy(p, text);
+
+ return 0;
+}
+
+int str_cat(char **pstr, char *text)
+{
+ char *p = realloc(*pstr, strlen(*pstr) + strlen(text) + 1);
+ if (!p)
+ return -1;
+
+ *pstr = p;
+ strcat(p, text);
+
+ return 0;
+}
+
+/* strips trailing spaces */
+int str_striptrail(char *str)
+{
+ char *p;
+
+ for (p = str + strlen(str) - 1; p >= str; p--)
+ {
+ if (*p != ' ')
+ {
+ *(p + 1) = '\0';
+ return 0;
+ }
+ }
+ return 0;
+}
+
+void str_cleanup(char **pstr)
+{
+ if (*pstr)
+ {
+ free(*pstr);
+ *pstr = NULL;
+ }
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.h
new file mode 100644
index 0000000..64d8ecb
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/string.h
@@ -0,0 +1,9 @@
+#ifndef STRING_H
+#define STRING_H
+
+int str_assign(char **pstr, char *text);
+int str_cat(char **pstr, char *text);
+int str_striptrail(char *str);
+void str_cleanup(char **pstr);
+
+#endif /* STRING_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.c
new file mode 100644
index 0000000..e39dbd7
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.c
@@ -0,0 +1,149 @@
+/*
+ * thread.c
+ *
+ * Multithreading routines
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include "thread.h"
+
+int thr_create(thr_t *thread, int detached,
+ thr_startfunc_ptr_t startfunc, void *arg)
+{
+#if defined(PTHREADS)
+ int res;
+ pthread_attr_t attr;
+
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, detached
+ ? PTHREAD_CREATE_DETACHED
+ : PTHREAD_CREATE_JOINABLE);
+
+ res = pthread_create(thread, &attr, startfunc, arg);
+ pthread_attr_destroy(&attr);
+
+ return res;
+
+#elif defined(WINTHREADS)
+ DWORD ThreadID;
+ HANDLE hThread = CreateThread(NULL, 0, startfunc, arg, 0, &ThreadID);
+
+ if (hThread == NULL)
+ return GetLastError();
+
+ *thread = hThread;
+
+ return 0;
+#endif
+}
+
+int thr_cancel(thr_t thread)
+{
+#if defined(PTHREADS)
+ return pthread_cancel(thread);
+#elif defined(WINTHREADS)
+ BOOL res = TerminateThread(thread, 0);
+ if (!res)
+ return GetLastError();
+ return 0;
+#endif
+}
+
+void thr_exit(thr_exitcode_t retval)
+{
+#if defined(PTHREADS)
+ pthread_exit(retval);
+#elif defined(WINTHREADS)
+ ExitThread(retval);
+#endif
+}
+
+thr_t thr_self(void)
+{
+#if defined(PTHREADS)
+ return pthread_self();
+#elif defined(WINTHREADS)
+ return GetCurrentThread();
+#endif
+}
+
+int thr_equal(thr_t thread1, thr_t thread2)
+{
+#if defined(PTHREADS)
+ return pthread_equal(thread1, thread2);
+#elif defined(WINTHREADS)
+ return thread1 == thread2;
+#endif
+}
+
+int thr_join(thr_t thread, thr_exitcode_t *retval)
+{
+#if defined(PTHREADS)
+ return pthread_join(thread, retval);
+#elif defined(WINTHREADS)
+ return -1;
+#endif
+}
+
+int thr_detach(thr_t thread)
+{
+#if defined(PTHREADS)
+ return pthread_detach(thread);
+#elif defined(WINTHREADS)
+ return 0;
+#endif
+}
+
+/*
+ * Mutex functions
+ */
+
+thr_mutex_t thr_mutex_create(void)
+{
+#if defined(PTHREADS)
+ thr_mutex_t mutex;
+ pthread_mutex_init(&mutex, NULL);
+
+ return mutex;
+#elif defined(WINTHREADS)
+ return CreateMutex(NULL, FALSE, NULL);
+#endif
+}
+
+int thr_mutex_destroy(thr_mutex_t *mutex)
+{
+#if defined(PTHREADS)
+ return pthread_mutex_destroy(mutex);
+#elif defined(WINTHREADS)
+ return CloseHandle(*mutex) ? 0 : -1;
+#endif
+}
+
+int thr_mutex_lock(thr_mutex_t *mutex)
+{
+#if defined(PTHREADS)
+ return pthread_mutex_lock(mutex);
+#elif defined(WINTHREADS)
+ return WaitForSingleObject(*mutex, INFINITE) == WAIT_TIMEOUT ? -1 : 0;
+#endif
+}
+
+int thr_mutex_trylock(thr_mutex_t *mutex)
+{
+#if defined(PTHREADS)
+ return pthread_mutex_trylock(mutex);
+#elif defined(WINTHREADS)
+ return WaitForSingleObject(*mutex, 0) == WAIT_TIMEOUT ? -1 : 0;
+#endif
+}
+
+int thr_mutex_unlock(thr_mutex_t *mutex)
+{
+#if defined(PTHREADS)
+ return pthread_mutex_unlock(mutex);
+#elif defined(WINTHREADS)
+ return ReleaseMutex(*mutex) ? 0 : -1;
+#endif
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.h
new file mode 100644
index 0000000..c741c51
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/thread.h
@@ -0,0 +1,44 @@
+#ifndef THREAD_H
+#define THREAD_H
+
+#if defined(__UNIX__)
+# define PTHREADS
+#elif defined(__WIN32__)
+# define WINTHREADS
+#endif
+
+#if defined(PTHREADS)
+
+# include <pthread.h>
+typedef pthread_t thr_t;
+typedef pthread_mutex_t thr_mutex_t;
+typedef void * thr_exitcode_t;
+typedef void *(*thr_startfunc_ptr_t)(void *);
+typedef void * thr_startfunc_t;
+
+#elif defined(WINTHREADS)
+
+# include <windows.h>
+typedef HANDLE thr_t;
+typedef HANDLE thr_mutex_t;
+typedef DWORD thr_exitcode_t;
+typedef LPTHREAD_START_ROUTINE thr_startfunc_ptr_t;
+#define thr_startfunc_t thr_exitcode_t WINAPI
+#endif
+
+int thr_create(thr_t *thread, int detached,
+ thr_startfunc_ptr_t startfunc, void *arg);
+int thr_cancel(thr_t thread);
+void thr_exit(thr_exitcode_t retval);
+thr_t thr_self(void);
+int thr_equal(thr_t thread1, thr_t thread2);
+int thr_join(thr_t thread, thr_exitcode_t *retval);
+int thr_detach(thr_t thread);
+
+thr_mutex_t thr_mutex_create(void);
+int thr_mutex_destroy(thr_mutex_t *mutex);
+int thr_mutex_lock(thr_mutex_t *mutex);
+int thr_mutex_trylock(thr_mutex_t *mutex);
+int thr_mutex_unlock(thr_mutex_t *mutex);
+
+#endif /* THREAD_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.c b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.c
new file mode 100644
index 0000000..a04138c
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.c
@@ -0,0 +1,250 @@
+/*
+ * vlist.c
+ *
+ * "void linked list" structure and helper functions
+ *
+ * (C)1999 Stefano Busti
+ *
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <sys/types.h>
+
+#if defined(__WIN32__)
+# include <windows.h>
+#endif
+
+#include "vlist.h"
+
+/*
+ * Initializes a list, 2nd parameter is a pointer to
+ * a function which will be used to free the items
+ * if the list is an owner list.
+ * Call this once just after creating the list.
+ */
+int vlist_init(vlist_s *st, vlist_destroy_func_t destroyitem)
+{
+ st->head = NULL;
+ st->tail = NULL;
+ st->count = 0;
+ st->owner = 1;
+ st->destroyitem = destroyitem;
+ return 0;
+}
+
+/*
+ * Cleans up a list - call this when you've finished
+ * with the list.
+ */
+void vlist_cleanup(vlist_s *st)
+{
+ vlist_clear(st);
+}
+
+/*
+ * Removes all the items in the list. If the list is
+ * an owner list, item data is also freed.
+ */
+void vlist_clear(vlist_s *st)
+{
+ vlist_i *it = st->head;
+ while(it)
+ {
+ vlist_delete(st, it);
+ it = st->head;
+ }
+}
+
+vlist_i *vlist_addfirst(vlist_s *st, void *data)
+{
+ vlist_i *it = malloc(sizeof(vlist_i));
+
+ if (!it)
+ return NULL;
+
+ it->data = data;
+ it->prev = NULL;
+ it->next = NULL;
+ st->head = it;
+ st->tail = it;
+ st->count = 1;
+
+ return it;
+}
+
+/*
+ * Adds a new item after item it, using the data 'data'
+ */
+vlist_i *vlist_add(vlist_s *st, vlist_i *it, void *data)
+{
+ vlist_i *nextit;
+
+ /* handle special case where list is empty */
+ if (st->count == 0)
+ {
+ return vlist_addfirst(st, data);
+ }
+
+ /* grab a pointer to the next item */
+ nextit = it->next;
+
+ /* create our new item */
+ it->next = malloc(sizeof(vlist_i));
+
+ if (!it->next)
+ return NULL;
+
+ /* set up the new item */
+ it->next->data = data;
+ it->next->prev = it;
+ it->next->next = nextit;
+
+ if (nextit)
+ {
+ /* link the next item to the new one */
+ nextit->prev = it->next;
+ }
+ else
+ {
+ /* update tail */
+ st->tail = it->next;
+ }
+
+ /* add one to item count */
+ st->count++;
+
+ return it->next;
+}
+
+/*
+ * Inserts a new item before item it, using the data 'data'
+ */
+vlist_i *vlist_insert(vlist_s *st, vlist_i *it, void *data)
+{
+ vlist_i *previt;
+
+ /* handle special case where list is empty */
+ if (st->count == 0)
+ {
+ return vlist_addfirst(st, data);
+ }
+
+ /* grab a pointer to the previous item */
+ previt = it->prev;
+
+ /* create our new item */
+ it->prev = malloc(sizeof(vlist_i));
+
+ if (!it->prev)
+ return NULL;
+
+ /* set up the new item */
+ it->prev->data = data;
+ it->prev->prev = previt;
+ it->prev->next = it;
+
+ if (previt)
+ {
+ /* link the previous item to the new one */
+ previt->next = it->prev;
+ }
+ else
+ {
+ /* update head */
+ st->head = it->prev;
+ }
+
+ /* add one to item count */
+ st->count++;
+
+ return it->prev;
+}
+
+/*
+ * Removes the item 'it' from the list. If the list is
+ * an owner list, item data is also freed.
+ */
+void vlist_delete(vlist_s *st, vlist_i *it)
+{
+ /* call destroyitem() if we're the owner */
+ if (st->owner) {
+ st->destroyitem(it->data);
+ it->data = NULL;
+ }
+ if (it->next)
+ it->next->prev = it->prev;
+ else
+ st->tail = it->prev;
+
+ if (it->prev)
+ it->prev->next = it->next;
+ else
+ st->head = it->next;
+
+ free(it);
+ st->count--;
+}
+
+/*
+ * Returns the item data for item it
+ */
+void *vlist_get(vlist_i *it)
+{
+ return it->data;
+}
+
+/*
+ * Searches the list forwards for 'data',
+ * starting at item 'it'.
+ * Returns NULL if not found.
+ */
+vlist_i *vlist_findfwd(vlist_i *it, void *data)
+{
+ vlist_i *item;
+
+ /* iterate forwards searching for data */
+ for (item = it; item; item = item->next)
+ if (item->data == data)
+ return item;
+
+ /* not found */
+ return NULL;
+}
+
+/*
+ * Searches the list backwards for 'data',
+ * starting at item 'it'.
+ * Returns NULL if not found.
+ */
+vlist_i *vlist_findrev(vlist_i *it, void *data)
+{
+ vlist_i *item;
+
+ /* iterate backwards searching for data */
+ for (item = it; item; item = item->prev)
+ if (item->data == data)
+ return item;
+
+ /* not found */
+ return NULL;
+}
+
+void vlist_debug(vlist_s *st, FILE *stream)
+{
+ vlist_i *it;
+ fprintf(stream, "list with %d items\n", st->count);
+ fprintf(stream, "head = 0x%08lx\n", (u_long)st->head);
+ fprintf(stream, "tail = 0x%08lx\n", (u_long)st->tail);
+ fprintf(stream, "items are:\n{\n");
+
+ for (it = st->head; it; it = it->next)
+ {
+ fprintf(stream, "\t0x%08lx << [ 0x%08lx ] >> 0x%08lx (data:0x%08lx)\n",
+ (u_long)it->prev, (u_long)it,
+ (u_long)it->next, (u_long)it->data);
+ }
+
+ fprintf(stream, "}\n\n");
+}
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.h b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.h
new file mode 100644
index 0000000..d7c7e6f
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/vlist.h
@@ -0,0 +1,55 @@
+#ifndef VLIST_H
+#define VLIST_H
+
+#include <stdio.h>
+
+/* A single list item. */
+struct vlist_i
+{
+ /* The item's data. */
+ void *data;
+
+ /* Pointers to previous and next items */
+ struct vlist_i *prev, *next;
+};
+
+typedef struct vlist_i vlist_i;
+
+/* A doubly-linked list structure */
+struct vlist_s
+{
+ /* First and last items in the list */
+ vlist_i *head, *tail;
+
+ /* Number of items in the list */
+ int count;
+
+ /*
+ * If this is non-zero, the list owns its items
+ * and will free data when any items are removed
+ */
+ int owner;
+
+ /*
+ * Pointer to the function used to free data
+ */
+ void (*destroyitem)(void *);
+};
+
+typedef struct vlist_s vlist_s;
+
+typedef void vlist_destroy_func_t (void *);
+
+/* function declarations */
+int vlist_init(vlist_s *st, vlist_destroy_func_t destroyitem);
+void vlist_cleanup(vlist_s *st);
+void vlist_clear(vlist_s *st);
+vlist_i *vlist_add(vlist_s *st, vlist_i *it, void *data);
+vlist_i *vlist_insert(vlist_s *st, vlist_i *it, void *data);
+void vlist_delete(vlist_s *st, vlist_i *it);
+void *vlist_get(vlist_i *it);
+vlist_i *vlist_findfwd(vlist_i *it, void *data);
+vlist_i *vlist_findrev(vlist_i *it, void *data);
+void vlist_debug(vlist_s *st, FILE *stream);
+
+#endif /* VLIST_H */
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/.cvsignore b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/.cvsignore
new file mode 100644
index 0000000..4eb10fa
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/.cvsignore
@@ -0,0 +1,5 @@
+*.ncb *.opt *.aps *.plg *.zip *.001 *.gz
+serproxy
+Debug
+Release
+Output
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsp b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsp
new file mode 100644
index 0000000..f038a67
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsp
@@ -0,0 +1,162 @@
+# Microsoft Developer Studio Project File - Name="serproxy" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=serproxy - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "serproxy.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "serproxy.mak" CFG="serproxy - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "serproxy - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "serproxy - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "serproxy - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__WIN32__" /YX /FD /c
+# ADD BASE RSC /l 0x809 /d "NDEBUG"
+# ADD RSC /l 0x809 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386
+
+!ELSEIF "$(CFG)" == "serproxy - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "__WIN32__" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x809 /d "_DEBUG"
+# ADD RSC /l 0x809 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ENDIF
+
+# Begin Target
+
+# Name "serproxy - Win32 Release"
+# Name "serproxy - Win32 Debug"
+# Begin Source File
+
+SOURCE=..\cfglib.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\cfglib.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\config.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\config.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\error.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\error.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\main.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\pipe.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\pipe.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\sio.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\sio.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\sock.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\sock.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\string.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\string.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\thread.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\thread.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\vlist.c
+# End Source File
+# Begin Source File
+
+SOURCE=..\vlist.h
+# End Source File
+# End Target
+# End Project
diff --git a/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsw b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsw
new file mode 100644
index 0000000..70a5a1d
--- /dev/null
+++ b/bikewedge/software/RetoolingForOpenSprints/serproxy-0.1.3.src/win32/serproxy.dsw
@@ -0,0 +1,29 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "serproxy"=.\serproxy.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/shield/untitled.brd b/shield/untitled.brd
deleted file mode 100644
index 4040fc5..0000000
--- a/shield/untitled.brd
+++ /dev/null
Binary files differ
diff --git a/shield/untitled.sch b/shield/untitled.sch
deleted file mode 100644
index 684e719..0000000
--- a/shield/untitled.sch
+++ /dev/null
Binary files differ