From ecfa80f598c954e2c4b8d70279ae6371cd4187cf Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 30 Mar 2012 23:26:42 +0200 Subject: eurobot/2012, digital/io-hub/src/guybrush: change cabling Add lower clamps sensors and move outputs. --- digital/io-hub/src/guybrush/contact_defs.h | 10 +- digital/io-hub/src/guybrush/output_defs.h | 6 +- digital/io-hub/src/guybrush/simu.host.c | 4 +- digital/io-hub/src/guybrush/simu.host.h | 4 +- eurobot/2012/io-hub-cabling.svg | 565 +++++++++++++++++++---------- host/simu/robots/guybrush/link/bag.py | 2 +- 6 files changed, 395 insertions(+), 196 deletions(-) diff --git a/digital/io-hub/src/guybrush/contact_defs.h b/digital/io-hub/src/guybrush/contact_defs.h index 55773d78..471c88e5 100644 --- a/digital/io-hub/src/guybrush/contact_defs.h +++ b/digital/io-hub/src/guybrush/contact_defs.h @@ -28,8 +28,16 @@ #define CONTACT_COLOR E, 3 #define CONTACT_JACK E, 5 #define CONTACT_STRAT E, 1 +#define CONTACT_LOWER_CLAMP_SENSOR_1 D, 5 +#define CONTACT_LOWER_CLAMP_SENSOR_2 B, 6 +#define CONTACT_LOWER_CLAMP_SENSOR_3 D, 6 +#define CONTACT_LOWER_CLAMP_SENSOR_4 B, 7 #define CONTACT_LIST \ - CONTACT (CONTACT_STRAT) + CONTACT (CONTACT_STRAT) \ + CONTACT (CONTACT_LOWER_CLAMP_SENSOR_1) \ + CONTACT (CONTACT_LOWER_CLAMP_SENSOR_2) \ + CONTACT (CONTACT_LOWER_CLAMP_SENSOR_3) \ + CONTACT (CONTACT_LOWER_CLAMP_SENSOR_4) #endif /* contact_defs_h */ diff --git a/digital/io-hub/src/guybrush/output_defs.h b/digital/io-hub/src/guybrush/output_defs.h index c24bbd9c..4a481b8e 100644 --- a/digital/io-hub/src/guybrush/output_defs.h +++ b/digital/io-hub/src/guybrush/output_defs.h @@ -25,7 +25,7 @@ * * }}} */ -#define OUTPUT_PNEUM_OPEN A, 6 +#define OUTPUT_PNEUM_OPEN A, 5 #define OUTPUT_UPPER_CLAMP_OPEN C, 1 #define OUTPUT_UPPER_CLAMP_OUT C, 3 #define OUTPUT_UPPER_CLAMP_IN C, 5 @@ -33,8 +33,8 @@ #define OUTPUT_UPPER_CLAMP_UP C, 4 #define OUTPUT_DOOR_OPEN C, 7 #define OUTPUT_DOOR_CLOSE C, 6 -#define OUTPUT_LOWER_CLAMP_1_OPEN A, 5 -#define OUTPUT_LOWER_CLAMP_2_OPEN F, 5 +#define OUTPUT_LOWER_CLAMP_1_OPEN D, 4 +#define OUTPUT_LOWER_CLAMP_2_OPEN B, 5 #define OUTPUT_LIST \ OUTPUT (OUTPUT_PNEUM_OPEN, 0) \ diff --git a/digital/io-hub/src/guybrush/simu.host.c b/digital/io-hub/src/guybrush/simu.host.c index 46c2a8fd..d9830575 100644 --- a/digital/io-hub/src/guybrush/simu.host.c +++ b/digital/io-hub/src/guybrush/simu.host.c @@ -34,7 +34,9 @@ #include "io.h" /** AVR registers. */ -uint8_t PORTA, PORTC, PORTF, DDRA, DDRC, DDRF, PINA, PINE, PINF; +uint8_t PORTA, PORTB, PORTC, PORTD, PORTF; +uint8_t DDRA, DDRB, DDRC, DDRD, DDRF; +uint8_t PINA, PINB, PINC, PIND, PINE, PINF; /** Message types. */ uint8_t simu_mex_pos_report; diff --git a/digital/io-hub/src/guybrush/simu.host.h b/digital/io-hub/src/guybrush/simu.host.h index d2b0da91..9b38ee93 100644 --- a/digital/io-hub/src/guybrush/simu.host.h +++ b/digital/io-hub/src/guybrush/simu.host.h @@ -28,7 +28,9 @@ #ifdef HOST -extern uint8_t PORTA, PORTC, PORTF, DDRA, DDRC, DDRF, PINA, PINE, PINF; +extern uint8_t PORTA, PORTB, PORTC, PORTD, PORTF; +extern uint8_t DDRA, DDRB, DDRC, DDRD, DDRF; +extern uint8_t PINA, PINB, PINC, PIND, PINE, PINF; /** Send general purpose positions to indicate computation results. * - pos: array of positions to report. diff --git a/eurobot/2012/io-hub-cabling.svg b/eurobot/2012/io-hub-cabling.svg index efa4e4d8..44beedf8 100644 --- a/eurobot/2012/io-hub-cabling.svg +++ b/eurobot/2012/io-hub-cabling.svg @@ -35,9 +35,9 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.3131493" - inkscape:cx="577.69848" - inkscape:cy="586.5157" + inkscape:zoom="0.9285368" + inkscape:cx="448.33643" + inkscape:cy="436.1609" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" @@ -367,200 +367,183 @@ sodipodi:nodetypes="ccc" /> - - - + + + + 0 - 0 + spoke-indus2 - - spoke-indus2 + + 1 - - 1 + + 2 - - 2 + + 3 - - - - 3 + + + + lower clamp 1 open - - - pneumatic circuit open + + + pneumatic circuit open - team color switch + + + + + team color switch - - - - - spoke-biere pressure sensor - lower clamp 2 open - spoke-biere pressure sensor + jack + style="font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:FreeSans;-inkscape-font-specification:FreeSans" + xml:space="preserve">jack + @@ -626,7 +609,8 @@ x="358.59387" y="346.24518">DEV + id="g3171" + transform="translate(50,-6.3652344e-5)"> @@ -833,5 +817,208 @@ id="tspan3121" sodipodi:role="line">upper clamps up + + + + + 0 + spoke-indus2 + + 1 + + 2 + + 3 + + + + lower clamp 1 open + lower clamp sensor 1 + + + lower clamp sensor 3 + + + + + lower clamp 2 open + lower clamp sensor 2 + lower clamp sensor 4 + + diff --git a/host/simu/robots/guybrush/link/bag.py b/host/simu/robots/guybrush/link/bag.py index 22a2cd9f..d6c69324 100644 --- a/host/simu/robots/guybrush/link/bag.py +++ b/host/simu/robots/guybrush/link/bag.py @@ -31,6 +31,6 @@ class Bag: def __init__ (self, node, instance = 'robot0'): self.asserv = asserv.mex.Mex (node, '%s:asserv0' % instance) self.io_hub = io_hub.mex.Mex (node, '%s:io0' % instance, - contact_nb = 3, output_nb = 10) + contact_nb = 7, output_nb = 10) self.mimot = mimot.mex.Mex (node, '%s:mimot0' % instance) -- cgit v1.2.3