Some fixes
authorJeremy Tan <[email protected]>
Thu, 31 Oct 2013 05:28:40 +0000 (13:28 +0800)
committerJeremy Tan <[email protected]>
Thu, 31 Oct 2013 22:57:32 +0000 (06:57 +0800)
server/image.c
server/sensors/dilatometer.c
server/sensors/pressure.c
testing/MCTXWeb/public_html/static/mctx.control.js

index d19ee7a..a32ac2c 100644 (file)
@@ -74,8 +74,8 @@ void Image_Handler(FCGIContext * context, char * params)
                g_captureID = num;
        }
 
-       //cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_WIDTH, width);
-       //cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_HEIGHT, height);
+       cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_WIDTH, width);
+       cvSetCaptureProperty(g_capture, CV_CAP_PROP_FRAME_HEIGHT, height);
 
        *frame = cvQueryFrame(g_capture);
        result = (*frame != NULL);
index 60532a2..b9fb833 100644 (file)
@@ -179,7 +179,7 @@ bool Dilatometer_GetExpansion( int id, double * value, int samples)
        Log(LOGDEBUG, "GET IMAGE?");
 
        IplImage * frame = NULL;
-       result = Camera_GetImage( 0, 1600, 1200 ,&frame); // Get a 1600x1200 image and place it into src
+       result = Camera_GetImage( 0, 800, 600,&frame); // Get a 1600x1200 image and place it into src
        Log(LOGDEBUG, "Got image...");
 
        // If an error occured when capturing image then return
index 699dda3..d93ceed 100644 (file)
@@ -61,12 +61,13 @@ double Pressure_Callibrate(int id, int adc)
                        double Vout = ADC_TO_MVOLTS(adc);
                        return ((Vout - 0.1*Vs)/(0.8*Vs))*(Pmax - Pmin) + Pmin;
                        */
-
-                       return Data_Calibrate((double)adc, high_raw, high_cal, sizeof(high_raw)/sizeof(double));
+                       return adc;
+                       //return Data_Calibrate((double)adc, high_raw, high_cal, sizeof(high_raw)/sizeof(double));
                }       
                case PRES_LOW0:
                        // Not calibrated!
-                       return (200.0 * (adc / ADC_RAW_MAX));
+                       //return (200.0 * ((double)adc / ADC_RAW_MAX));
+                       return adc;
                default:
                        Fatal("Unknown Pressure id %d", id);
                        return -1; // Should never happen
index f414a82..212f708 100644 (file)
@@ -21,6 +21,7 @@ function toggleControls(running) {
     $("#start-widget").hide();
   } else {
     $("#start-widget").show();
+    $("#start-widget input").removeAttr("disabled");
     $("#experiment-stop").hide();
     $("#pressure-widget").hide();
   }

UCC git Repository :: git.ucc.asn.au