DSGateway sketch program for Nucleo. This program is using DSGatewayLibMBED

Dependencies:   DSgatewayMBED mbed TrackReporterS88_DS

Revision:
1:28c58a355b7f
Parent:
0:c05fdb9d1e8a
Child:
2:4bece8af05e8
--- a/main.cpp	Fri Jan 23 22:31:04 2015 +0000
+++ b/main.cpp	Sat Jan 24 06:46:34 2015 +0000
@@ -197,9 +197,26 @@
     return true;
   } /* reset */
   else if (function.compare("setPing") == 0) {
-      serial_pc.printf("@DSG,001,\n");
+    serial_pc.printf("@DSG,001,\n");
     return true;
+    
+  } else if (function == "getLocoConfig") {
+  
+    /*aResult = ctrl.readConfig(arguments[0], arguments[1], &aValue);*/
+    serial_pc.printf("@CV,");
+    serial_pc.printf("%d", arguments[0]);
+    serial_pc.printf(",");
+    serial_pc.printf("%d", arguments[1]);
+    serial_pc.printf(",");
+    serial_pc.printf("%d", 0x00);
+    serial_pc.printf(",\n");
+    
+    return true;
+  } else if (function == "setLocoConfig") {
+    return ds_gw.WriteConfig(arguments[0], arguments[1], arguments[2]);
+    
   }
+  
   else
   {
     return false;