Simple Latency Measurement Application for Head Mounted Display. This project handles LED and light sensor to measure the latency from blinking to showing on the display.

Dependencies:   mbed-dsp mbed

Files at this revision

API Documentation at this revision

Comitter:
mfurukawa
Date:
Tue Sep 23 08:55:58 2014 +0000
Parent:
1:dd92720c2290
Commit message:
typo corected

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r dd92720c2290 -r 4ec0fc856963 main.cpp
--- a/main.cpp	Tue Sep 23 08:46:14 2014 +0000
+++ b/main.cpp	Tue Sep 23 08:55:58 2014 +0000
@@ -113,7 +113,7 @@
 
 int get_threshold()
 {
-    struct result dark, blight;
+    struct result dark, bright;
     int ret;
     
     // LED OFF
@@ -128,18 +128,18 @@
     wait(1);
     
     // get adc
-    get_mean_stdev( &blight.mean, &blight.stdev );
+    get_mean_stdev( &bright.mean, &bright.stdev );
     
     // show fractuation notice
-    if(dark.stdev * 3.3 > 0.1 || blight.stdev * 3.3 > 0.1 )
+    if(dark.stdev * 3.3 > 0.1 || bright.stdev * 3.3 > 0.1 )
     {
-        printf("*** CAUTION *** : LCD Backlight Flicker Detected(stdev > 0.1V). Blightness shuold be max. \n\r");
+        printf("*** CAUTION *** : LCD Backlight Flicker Detected(stdev > 0.1V). brightness shuold be max. \n\r");
         ret = -2;
         threshold = -1;
     }
-    else if(dark.stdev * 3.3 > 0.01 || blight.stdev * 3.3 > 0.01 )
+    else if(dark.stdev * 3.3 > 0.01 || bright.stdev * 3.3 > 0.01 )
     {
-        printf("(NOTICE) : LCD Backlight Flicker Detected (stdev > 0.01V). Blightness shuold be max.\n\r");
+        printf("(NOTICE) : LCD Backlight Flicker Detected (stdev > 0.01V). brightness shuold be max.\n\r");
         ret = -1;
         threshold = -1;
     }else
@@ -148,12 +148,12 @@
         ret = 0;
         
         // 50% threshold
-        threshold = (blight.mean - dark.mean) / 2.0 ;
+        threshold = (bright.mean - dark.mean) / 2.0 ;
     }
     
     // show result
     printf("Drk avg %1.5lf (SD %1.5lf) / ",   dark.mean * 3.3 ,   dark.stdev * 3.3);
-    printf("Blght avg %1.5lf (SD %1.5lf)\r\n", blight.mean * 3.3 , blight.stdev * 3.3);
+    printf("Brght avg %1.5lf (SD %1.5lf)\r\n", bright.mean * 3.3 , bright.stdev * 3.3);
     
     return ret;
 }