Skip to content

Commit 46d677e

Browse files
Merge pull request #14 from jposada202020/removing_reset_function
removing reset function
2 parents a0f486f + 45064dd commit 46d677e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

adafruit_as7341.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,25 +247,21 @@ def __init__(self, i2c_bus, address=_AS7341_I2CADDR_DEFAULT):
247247
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
248248
if not self._device_id in [_AS7341_DEVICE_ID]:
249249
raise RuntimeError("Failed to find an AS7341 sensor - check your wiring!")
250-
self.reset()
251250
self.initialize()
252251
self._buffer = bytearray(2)
253252
self._low_channels_configured = False
254253
self._high_channels_configured = False
255254
self._flicker_detection_1k_configured = False
256255

257256
def initialize(self):
258-
"""Configure the sensors with the default settings. For use after calling `reset()`"""
257+
"""Configure the sensors with the default settings"""
259258

260259
self._power_enabled = True
261260
self._led_control_enabled = True
262261
self.atime = 100
263262
self.astep = 999
264263
self.gain = Gain.GAIN_128X # pylint:disable=no-member
265264

266-
def reset(self):
267-
"""Resets the internal registers and restores the default settings"""
268-
269265
@property
270266
def all_channels(self):
271267
"""The current readings for all six ADC channels"""

0 commit comments

Comments
 (0)