summaryrefslogtreecommitdiff
path: root/digital/io/src/gutter
diff options
context:
space:
mode:
authorNélio Laranjeiro2008-03-30 20:53:54 +0200
committerNélio Laranjeiro2008-03-30 20:53:54 +0200
commit20bbd9db488c56bfc2195865ec2b5c77fa024dbd (patch)
treee43c7bf410358b218eed70a1d3555c921ce0a6d1 /digital/io/src/gutter
parent08f990e718f99e6caf53cb4583db267a0714ce6b (diff)
Moved the gutter fsm to the io/directory.
Diffstat (limited to 'digital/io/src/gutter')
-rw-r--r--digital/io/src/gutter/Makefile.gutter22
-rw-r--r--digital/io/src/gutter/gutter.conf5
-rw-r--r--digital/io/src/gutter/gutter.fsm34
-rw-r--r--digital/io/src/gutter/gutter_cb.c70
-rw-r--r--digital/io/src/gutter/gutter_robo.h35
5 files changed, 0 insertions, 166 deletions
diff --git a/digital/io/src/gutter/Makefile.gutter b/digital/io/src/gutter/Makefile.gutter
deleted file mode 100644
index ceae7a8a..00000000
--- a/digital/io/src/gutter/Makefile.gutter
+++ /dev/null
@@ -1,22 +0,0 @@
-CFLAGS = -O2 -Wall
-
-all: prgm exe dot png
-
-prgm: gutter.fsm gutter.conf
- python ../../../../tools/dfagen/dfagen.py -o c -d $< -c gutter.conf -p gutter
-
-exe: gutter.fsm gutter.conf
- make prgm
-
-dot: gutter.fsm gutter.conf
- python ../../../../tools/dfagen/dfagen.py -o dot -d $< -c gutter.conf -p gutter
-
-png: gutter.dot
- dot -Tpng -o gutter.png gutter.dot
-
-clean:
- rm -f gutter.h
- rm -f gutter_cb.h
- rm -f gutter.dot
- rm -f gutter.png
- rm -f gutter.c
diff --git a/digital/io/src/gutter/gutter.conf b/digital/io/src/gutter/gutter.conf
deleted file mode 100644
index 2f21fd61..00000000
--- a/digital/io/src/gutter/gutter.conf
+++ /dev/null
@@ -1,5 +0,0 @@
-[user]
-type = gutter_t
-type-forward-decl = typedef struct gutter_t gutter_t;
-type-decl = #include "gutter_robo.h"
-field = fsm
diff --git a/digital/io/src/gutter/gutter.fsm b/digital/io/src/gutter/gutter.fsm
deleted file mode 100644
index 158c8d13..00000000
--- a/digital/io/src/gutter/gutter.fsm
+++ /dev/null
@@ -1,34 +0,0 @@
-#FSM get samples
-get_samples
-
-States:
- START
- GO_TO_GUTTER
- OPEN_COLLECTOR
- CLOSE_COLLECTOR
- END
-
-Events:
- ok
- position_reached
- position_failed
- collector_opened
- collector_closed
-
-START:
- ok -> GO_TO_GUTTER
- Go to the gutter.
-
-GO_TO_GUTTER:
- position_reached -> OPEN_COLLECTOR
- The robo is near the gutter and the door can be opened.
- position_failed -> .
- The position failed, shall try another path.
-
-OPEN_COLLECTOR:
- collector_opened -> CLOSE_COLLECTOR
- Wait some time and clse the door.
-
-CLOSE_COLLECTOR:
- collector_closed-> END
- The samples has been inserted in the gutter.
diff --git a/digital/io/src/gutter/gutter_cb.c b/digital/io/src/gutter/gutter_cb.c
deleted file mode 100644
index 729c187f..00000000
--- a/digital/io/src/gutter/gutter_cb.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * THIS IS AN AUTOMATICALLY GENERATED FILE, DO NOT EDIT!
- *
- * Skeleton for get_samples callbacks implementation.
- *
- *
- */
-#include "gutter_cb.h"
-
-/*
- * START =ok=>
- * => GO_TO_GUTTER
- * Go to the gutter.
- */
-gutter_branch_t
-gutter__START__ok (gutter_t *user)
-{
- asserv_go_to_gutter();
- return gutter_next (START, ok);
-}
-
-/*
- * CLOSE_COLLECTOR =collector_closed=>
- * => END
- * The samples has been inserted in the gutter.
- */
-gutter_branch_t
-gutter__CLOSE_COLLECTOR__collector_closed (gutter_t *user)
-{
- //Close the collector.
- trap_close_rear_panel();
- return gutter_next (CLOSE_COLLECTOR, collector_closed);
-}
-
-/*
- * GO_TO_GUTTER =position_failed=>
- * => GO_TO_GUTTER
- * The position failed, shall try another path.
- */
-gutter_branch_t
-gutter__GO_TO_GUTTER__position_failed (gutter_t *user)
-{
- return gutter_next (GO_TO_GUTTER, position_failed);
-}
-
-/*
- * GO_TO_GUTTER =position_reached=>
- * => OPEN_COLLECTOR
- * The robo is near the gutter and the door can be opened.
- */
-gutter_branch_t
-gutter__GO_TO_GUTTER__position_reached (gutter_t *user)
-{
- // Open the collector.
- trap_open_rear_panel();
- return gutter_next (GO_TO_GUTTER, position_reached);
-}
-
-/*
- * OPEN_COLLECTOR =collector_opened=>
- * => CLOSE_COLLECTOR
- * Wait some time and clse the door.
- */
-gutter_branch_t
-gutter__OPEN_COLLECTOR__collector_opened (gutter_t *user)
-{
- utils_delay_ms(4.4);
- return gutter_next (OPEN_COLLECTOR, collector_opened);
-}
-
diff --git a/digital/io/src/gutter/gutter_robo.h b/digital/io/src/gutter/gutter_robo.h
deleted file mode 100644
index 251d6f4d..00000000
--- a/digital/io/src/gutter/gutter_robo.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef gutter_robo_h
-#define gutter_robo_h
-/* gutter_robo.h */
-/* {{{
- *
- * Copyright (C) 2008 Nélio Laranjeiro
- *
- * APBTeam:
- * Web: http://apbteam.org/
- * Email: team AT apbteam DOT org
- *
- * 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.
- *
- * }}} */
-
-#include "gutter.h"
-
-struct gutter_t
-{
- gutter_state_t fsm;
-};
-
-#endif /* gutter_robo_h */