tSet OUTPUT as macro - lego_film_processor - software for rotary photographic film processor with Lego Mindstorms RCX
 (HTM) git clone git://src.adamsgaard.dk/lego_film_processor
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 15cf49e52c347324197bd7f2b8f1142d34e4c980
 (DIR) parent e9da12db621e720b94560ee7b9d5d08388c631ee
 (HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
       Date:   Tue, 30 Jul 2019 15:17:00 +0200
       
       Set OUTPUT as macro
       
       Diffstat:
         M lego_jobo.nqc                       |      11 ++++++-----
       
       1 file changed, 6 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/lego_jobo.nqc b/lego_jobo.nqc
       t@@ -2,6 +2,7 @@
        
        #define DEVELOP_MINS 25         /* number of minutes to develop for */
        #define DEVELOP_SECS 30         /* number of seconds to develop for */
       +#define OUTPUT OUT_C
        
        task
        main()
       t@@ -10,21 +11,21 @@ main()
        
                Off(OUT_A + OUT_B + OUT_C);
                SetSleepTime(60);
       -        SetPower(OUT_A, OUT_FULL);    /* second arg an int between 0 and 7 */
       +        SetPower(OUTPUT, OUT_FULL);    /* second arg an int between 0 and 7 */
        
       -        On(OUT_A);
       +        On(OUTPUT);
                t_current = 0;
                t_end = 60*DEVELOP_MINS + DEVELOP_SECS;
        
                while (t_current < t_end) {
        
       -                SetPower(OUT_A, OUT_FULL);
       +                SetPower(OUTPUT, OUT_FULL);
                        Wait(T_TURN - 100);
        
       -                SetPower(OUT_A, 1);
       +                SetPower(OUTPUT, 1);
                        Wait(50);
        
       -                Toggle(OUT_A);
       +                Toggle(OUTPUT);
                        Wait(50);
        
                        t_current += T_TURN/100;