@@ -38,8 +38,8 @@ var UserDefinedProtocol = {
3838 * @author CzechGlobe - Department of Adaptive Biotechnologies (JaCe)
3939 * @copyright Jan Červený 2019(c)
4040 * @license MIT
41- * @version 3.1.8
42- * @modified 4.5.2019 (JaCe)
41+ * @version 3.1.9
42+ * @modified 19.7.2020 (JaCe)
4343 *
4444 * @notes For proper functionality of the script "OD Regulator" protocol has to be disabled as well as chosen
4545 * controlled accessory protocols (i.e. Lights, Thermoregulation, GMS, Stirrer).
@@ -198,44 +198,25 @@ if (!theAccessory.context().getInt('initialization', 0)) {
198198 default :
199199 theExperiment . addEvent ( '!!! Unknown parameter set for control - check controlledParameter setting' )
200200 }
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 ) {
203207 var OD7XYString
204208 if ( theGroup . getAccessory ( 'od-sensors.od-720' ) === null ) {
205209 OD7XYString = 'od-sensors.od-735'
206210 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 !!! ' )
208212 }
209213 } else {
210214 OD7XYString = 'od-sensors.od-720'
211215 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 !!! ' )
213217 }
214218 }
215219 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- }
239220 }
240221 controlParameter ( UserDefinedProtocol . controlledParameter , UserDefinedProtocol . controlledParameterSteps [ 0 ] )
241222 theAccessory . context ( ) . put ( 'initialization' , 1 )
0 commit comments