Skip to content

lib/cmwx1: Add CMWX1ZZABZ-093 driver. #7

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
Mar 15, 2024
Merged

Conversation

iabdalkader
Copy link
Collaborator

No description provided.

@iabdalkader iabdalkader requested a review from sebromero March 15, 2024 07:30
@iabdalkader iabdalkader force-pushed the add_cmwx1_driver branch 2 times, most recently from 394e906 to 3d504ca Compare March 15, 2024 07:47
Copy link
Collaborator

@sebromero sebromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we also get rid of the pyb and utime imports and use the new ones from machine and time?

@iabdalkader iabdalkader force-pushed the add_cmwx1_driver branch 6 times, most recently from 3f50926 to a2d93f3 Compare March 15, 2024 09:03
@iabdalkader
Copy link
Collaborator Author

iabdalkader commented Mar 15, 2024

Shall we also get rid of the pyb and utime imports and use the new ones from machine and time?

Done, all other comments fixed too. Note we can't use __init__.py here due to how this will be frozen, but it doesn't change how it's used, i.e., you can from cmwx1 import * or import individual names, and constants are under Lora.*.

The only change needed in the OpenMV example is:

from cmwx1 import *
lora = Lora(band=Lora.BAND_EU868, poll_ms=60000, debug=False)
``

Copy link
Collaborator

@sebromero sebromero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we use the None pattern instead of hardcoding the band constant in the init function.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
@iabdalkader iabdalkader merged commit 277efd5 into main Mar 15, 2024
@iabdalkader iabdalkader deleted the add_cmwx1_driver branch March 15, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants