1
1
namespace microdata {
2
2
import AppInterface = user_interface_base . AppInterface
3
3
import Screen = user_interface_base . Screen
4
- import Scene = user_interface_base . Scene
4
+ import Scene = user_interface_base . Scene
5
5
import Sprite = user_interface_base . Sprite
6
6
import Affine = user_interface_base . Affine
7
7
import font = user_interface_base . font
8
8
9
9
/** Number of sensor information boxes that can fit onto the screen at once*/
10
10
const MAX_SENSORS_ON_SCREEN : number = 5
11
11
/** 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 ]
13
13
/** 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 ]
15
15
16
16
/**
17
17
* Responsible for invoking the logging commands for each sensor,
@@ -45,7 +45,7 @@ namespace microdata {
45
45
this . sensors = sensors
46
46
this . numberOfSensors = sensors . length
47
47
48
- this . sensorIndexOffset = 0
48
+ this . sensorIndexOffset = 0
49
49
this . currentSensorIndex = 0
50
50
this . sensorBoxColor = 15
51
51
this . showCancelRecordingScreen = false ;
@@ -95,7 +95,7 @@ namespace microdata {
95
95
96
96
if ( this . sensorIndexOffset > 0 )
97
97
this . sensorIndexOffset = Math . max ( 0 , this . sensorIndexOffset - 1 )
98
-
98
+
99
99
this . update ( )
100
100
}
101
101
)
@@ -135,8 +135,8 @@ namespace microdata {
135
135
136
136
this . log ( )
137
137
}
138
-
139
- log ( ) { this . scheduler . start ( ) }
138
+
139
+ log ( ) { this . scheduler . start ( ) }
140
140
141
141
update ( ) : void {
142
142
Screen . fillRect (
@@ -149,8 +149,8 @@ namespace microdata {
149
149
150
150
// Check if all sensors have finished their work:
151
151
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 ) ;
154
154
}
155
155
156
156
else {
@@ -160,7 +160,7 @@ namespace microdata {
160
160
for ( let i = this . sensorIndexOffset ; i < this . numberOfSensors ; i ++ ) {
161
161
if ( i - this . sensorIndexOffset > MAX_SENSORS_ON_SCREEN )
162
162
break
163
-
163
+
164
164
// Get the colour for this box
165
165
this . sensorBoxColor = SENSOR_BOX_COLORS [ i % SENSOR_BOX_COLORS . length ]
166
166
@@ -175,7 +175,7 @@ namespace microdata {
175
175
16 ,
176
176
16
177
177
)
178
-
178
+
179
179
screen ( ) . fillRect (
180
180
7 ,
181
181
y ,
@@ -241,7 +241,7 @@ namespace microdata {
241
241
}
242
242
243
243
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
245
245
246
246
// Outline:
247
247
screen ( ) . fillRect (
@@ -263,14 +263,14 @@ namespace microdata {
263
263
const tutorialTextLength = ( "Cancel recording?" . length * font . charWidth )
264
264
screen ( ) . print (
265
265
"Cancel recording?" ,
266
- headerX - ( tutorialTextLength >> 1 ) ,
266
+ headerX - ( tutorialTextLength >> 1 ) ,
267
267
Screen . HALF_HEIGHT - 30 + 7 ,
268
268
15 // Black
269
269
)
270
270
271
271
// Underline the title:
272
272
screen ( ) . fillRect (
273
- headerX - ( tutorialTextLength >> 1 ) - 1 ,
273
+ headerX - ( tutorialTextLength >> 1 ) - 1 ,
274
274
Screen . HALF_HEIGHT - 30 + 16 ,
275
275
tutorialTextLength ,
276
276
2 ,
@@ -318,4 +318,4 @@ namespace microdata {
318
318
}
319
319
}
320
320
}
321
- }
321
+ }
0 commit comments