summaryrefslogtreecommitdiff
path: root/2003/i/buzz/src/busp/test_busp.cc
diff options
context:
space:
mode:
authorschodet2003-05-22 20:52:10 +0000
committerschodet2003-05-22 20:52:10 +0000
commit9e9ac23d846063f7b3b533444b213e6ffb931dd9 (patch)
treec1b444b27580fe9183311765515d209bab442817 /2003/i/buzz/src/busp/test_busp.cc
parent028befd70da61c3468149a1f1afa3d9eaf4369c7 (diff)
Ajout des Actionneurs
Diffstat (limited to '2003/i/buzz/src/busp/test_busp.cc')
-rw-r--r--2003/i/buzz/src/busp/test_busp.cc23
1 files changed, 22 insertions, 1 deletions
diff --git a/2003/i/buzz/src/busp/test_busp.cc b/2003/i/buzz/src/busp/test_busp.cc
index 9feaeaa..a3b7c9e 100644
--- a/2003/i/buzz/src/busp/test_busp.cc
+++ b/2003/i/buzz/src/busp/test_busp.cc
@@ -75,13 +75,34 @@ main (int argc, char **argv)
atoi (argv[i + 1]));
}
}
+ if (argc >= 4 && strcmp (argv[1], "actionneurs") == 0 && argc % 2
+ == 0)
+ {
+ if (strcmp (argv[2], "all") == 0)
+ {
+ busp.getActionneurs ().setAll (atoi (argv[3]),
+ atoi (argv[4]))
+ }
+ else
+ {
+ for (int i = 2; i < argc; i += 2)
+ {
+ busp.getActionneurs ().set (atoi (argv[i]),
+ atoi (argv[i + 1]));
+ }
+ }
+ }
else
{
cerr << argv[0] << ": teste le bus parallèle." << endl
<< "\t" << argv[0] << " <adresse> [<donnée>]" << endl
<< "\t" << argv[0] << " reset" << endl
<< "\t" << argv[0] << " irq" << endl
- << "\t" << argv[0] << " servo [servo pos...]" << endl;
+ << "\t" << argv[0] << " capteurs" << endl
+ << "\t" << argv[0] << " actionneurs [<n> <val>...]" << endl
+ << "\t" << argv[0] << " actionneurs all <set> <reset>" <<
+ endl
+ << "\t" << argv[0] << " servo [<servo> <pos>...]" << endl;
}
return 1;
}