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

Fixed integer frequency to string, without using float #100

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tfuk
Copy link

@tfuk tfuk commented Oct 27, 2021

I was getting a invalid frequency over the json sent. This is due to using float to convert the Hz integer to Mhz string to be sent out. But floats, even double precision, aren't accurate and it is not necessary to use it when you already has the full information in the integer and only needs to do fixed point conversion, as the float conversion can lead to approximations and loose the accuracy. Before i wasn't able to connect to chirpstack network server, but now it works fine.

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.

1 participant