File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change 148
148
main_group .append (background )
149
149
150
150
# Accelerometer Properties. Normally accelerometer well calibrated
151
- # Will give a maxium output of 10 mts / s**2
151
+ # Will give a maximum output of 10 mts / s**2
152
152
VALUES_X = (- 10 , 10 )
153
153
VALUES_Y = (- 10 , 10 )
154
154
207
207
208
208
while True :
209
209
for val in fake__accel_data :
210
- if val [0 ] > 0 :
210
+ if val [0 ] >= 0 :
211
211
left_horizontal_bar .value = 0
212
212
right_horizontal_bar .value = val [0 ]
213
213
if val [0 ] < 0 :
214
214
left_horizontal_bar .value = - val [0 ]
215
215
right_horizontal_bar .value = 0
216
- if val [0 ] == 0 :
217
- right_horizontal_bar .value = 0
218
- left_horizontal_bar .value = 0
219
216
220
- if val [1 ] > 0 :
217
+ if val [1 ] >= 0 :
221
218
top_vertical_bar .value = val [1 ]
222
219
bottom_vertical_bar .value = 0
223
220
if val [1 ] < 0 :
224
221
bottom_vertical_bar .value = - val [1 ]
225
222
top_vertical_bar .value = 0
226
- if val [1 ] == 0 :
227
- top_vertical_bar .value = 0
228
- bottom_vertical_bar .value = 0
229
223
230
224
display .refresh ()
231
225
time .sleep (delay )
You can’t perform that action at this time.
0 commit comments