@@ -38,8 +38,8 @@ var UserDefinedProtocol = {
38
38
* @author CzechGlobe - Department of Adaptive Biotechnologies (JaCe)
39
39
* @copyright Jan Červený 2019(c)
40
40
* @license MIT
41
- * @version 3.1.8
42
- * @modified 4.5.2019 (JaCe)
41
+ * @version 3.1.9
42
+ * @modified 19.7.2020 (JaCe)
43
43
*
44
44
* @notes For proper functionality of the script "OD Regulator" protocol has to be disabled as well as chosen
45
45
* controlled accessory protocols (i.e. Lights, Thermoregulation, GMS, Stirrer).
@@ -198,44 +198,25 @@ if (!theAccessory.context().getInt('initialization', 0)) {
198
198
default :
199
199
theExperiment . addEvent ( '!!! Unknown parameter set for control - check controlledParameter setting' )
200
200
}
201
- // TODO rewrite following part
202
- if ( UserDefinedProtocol . turbidostatODType === 720 || 735 ) {
201
+ if ( UserDefinedProtocol . turbidostatODType === 680 || UserDefinedProtocol . regressionODType === 680 ) {
202
+ if ( Number ( theGroup . getAccessory ( 'od-sensors.od-680' ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
203
+ theExperiment . addEvent ( '!!! OD680 measurement protocol is set to wrong interval. Please correct it !!!' )
204
+ }
205
+ }
206
+ if ( UserDefinedProtocol . turbidostatODType === 720 || UserDefinedProtocol . regressionODType === 720 || UserDefinedProtocol . turbidostatODType === 735 || UserDefinedProtocol . regressionODType === 735 ) {
203
207
var OD7XYString
204
208
if ( theGroup . getAccessory ( 'od-sensors.od-720' ) === null ) {
205
209
OD7XYString = 'od-sensors.od-735'
206
210
if ( Number ( theGroup . getAccessory ( OD7XYString ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
207
- theExperiment . addEvent ( '!!! OD735 measurement protocol set to wrong interval' )
211
+ theExperiment . addEvent ( '!!! OD735 measurement protocol is set to wrong interval. Please correct it !!! ' )
208
212
}
209
213
} else {
210
214
OD7XYString = 'od-sensors.od-720'
211
215
if ( Number ( theGroup . getAccessory ( OD7XYString ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
212
- theExperiment . addEvent ( '!!! OD720 measurement protocol set to wrong interval' )
216
+ theExperiment . addEvent ( '!!! OD720 measurement protocol is set to wrong interval. Please correct it !!! ' )
213
217
}
214
218
}
215
219
theAccessory . context ( ) . put ( 'OD7XYString' , OD7XYString )
216
- } else {
217
- if ( Number ( theGroup . getAccessory ( 'od-sensors.od-680' ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
218
- theExperiment . addEvent ( '!!! OD680 measurement protocol set to wrong interval' )
219
- }
220
- }
221
- if ( UserDefinedProtocol . regressionODType === 720 || 735 ) {
222
- var RegOD7XYString
223
- if ( theGroup . getAccessory ( 'od-sensors.od-720' ) === null ) {
224
- RegOD7XYString = 'od-sensors.od-735'
225
- if ( Number ( theGroup . getAccessory ( OD7XYString ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
226
- theExperiment . addEvent ( '!!! OD735 measurement protocol set to wrong interval' )
227
- }
228
- } else {
229
- RegOD7XYString = 'od-sensors.od-720'
230
- if ( Number ( theGroup . getAccessory ( OD7XYString ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
231
- theExperiment . addEvent ( '!!! OD720 measurement protocol set to wrong interval' )
232
- }
233
- }
234
- theAccessory . context ( ) . put ( 'RegOD7XYString' , RegOD7XYString )
235
- } else {
236
- if ( Number ( theGroup . getAccessory ( 'od-sensors.od-680' ) . getProtoConfigValue ( ) ) !== UserDefinedProtocol . ODReadoutInterval ) {
237
- theExperiment . addEvent ( '!!! OD680 measurement protocol set to wrong interval' )
238
- }
239
220
}
240
221
controlParameter ( UserDefinedProtocol . controlledParameter , UserDefinedProtocol . controlledParameterSteps [ 0 ] )
241
222
theAccessory . context ( ) . put ( 'initialization' , 1 )
0 commit comments