Browse Source

Update logging view for current channels

This improves support for Phidget22 current channel logging, including improved support for using control channels as the input to a linear spline interpolated series.
Neal Wilson 4 years ago
parent
commit
cf242030a4
1 changed files with 11 additions and 1 deletions
  1. 11
    1
      config/Windows/productionroaster.xml

+ 11
- 1
config/Windows/productionroaster.xml View File

467
 					for(var j = 0; j < device.channelCount(); j++) {
467
 					for(var j = 0; j < device.channelCount(); j++) {
468
 						channels.push(device.getChannel(j));
468
 						channels.push(device.getChannel(j));
469
 						columnNames.push(device.channelColumnName(j));
469
 						columnNames.push(device.channelColumnName(j));
470
-						channelType.push("T");
470
+						channelType.push(device.channelType(j));
471
 						if(device.isChannelHidden(j)) {
471
 						if(device.isChannelHidden(j)) {
472
 							channelVisibility.push(false);
472
 							channelVisibility.push(false);
473
 						} else {
473
 						} else {
474
 							channelVisibility.push(true);
474
 							channelVisibility.push(true);
475
 							var indicator = new TemperatureDisplay;
475
 							var indicator = new TemperatureDisplay;
476
+							if(device.channelType(j) == "C")
477
+							{
478
+								indicator.setDisplayUnits(Units.Unitless);
479
+								indicator.digitCount = 5;
480
+								indicator.setDecimalPlaces(2);
481
+							}
476
 							temperatureDisplays.push(indicator);
482
 							temperatureDisplays.push(indicator);
477
 							var decorator = new WidgetDecorator(indicator, device.channelIndicatorText(j), 2);
483
 							var decorator = new WidgetDecorator(indicator, device.channelIndicatorText(j), 2);
478
 							device.getChannel(j).newData.connect(indicator.setValue);
484
 							device.getChannel(j).newData.connect(indicator.setValue);
606
 									calibrator.add_pair(Number(sourcevalues[k]),Number(destvalues[k]));
612
 									calibrator.add_pair(Number(sourcevalues[k]),Number(destvalues[k]));
607
 								}
613
 								}
608
 								var indicator = new TemperatureDisplay;
614
 								var indicator = new TemperatureDisplay;
615
+								if(channelType[j] == "C") {
616
+									indicator.setDisplayUnits(Units.Unitless);
617
+									indicator.setDecimalPlaces(2);
618
+								}
609
 								temperatureDisplays.push(indicator);
619
 								temperatureDisplays.push(indicator);
610
 								var decorator = new WidgetDecorator(indicator, configModel.data(driverIndex, 0), 2);
620
 								var decorator = new WidgetDecorator(indicator, configModel.data(driverIndex, 0), 2);
611
 								channels[j].newData.connect(calibrator.newMeasurement);
621
 								channels[j].newData.connect(calibrator.newMeasurement);

Loading…
Cancel
Save