From 186ce6498442d1dc8fab93d27d8f0ec16145d413 Mon Sep 17 00:00:00 2001
From: tr
Date: Thu, 28 Dec 2023 22:48:00 +0100
Subject: [PATCH 1/2] Fix typo
---
LoRaRF/SX126x.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/LoRaRF/SX126x.py b/LoRaRF/SX126x.py
index 7fca7fc..1a8e5b3 100644
--- a/LoRaRF/SX126x.py
+++ b/LoRaRF/SX126x.py
@@ -1109,7 +1109,7 @@ def setRfFrequency(self, rfFreq: int) :
def setPacketType(self, packetType: int) :
self._writeBytes(0x8A, (packetType,), 1)
- def getPakcetType(self) -> int :
+ def getPacketType(self) -> int :
buf = self._readBytes(0x11, 2)
return buf[1]
@@ -1222,7 +1222,7 @@ def clearDeviceErrors(self) :
### SX126X API: WORKAROUND FUNCTIONS ###
def _fixLoRaBw500(self, bw: int) :
- packetType = self.getPakcetType()
+ packetType = self.getPacketType()
buf = self.readRegister(self.REG_TX_MODULATION, 1)
value = buf[0] | 0x04
if packetType == self.LORA_MODEM and bw == self.BW_500000 :
From 9a2dbd9c1b7407f8a24b452a4eca58190cd47622 Mon Sep 17 00:00:00 2001
From: tr
Date: Thu, 28 Dec 2023 22:47:38 +0100
Subject: [PATCH 2/2] Remove trailing whitespaces
---
LICENSE | 2 +-
LoRaRF/SX126x.py | 4 ++--
LoRaRF/SX127x.py | 4 ++--
examples/SX127x/driver_rx.py | 2 +-
examples/SX127x/driver_tx.py | 2 +-
pyproject.toml | 2 +-
setup.cfg | 2 +-
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/LICENSE b/LICENSE
index 20d269c..13bf6f6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
\ No newline at end of file
+SOFTWARE.
diff --git a/LoRaRF/SX126x.py b/LoRaRF/SX126x.py
index 1a8e5b3..5320941 100644
--- a/LoRaRF/SX126x.py
+++ b/LoRaRF/SX126x.py
@@ -229,7 +229,7 @@ class SX126x(BaseLoRa) :
POWER_SAVING_GAIN = 0x94 # power saving gain register value
BOOSTED_GAIN = 0x96 # boosted gain register value
- # TX and RX operation status
+ # TX and RX operation status
STATUS_DEFAULT = 0 # default status (false)
STATUS_TX_WAIT = 1
STATUS_TX_TIMEOUT = 2
@@ -1036,7 +1036,7 @@ def setRxTxFallbackMode(self, fallbackMode: int) :
def writeRegister(self, address: int, data: tuple, nData: int) :
buf = (
- (address >> 8) & 0xFF,
+ (address >> 8) & 0xFF,
address & 0xFF
) + tuple(data)
self._writeBytes(0x0D, buf, nData+2)
diff --git a/LoRaRF/SX127x.py b/LoRaRF/SX127x.py
index be96c6b..de229ec 100644
--- a/LoRaRF/SX127x.py
+++ b/LoRaRF/SX127x.py
@@ -251,7 +251,7 @@ def setCurrentProtection(self, current: int) :
self.writeRegister(self.REG_OCP, 0x20 | ocpTrim)
def setOscillator(self, option: int) :
-
+
cfg = self.OSC_CRYSTAL
if option == self.OSC_TCXO :
cfg = self.OSC_TCXO
@@ -354,7 +354,7 @@ def setSpreadingFactor(self, sf: int) :
# set appropriate signal detection optimize and threshold
optimize = 0x03
threshold = 0x0A
- if sf == 6 :
+ if sf == 6 :
optimize = 0x05
threshold = 0x0C
self.writeRegister(self.REG_DETECTION_OPTIMIZE, optimize)
diff --git a/examples/SX127x/driver_rx.py b/examples/SX127x/driver_rx.py
index 399802d..719cee1 100644
--- a/examples/SX127x/driver_rx.py
+++ b/examples/SX127x/driver_rx.py
@@ -104,7 +104,7 @@ def settingFunction() :
print("Set syncWord to 0x{:02X}".format(reg))
def receiveFunction(message: list) :
-
+
print("\n-- RECEIVE FUNCTION --")
# Activate interrupt when transmit done on DIO0
diff --git a/examples/SX127x/driver_tx.py b/examples/SX127x/driver_tx.py
index f1ccbef..3998257 100644
--- a/examples/SX127x/driver_tx.py
+++ b/examples/SX127x/driver_tx.py
@@ -102,7 +102,7 @@ def settingFunction() :
print("Set syncWord to 0x{:02X}".format(reg))
def transmitFunction(message: list) :
-
+
print("\n-- TRANSMIT FUNCTION --")
# Configure FIFO address and address pointer for TX operation
diff --git a/pyproject.toml b/pyproject.toml
index b5a3c46..374b58c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,4 +3,4 @@ requires = [
"setuptools>=42",
"wheel"
]
-build-backend = "setuptools.build_meta"
\ No newline at end of file
+build-backend = "setuptools.build_meta"
diff --git a/setup.cfg b/setup.cfg
index 6005098..8165e25 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -19,7 +19,7 @@ classifiers =
[options]
include_package_data = True
-packages =
+packages =
LoRaRF
python_requires = >=2.7
install_requires =