11namespace microdata {
22 import AppInterface = user_interface_base . AppInterface
33 import Screen = user_interface_base . Screen
4- import Scene = user_interface_base . Scene
4+ import Scene = user_interface_base . Scene
55 import Sprite = user_interface_base . Sprite
66 import Affine = user_interface_base . Affine
77 import font = user_interface_base . font
88
99 /** Number of sensor information boxes that can fit onto the screen at once*/
1010 const MAX_SENSORS_ON_SCREEN : number = 5
1111 /** The colours that will be used for the lines & sensor information boxes */
12- const SENSOR_BOX_COLORS : number [ ] = [ 2 , 3 , 4 , 6 , 7 , 9 ]
12+ const SENSOR_BOX_COLORS : number [ ] = [ 2 , 3 , 4 , 6 , 7 , 9 ]
1313 /** The colours that will be used for writing the information about the sensor. */
14- const SENSOR_BOX_TEXT_COLORS : number [ ] = [ 1 , 1 , 1 , 1 , 15 , 15 ]
14+ const SENSOR_BOX_TEXT_COLORS : number [ ] = [ 1 , 1 , 1 , 1 , 15 , 15 ]
1515
1616 /**
1717 * Responsible for invoking the logging commands for each sensor,
@@ -45,7 +45,7 @@ namespace microdata {
4545 this . sensors = sensors
4646 this . numberOfSensors = sensors . length
4747
48- this . sensorIndexOffset = 0
48+ this . sensorIndexOffset = 0
4949 this . currentSensorIndex = 0
5050 this . sensorBoxColor = 15
5151 this . showCancelRecordingScreen = false ;
@@ -95,7 +95,7 @@ namespace microdata {
9595
9696 if ( this . sensorIndexOffset > 0 )
9797 this . sensorIndexOffset = Math . max ( 0 , this . sensorIndexOffset - 1 )
98-
98+
9999 this . update ( )
100100 }
101101 )
@@ -135,8 +135,8 @@ namespace microdata {
135135
136136 this . log ( )
137137 }
138-
139- log ( ) { this . scheduler . start ( ) }
138+
139+ log ( ) { this . scheduler . start ( ) }
140140
141141 update ( ) : void {
142142 Screen . fillRect (
@@ -149,8 +149,8 @@ namespace microdata {
149149
150150 // Check if all sensors have finished their work:
151151 if ( this . scheduler . loggingComplete ( ) ) {
152- screen ( ) . printCenter ( "Data Logging Complete." , ( screen ( ) . height >> 1 ) - 10 ) ;
153- screen ( ) . printCenter ( "Press B to back out." , screen ( ) . height >> 1 ) ;
152+ screen ( ) . printCenter ( "Data Logging Complete." , ( screen ( ) . height >> 1 ) - 10 ) ;
153+ screen ( ) . printCenter ( "Press B to back out." , screen ( ) . height >> 1 ) ;
154154 }
155155
156156 else {
@@ -160,7 +160,7 @@ namespace microdata {
160160 for ( let i = this . sensorIndexOffset ; i < this . numberOfSensors ; i ++ ) {
161161 if ( i - this . sensorIndexOffset > MAX_SENSORS_ON_SCREEN )
162162 break
163-
163+
164164 // Get the colour for this box
165165 this . sensorBoxColor = SENSOR_BOX_COLORS [ i % SENSOR_BOX_COLORS . length ]
166166
@@ -175,7 +175,7 @@ namespace microdata {
175175 16 ,
176176 16
177177 )
178-
178+
179179 screen ( ) . fillRect (
180180 7 ,
181181 y ,
@@ -241,7 +241,7 @@ namespace microdata {
241241 }
242242
243243 if ( this . showCancelRecordingScreen ) {
244- const headerX = Screen . HALF_WIDTH // Log has data in it
244+ const headerX = Screen . HALF_WIDTH ; // Log has data in it
245245
246246 // Outline:
247247 screen ( ) . fillRect (
@@ -263,14 +263,14 @@ namespace microdata {
263263 const tutorialTextLength = ( "Cancel recording?" . length * font . charWidth )
264264 screen ( ) . print (
265265 "Cancel recording?" ,
266- headerX - ( tutorialTextLength >> 1 ) ,
266+ headerX - ( tutorialTextLength >> 1 ) ,
267267 Screen . HALF_HEIGHT - 30 + 7 ,
268268 15 // Black
269269 )
270270
271271 // Underline the title:
272272 screen ( ) . fillRect (
273- headerX - ( tutorialTextLength >> 1 ) - 1 ,
273+ headerX - ( tutorialTextLength >> 1 ) - 1 ,
274274 Screen . HALF_HEIGHT - 30 + 16 ,
275275 tutorialTextLength ,
276276 2 ,
@@ -318,4 +318,4 @@ namespace microdata {
318318 }
319319 }
320320 }
321- }
321+ }
0 commit comments