Skip to content
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

Error in class Transmission Power. #1

Closed
Dreamerandhardworker opened this issue Jun 17, 2024 · 2 comments
Closed

Error in class Transmission Power. #1

Dreamerandhardworker opened this issue Jun 17, 2024 · 2 comments

Comments

@Dreamerandhardworker
Copy link

Error in class Transmission Power. In def get_transmission_power(self), we will always get into if self.transmission_power == self.transmission_power. That is, there will always be Transmission Power 22. Yes?

@Engino00
Copy link

Engino00 commented Jun 26, 2024

@Dreamerandhardworker
Yes I also found this issue.
I solve it with:

#file lora_e220_constants.py - from line 303
def get_transmission_power(self):
        if self.transmission_power == 22:
            return TransmissionPower22
        elif self.transmission_power == 30:
            return TransmissionPower30
        else:
            return "Invalid transmission power param"

Also, remember that when using the commands to directly set the transmission power:
configuration_to_set.OPTION.transmissionPower = TransmissionPower22.POWER_xy
or
configuration_to_set.OPTION.transmissionPower = TransmissionPower30.POWER_xy

you should import the respective class using:
from lora_e220_constants import TransmissionPower22, TransmissionPower30

@xreef
Copy link
Owner

xreef commented Jul 16, 2024

Hi,
thanks to all, I fixed It.
Bye Renzo

@xreef xreef closed this as completed Jul 16, 2024
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

No branches or pull requests

3 participants