Skip to content

Commit

Permalink
buf fix: each stepper motor references the same info list
Browse files Browse the repository at this point in the history
  • Loading branch information
MrYsLab committed Mar 25, 2024
1 parent 2795e05 commit d022fc4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 7 deletions.
36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages]
find = {} # Scan the project directory with the default parameters

[project]
name = "telemetrix-rpi-pico-w"
version = "1.01"
authors = [
{ name="Alan Yorinks", email="MisterYsLab@gmail.com" },
]
description = "Telemetrix Client For the Raspberry Pi Pico-W"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "AGPL-3.0-or-later"}

keywords=['telemetrix', 'Raspberry Pi', 'Pico', 'Pico-w66', 'Python']
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Other Environment',
'Intended Audience :: Developers',
'Intended Audience :: Education',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules'
]

dependencies = [
"pyserial"
]





2 changes: 1 addition & 1 deletion telemetrix_rpi_pico_w/private_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class PrivateConstants:

DEBUG_PRINT = 99

TELEMETRIX_VERSION = "1.0"
TELEMETRIX_VERSION = "1.01"

# reporting control
REPORTING_DISABLE_ALL = 0
Expand Down
2 changes: 1 addition & 1 deletion telemetrix_rpi_pico_w/telemetrix_rpi_pico_w.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def __init__(self, ip_address=None,
self.stepper_info_list = []
# a list of dictionaries to hold stepper information
for motor in range(self.max_number_of_steppers):
self.stepper_info_list.append(self.stepper_info)
self.stepper_info_list.append(self.stepper_info.copy())

self.the_reporter_thread.start()
self.the_data_receive_thread.start()
Expand Down
2 changes: 1 addition & 1 deletion telemetrix_rpi_pico_w_aio/private_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class PrivateConstants:

DEBUG_PRINT = 99

TELEMETRIX_VERSION = "1.0"
TELEMETRIX_VERSION = "1.01"

# reporting control
REPORTING_DISABLE_ALL = 0
Expand Down
8 changes: 4 additions & 4 deletions telemetrix_rpi_pico_w_aio/telemetrix_rpi_pico_w_aio.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def __init__(self, ip_address=None,
self.stepper_info_list = []
# a list of dictionaries to hold stepper information
for motor in range(self.max_number_of_steppers):
self.stepper_info_list.append(self.stepper_info)
self.stepper_info_list.append(self.stepper_info.copy())

# self.the_reporter_thread.start()
# self.the_data_receive_thread.start()
Expand Down Expand Up @@ -552,7 +552,7 @@ async def i2c_write(self, address, args, i2c_port=0):
raise RuntimeError(
'I2C Write: set_pin_mode i2c never called for i2c port 2.')

if type(args) != list:
if type(args) is not list:
raise RuntimeError('args must be in the form of a list')

command = [PrivateConstants.I2C_WRITE, i2c_port, address, len(args)]
Expand Down Expand Up @@ -700,7 +700,7 @@ async def get_cpu_temperature(self, threshold=1.0, polling_interval=1000,
callback=None):
"""
Request the CPU temperature. This will continuously monitor the temperature
and report it back in degrees celsius. Call only once, unless you wish to
and report it back in degrees Celsius. Call only once, unless you wish to
modify the polling interval.
:param threshold: The threshold value is used to determine when a
Expand Down Expand Up @@ -938,7 +938,7 @@ async def set_pin_mode_dht(self, pin, callback=None):
callback returns a data list:
DHT REPORT, DHT_DATA=1, PIN, Humidity, Temperature (c),Time]
[DHT REPORT, DHT_DATA=1, PIN, Humidity, Temperature (c),Time]
DHT_REPORT = 12
Expand Down

0 comments on commit d022fc4

Please sign in to comment.