From c024dddf40cd62f425179c1187d9b59ef97664fc Mon Sep 17 00:00:00 2001
From: "Michael D. M. Dryden" <mdryden@chem.utoronto.ca>
Date: Thu, 15 Oct 2015 16:10:26 -0400
Subject: [PATCH] Fixed settings bug.

---
 DSTAT/src/main.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/DSTAT/src/main.c b/DSTAT/src/main.c
index e9b9b97..395c264 100644
--- a/DSTAT/src/main.c
+++ b/DSTAT/src/main.c
@@ -7,6 +7,7 @@
 
 #include "experiment.h"
 #include "asf.h"
+#include "settings.h"
 #include "tcs.h"
 #include <string.h>
 #include <math.h>
@@ -23,20 +24,21 @@ int8_t command_handler(char command){
 	 * @param command Command character input.
 	 */
 
-			ca_experiment(p5, step_dac, step_seconds);
-			
-			//free arrays
-			free(step_dac);
-			free(step_seconds);
-			
-			break;
+	switch (command){
+        case 'E': //Experiment options
+            experiment_handler(getchar());
+            break;
         
+        case 'S': //Settings options
+            settings_handler(getchar());
+            break;
+            
         case 'T': ;
             uint16_t tcs_data[4] = {0,0,0,0};
             tcs_readvalues(tcs_data);
             printf("#INFO: TCS—%u %u %u %u\n\r", tcs_data[0], tcs_data[1], tcs_data[2], tcs_data[3]);
             break;
-		
+            
 		case 'V': //check version
 			printf("V%u.%u\n\r", BOARD_VER_MAJOR, BOARD_VER_MINOR);
 			break;
-- 
GitLab