software/videomixer: support test mode without pots
authorSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 13 Sep 2013 16:32:01 +0000 (18:32 +0200)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Fri, 13 Sep 2013 16:32:01 +0000 (18:32 +0200)
software/videomixer/main.c

index 57fc40269da43b673849a75aa8a930bbbee112f3..a5391f5fc68378bd7b99f4f04266c4811ef9f091 100644 (file)
@@ -12,6 +12,7 @@
 #include "dvisampler0.h"
 #include "dvisampler1.h"
 
+#ifdef POTS_BASE
 static int scale_pot(int raw, int range)
 {
        int pot_min = 64000;
@@ -44,7 +45,7 @@ static void additive_blend(int p0, int p1)
        fb_blender_f1_write(scale_pot(p1, 255));
 }
 
-static void pots_service(void)
+static void ui_service(void)
 {
        static int last_event;
        static int additive_blend_enabled;
@@ -74,6 +75,16 @@ static void pots_service(void)
        }
 }
 
+#else
+
+static void ui_service(void)
+{
+       fb_blender_f0_write(0xff);
+       fb_blender_f1_write(0xff);
+}
+
+#endif
+
 static void fb_service(void)
 {
        int c;
@@ -125,7 +136,7 @@ int main(void)
        while(1) {
                dvisampler0_service();
                dvisampler1_service();
-               pots_service();
+               ui_service();
                fb_service();
                membw_service();
        }