Skip to content

Commit

Permalink
Update rf24.py
Browse files Browse the repository at this point in the history
corrected is_plus_variant check when setting data_rate
  • Loading branch information
bhartung authored May 5, 2021
1 parent 69c883e commit 3979243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion circuitpython_nrf24l01/rf24.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ def data_rate(self):
def data_rate(self, speed):
if not speed in (1, 2, 250):
raise ValueError("data_rate must be 1 (Mbps), 2 (Mbps), or 250 (kbps)")
if self.is_plus_variant and speed == 250:
if not self.is_plus_variant and speed == 250:
raise NotImplementedError(
"250 kbps data rate is not available for the non-plus "
"variants of the nRF24L01 transceivers."
Expand Down

0 comments on commit 3979243

Please sign in to comment.