Module: xenomai-abe
Branch: analogy
Commit: 5b30b306df69d28fba727b9ba7ada017423e9760
URL:    
http://git.xenomai.org/?p=xenomai-abe.git;a=commit;h=5b30b306df69d28fba727b9ba7ada017423e9760

Author: Alexis Berlemont <alexis.berlem...@gmail.com>
Date:   Mon Mar 22 22:37:33 2010 +0100

analogy: make cmd_read work with infinite acquisitions (-S 0)

---

 src/utils/analogy/cmd_read.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/utils/analogy/cmd_read.c b/src/utils/analogy/cmd_read.c
index ee65dc9..fb21081 100644
--- a/src/utils/analogy/cmd_read.c
+++ b/src/utils/analogy/cmd_read.c
@@ -244,6 +244,7 @@ int main(int argc, char *argv[])
 
        /* Update the command structure */
        cmd.scan_end_arg = cmd.nb_chan;
+       cmd.stop_src = cmd.stop_arg != 0 ? TRIG_COUNT : TRIG_NONE;
 
        if (real_time != 0) {
 
@@ -328,8 +329,9 @@ int main(int argc, char *argv[])
 
        if (verbose != 0) {
                printf("cmd_read: scan size = %u\n", scan_size);
-               printf("cmd_read: size to read = %u\n",
-                      scan_size * cmd.stop_arg);
+               if (cmd.stop_arg != 0)
+                       printf("cmd_read: size to read = %u\n",
+                              scan_size * cmd.stop_arg);
        }
 
        /* Cancel any former command which might be in progress */


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to