Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

[Question] Setting radioToUse #5

Open
jpdias opened this issue Dec 7, 2020 · 4 comments
Open

[Question] Setting radioToUse #5

jpdias opened this issue Dec 7, 2020 · 4 comments

Comments

@jpdias
Copy link

jpdias commented Dec 7, 2020

Hello. I'm trying to use the out-of-the-box modules provided by RFQuack, but I can't manage to change the default radio to another one.

As an example, I have connected two radios (radioA, which is a CC1101 and radioB, which is an NRF24). As I want to use the radioB (1), and the default is the radioA (0), how can I change them?

After going trough the documentation and code, I couldn't find a way of passing a value of the type "rfquack_WhichRadioValue" by using the CLI. I hope that the attached image helps understand the situation.

image

Thanks!

@FiorixF1
Copy link
Contributor

FiorixF1 commented Dec 7, 2020

Hi,

This should work

wr = pb.__dict__["WhichRadioValue"]()
wr.value = 1   # 0 for RadioA, 1 for RadioB ...
q.roll_jam.listen_radio = wr

@jpdias
Copy link
Author

jpdias commented Dec 7, 2020

Hey @FiorixF1,

It really did work! But shouldn't there be any kind of macros for setting the radios?

Thanks!

@phretor
Copy link
Contributor

phretor commented Jan 31, 2021

@jpdias yes, having a macro could be useful. Unfortunately we don't have much time to dedicate to this project, so we're hoping that someone with a big ❤️ will do it, eventually 😄

@phretor
Copy link
Contributor

phretor commented Jan 31, 2021

Leaving this open as a reminder to implement a shortcut function.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants