Ver código fonte

General fixes

Neal Wilson 11 anos atrás
pai
commit
3d44733294
1 arquivos alterados com 12 adições e 9 exclusões
  1. 12
    9
      config/Windows/productionroaster.xml

+ 12
- 9
config/Windows/productionroaster.xml Ver arquivo

@@ -110,7 +110,7 @@
110 110
 				var driverIndex = configModel.index(i, 0, rootIndex);
111 111
 				var driverReference = configModel.referenceElement(configModel.data(driverIndex, 32));
112 112
 				if(driverReference.driver == "nidaqmxbase" || driverReference.driver == "nidaqmx") {
113
-				if(configModel.hasChildren(driverIndex)) {
113
+					if(configModel.hasChildren(driverIndex)) {
114 114
 						for(var j = 0; j < configModel.rowCount(driverIndex); j++) {
115 115
 							var deviceIndex = configModel.index(j, 0, driverIndex);
116 116
 							var deviceReference = configModel.referenceElement(configModel.data(deviceIndex, 32));
@@ -224,14 +224,17 @@
224 224
 						}
225 225
 					}
226 226
 				}
227
-				else if(driverReference.driver == "dataqsdk")
228
-				{
229
-					var device = new DataqSdkDevice(driverReference.autoSelect ? driverReference.deviceNumber : driverReference.port);
227
+				else if(driverReference.driver == "dataqsdk") {
228
+					var device;
229
+					if(driverReference.autoSelect == "true") {
230
+						device = new DataqSdkDevice(driverReference.deviceNumber);
231
+					}
232
+					else {
233
+						device = new DataqSdkDevice(driverReference.port);
234
+					}
230 235
 					var sampleRate = 6;
231
-					if(configModel.hasChildren(driverIndex)
232
-					{
233
-						for(var j = 0; j < configModel.rowCount(driverIndex); j++)
234
-						{
236
+					if(configModel.hasChildren(driverIndex)) {
237
+						for(var j = 0; j < configModel.rowCount(driverIndex); j++) {
235 238
 							var channelIndex = configModel.index(j, 0, driverIndex);
236 239
 							var channelReference = configModel.referenceElement(configModel.data(channelIndex, 32));
237 240
 							var unit;
@@ -261,7 +264,7 @@
261 264
 						}
262 265
 						sampleRate /= configModel.rowCount(driverIndex);
263 266
 					}
264
-					device.setSampleRate(sampleRate);
267
+					device.setClockRate(sampleRate);
265 268
 					device.start();
266 269
 					dataqsdkdevices.push(device);
267 270
 				}

Carregando…
Cancelar
Salvar