2.74

Fork of ExperimentServer by Patrick Wensing

Revision:
3:588db37d9079
Parent:
2:bb4b95f37896
Child:
4:434982de99ed
--- a/ExperimentServer.cpp	Tue Aug 11 22:18:35 2015 +0000
+++ b/ExperimentServer.cpp	Wed Aug 12 22:20:25 2015 +0000
@@ -46,13 +46,17 @@
         
     int n = _server.receiveFrom(_client,(char *) params, sizeof(params)*sizeof(float));    
     if ( (n% 4) > 0 ) {
-        if(_terminal!=NULL)
+        if(_terminal!=NULL) {
             _terminal->printf("ERROR: input data bad size\n");
+            _terminal->printf("ERROR: Expected %d got %d\n",4*num_params,n);
+        }
         return false;    
     }
     if ( n / 4 != num_params) {
-        if(_terminal!=NULL)
+        if(_terminal!=NULL) {
             _terminal->printf("ERROR: input data bad size\n");
+            _terminal->printf("ERROR: Expected %d got %d\n",4*num_params,n);
+        }
         return false;    
     }
     
@@ -82,4 +86,6 @@
 }
 void ExperimentServer::setExperimentComplete() {
     flushBuffer();
+    char buff = {'0'};
+    _server.sendTo(_client,buff,1);
 }   
\ No newline at end of file