From: Jeremy Tan Date: Thu, 31 Oct 2013 05:28:40 +0000 (+0800) Subject: Some fixes X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=4272becc415bc659ea14650793559dcf15372a8b;p=matches%2FMCTX3420.git Some fixes --- diff --git a/server/image.c b/server/image.c index d19ee7a..a32ac2c 100644 --- a/server/image.c +++ b/server/image.c @@ -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); diff --git a/server/sensors/dilatometer.c b/server/sensors/dilatometer.c index 60532a2..b9fb833 100644 --- a/server/sensors/dilatometer.c +++ b/server/sensors/dilatometer.c @@ -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 diff --git a/server/sensors/pressure.c b/server/sensors/pressure.c index 699dda3..d93ceed 100644 --- a/server/sensors/pressure.c +++ b/server/sensors/pressure.c @@ -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 diff --git a/testing/MCTXWeb/public_html/static/mctx.control.js b/testing/MCTXWeb/public_html/static/mctx.control.js index f414a82..212f708 100644 --- a/testing/MCTXWeb/public_html/static/mctx.control.js +++ b/testing/MCTXWeb/public_html/static/mctx.control.js @@ -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(); }