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 148148main_group .append (background )
149149
150150# 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
152152VALUES_X = (- 10 , 10 )
153153VALUES_Y = (- 10 , 10 )
154154
207207
208208while True :
209209 for val in fake__accel_data :
210- if val [0 ] > 0 :
210+ if val [0 ] >= 0 :
211211 left_horizontal_bar .value = 0
212212 right_horizontal_bar .value = val [0 ]
213213 if val [0 ] < 0 :
214214 left_horizontal_bar .value = - val [0 ]
215215 right_horizontal_bar .value = 0
216- if val [0 ] == 0 :
217- right_horizontal_bar .value = 0
218- left_horizontal_bar .value = 0
219216
220- if val [1 ] > 0 :
217+ if val [1 ] >= 0 :
221218 top_vertical_bar .value = val [1 ]
222219 bottom_vertical_bar .value = 0
223220 if val [1 ] < 0 :
224221 bottom_vertical_bar .value = - val [1 ]
225222 top_vertical_bar .value = 0
226- if val [1 ] == 0 :
227- top_vertical_bar .value = 0
228- bottom_vertical_bar .value = 0
229223
230224 display .refresh ()
231225 time .sleep (delay )
You can’t perform that action at this time.
0 commit comments