Skip to content

Commit b416aa8

Browse files
committed
2 parents 938c4e8 + ef30024 commit b416aa8

File tree

1 file changed

+7
-57
lines changed

1 file changed

+7
-57
lines changed

adafruit_bno055.py

Lines changed: 7 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -228,102 +228,52 @@ def use_external_crystal(self, value):
228228
def temperature(self):
229229
"""Measures the temperature of the chip in degrees Celsius."""
230230
return self._temperature
231-
232-
@temperature.setter
233-
def temperature(self):
234-
self._temperature = _ReadOnlyUnaryStruct(0x34, 'b')
235231

236232
@property
237233
def acceleration(self):
238234
"""Gives the raw accelerometer readings, in m/s."""
239235
if self.mode not in [0, 2, 3, 6]:
240236
return self._acceleration
241-
else:
242-
return (None, None, None)
243-
244-
@acceleration.setter
245-
def acceleration(self):
246-
self._acceleration = _ScaledReadOnlyStruct(0x08, '<hhh', 1/100)
247-
237+
return (None, None, None)
248238

249239
@property
250240
def magnetic(self):
251241
"""Gives the raw magnetometer readings in microteslas."""
252242
if self.mode not in [0, 3, 5, 8]:
253243
return self._magnetic
254-
255-
else:
256-
return (None, None, None)
257-
258-
@magnetic.setter
259-
def magnetic(self):
260-
self._magnetic = _ScaledReadOnlyStruct(0x0e, '<hhh', 1/16)
261-
244+
return (None, None, None)
262245

263246
@property
264247
def gyro(self):
265248
"""Gives the raw gyroscope reading in radians per second."""
266249
if self.mode not in [0, 1, 2, 4, 9, 10]:
267250
return self._gyro
268-
269-
else:
270-
return (None, None, None)
271-
272-
@gyro.setter
273-
def gyro(self):
274-
self._gyro = _ScaledReadOnlyStruct(0x14, '<hhh', 0.001090830782496456)
275-
251+
return (None, None, None)
276252

277253
@property
278254
def euler(self):
279255
"""Gives the calculated orientation angles, in degrees."""
280256
if self.mode in [9, 11, 12]:
281-
282257
return self._euler
283-
else:
284-
return (None, None, None)
285-
286-
@euler.setter
287-
def euler(self):
288-
self._euler = _ScaledReadOnlyStruct(0x1a, '<hhh', 1/16)
289-
258+
return (None, None, None)
290259

291260
@property
292261
def quaternion(self):
293262
"""Gives the calculated orientation as a quaternion."""
294263
if self.mode in [9, 11, 12]:
295264
return self._quaternion
296-
else:
297-
return (None, None, None, None)
298-
299-
@quaternion.setter
300-
def quaternion(self):
301-
self._quaternion = _ScaledReadOnlyStruct(0x20, '<hhhh', 1/(1<<14))
302-
265+
return (None, None, None, None)
303266

304267
@property
305268
def linear_acceleration(self):
306269
"""Returns the linear acceleration, without gravity, in m/s."""
307270
if self.mode in [9, 11, 12]:
308271
return self._linear_acceleration
309-
310-
else:
311-
return (None, None, None)
312-
313-
@linear_acceleration.setter
314-
def linear_acceleration(self):
315-
self._linear_acceleration = _ScaledReadOnlyStruct(0x28, '<hhh', 1/100)
316-
272+
return (None, None, None)
317273

318274
@property
319275
def gravity(self):
320276
"""Returns the gravity vector, without acceleration in m/s."""
321277
if self.mode in [9, 11, 12]:
322278
return self._gravity
323-
324-
else:
325-
return (None, None, None)
326-
327-
@gravity.setter
328-
def gravity(self):
329-
self._gravity = _ScaledReadOnlyStruct(0x2e, '<hhh', 1/100)
279+
return (None, None, None)

0 commit comments

Comments
 (0)