Skip to content

Commit ef30024

Browse files
committed
Removed setters since they weren't needed after all
1 parent f769261 commit ef30024

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

adafruit_bno055.py

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -229,89 +229,51 @@ def temperature(self):
229229
"""Measures the temperature of the chip in degrees Celsius."""
230230
return self._temperature
231231

232-
@temperature.setter
233-
def temperature(self):
234-
self._temperature = _ReadOnlyUnaryStruct(0x34, 'b')
235-
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
241237
return (None, None, None)
242238

243-
@acceleration.setter
244-
def acceleration(self):
245-
self._acceleration = _ScaledReadOnlyStruct(0x08, '<hhh', 1/100)
246-
247-
248239
@property
249240
def magnetic(self):
250241
"""Gives the raw magnetometer readings in microteslas."""
251242
if self.mode not in [0, 3, 5, 8]:
252243
return self._magnetic
253244
return (None, None, None)
254245

255-
@magnetic.setter
256-
def magnetic(self):
257-
self._magnetic = _ScaledReadOnlyStruct(0x0e, '<hhh', 1/16)
258-
259-
260246
@property
261247
def gyro(self):
262248
"""Gives the raw gyroscope reading in radians per second."""
263249
if self.mode not in [0, 1, 2, 4, 9, 10]:
264250
return self._gyro
265251
return (None, None, None)
266252

267-
@gyro.setter
268-
def gyro(self):
269-
self._gyro = _ScaledReadOnlyStruct(0x14, '<hhh', 0.001090830782496456)
270-
271-
272253
@property
273254
def euler(self):
274255
"""Gives the calculated orientation angles, in degrees."""
275256
if self.mode in [9, 11, 12]:
276257
return self._euler
277258
return (None, None, None)
278259

279-
@euler.setter
280-
def euler(self):
281-
self._euler = _ScaledReadOnlyStruct(0x1a, '<hhh', 1/16)
282-
283-
284260
@property
285261
def quaternion(self):
286262
"""Gives the calculated orientation as a quaternion."""
287263
if self.mode in [9, 11, 12]:
288264
return self._quaternion
289265
return (None, None, None, None)
290266

291-
@quaternion.setter
292-
def quaternion(self):
293-
self._quaternion = _ScaledReadOnlyStruct(0x20, '<hhhh', 1/(1<<14))
294-
295-
296267
@property
297268
def linear_acceleration(self):
298269
"""Returns the linear acceleration, without gravity, in m/s."""
299270
if self.mode in [9, 11, 12]:
300271
return self._linear_acceleration
301272
return (None, None, None)
302273

303-
@linear_acceleration.setter
304-
def linear_acceleration(self):
305-
self._linear_acceleration = _ScaledReadOnlyStruct(0x28, '<hhh', 1/100)
306-
307-
308274
@property
309275
def gravity(self):
310276
"""Returns the gravity vector, without acceleration in m/s."""
311277
if self.mode in [9, 11, 12]:
312278
return self._gravity
313279
return (None, None, None)
314-
315-
@gravity.setter
316-
def gravity(self):
317-
self._gravity = _ScaledReadOnlyStruct(0x2e, '<hhh', 1/100)

0 commit comments

Comments
 (0)