Skip to content

Quick code fixes before updating build #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/example1_basic_lightning_spi.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def reduce_noise(value):
# warns that smartphone and smart watch displays, DC-DC converters, and/or
# anything that operates in 500 kHz range are noise sources to be avoided.
# The manufacturer's default value is 2 with a maximum value of 7.
value =+ 1
value += 1

if value > 7:
print('Noise floor is at the maximum value.')
Expand Down
4 changes: 2 additions & 2 deletions sparkfun_qwiicas3935.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ def _read_register(self, register):
raise ValueError("Register value must be in the range of 0x00 to 0x08")

with self._i2c as i2c:
i2c.write(bytes([0x00]), stop=False)
i2c.write(bytes([0x00]))
# Write to the base address, then read all data registers in a
# single block read. Then return the desired value from the list.
# Successive individual byte reads, tend to fail. This trick
Expand All @@ -575,7 +575,7 @@ def _read_byte(self, register):
# contains the lightning look-up tables and calibration registers.
# The read_register is more efficent for more frequent data registers.
with self._i2c as i2c:
i2c.write(bytes([0x00]), stop=False)
i2c.write(bytes([0x00]))
# Write to the base address, then read all data registers in a
# single block read. Then return the desired value from the list.
# Successive individual byte reads, tend to fail. This trick
Expand Down