the-hive-lab / pydwm1001 Goto Github PK
View Code? Open in Web Editor NEWA Python library for interfacing with the Qorvo (formerly Decawave) DWM1001.
License: MIT License
A Python library for interfacing with the Qorvo (formerly Decawave) DWM1001.
License: MIT License
There is a generic function to sending shell commands, so it makes sense to have a similar feature for getting shell responses. It could be named something like get_shell_response(...)
.
The Tag
class's implementation is old and fragile compared to the Listener
's. It should be updated to use the more robust method defined in the UartDwm1001
base class.
The version 0.1.0
has been overloaded through various commits and is no longer unique. The version number should be bumped to 0.1.1
.
It seems that "listener" is an informal name for passive tags, while "tags" typically refer to active tags. The Listener
and Tag
classes should be renamed to PassiveTag
and ActiveTag
, respectively, to make their intended uses clearer.
The library's packaging documentation claims to support Python versions starting at 3.7, but it uses some functions that were introduced in later versions. For example, removeprefix
was introduced in Python 3.9. The library's packaging documentation should be updated.
The removeprefix
function was added to Python 3.9, but some downstream library users need to run in Python 3.8. Therefore, we need to replace the function with a different implementation.
From the system information response, it appears that the tag_name
property actually represents its label. Therefore, the property should be renamed to label
.
This may be a pedantic change given "name" and "label" are synonymous is many applications, but it's a good practice to keep the library's naming conventions consistent with the actual device's.
Since the function is a query, its name should use a is_
, has_
, should_
, etc. prefix. This is a minor, and somewhat pedantic, attempt to unify naming conventions.
Right now, only the ActiveTag
has a tag_id
property. However, passive and active tags both have identifiers. Moving this function to the base class would allow PassiveTag
instances to get their identifiers, even if they are unused.
There are two ways to identify a DWM1001: its "name" and its ID. The name uses part of the tag's full identifier. An example would be DW1234
. The ID is the unique identification number used within the network. For example, 987654301234
. In this case, the tag's name is the last four digits (1234
) with DW
prepended to it: DW1234
.
The current tag_id
property should be refactored to use the tag's actual identifying number, and a new name
property should be added for the short-hand string.
Both ActiveTag
and PassiveTag
classes use the same implementations for start_position_reporting
and stop_position_reporting
, so those function should be moved to the base class.
There are several ways the parsing can break, so each method should have a specific exception message associated with it. Right now, all exceptions have the same message.
The pydwm1001
installation configuration does not install pyserial
, which leads to import errors for environments that do not already have it installed.
This property is redundant because it device's UWB address is already contained in the SystemInfo
object returned by the system_info
property.
The current Listener
implementation works fine for a mocked DWM1001, but it does not work with a real one due to timing issues. This class should be made more robust.
The Listener
class does not properly parse the quality measure field from the message string. It converts it to a float
when it should be an int
.
From the system information reported by the DWM1001, it appears that they tag_id
property actually represents the device's ultra-wideband address. Therefore, it should be renamed to uwb_address
to describe the value more accurately.
Listeners (anchors in passive mode) and tags are the two most used DWM1001 types, so the library should support these easily. Our current use-case for these devices is getting position information.
In the listener's case, we want to get all reported positions from tags. In the tag's case, we want to get its own position.
All DWM1001 tags have an identifier, and users ideally want to use the IDs to distinguish between different tags.
It would be nice to have a usage example so newcomers could see how to use the library.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.