Merged
Conversation
Member
|
@dwarburt Thanks for the PR. Can you also help a test for this scenario? |
soleary080679
pushed a commit
to soleary080679/ip-num
that referenced
this pull request
May 7, 2024
Update IPRange.ts
Crsarmv7l patch 1 (#150)
* Fix bug
With the original bw = 1000.0*24 / (8.0*(4+chanbw_m) * pow(2,chanbw_e))
chanbw_m and chanbw_e both have a range from 0 to 3 inclusive, using those values you would get a bw of the following with 0 values resulting in the highest bw (division).
750.0
300.0
125.0
53.57142857142857
Given these bw values, the subsequent if statements will never be true. Additionally this same equation with a different (correct) multiplier for mhz is used in getMdmChanBW
* fix def calculateMdmDeviatn
old_div is doing something funky here.
When extracting and running just this function and printing deviatn, all baud that *should* fall in these are zero.
elif baud <= 38400:
deviatn = 20000 * (old_div((baud-2400),36000))
else:
deviatn = 129000 * (old_div((baud-38400),211600))
by changing it to normal division it returns much more reasonable results
* Fix calculatePktChanBW
The comments in this function state this:
''' calculates the optimal ChanBW setting for the current freq/baud
* totally experimental *
from Smart RF Studio:
1.2 kbaud BW: 63khz
2.4 kbaud BW: 63khz
38.4kbaud BW: 94khz
250 kbaud BW: 600khz
'''
The 1.2kbaud listed 63khz, yet the table of possibles includes 53e3. Not that big a difference, but when passing 53e3 to setMdmChanBW, it always triggers an exception in that function.
Removing 53e3 from the table is in line with the comments and prevents triggering the exception in setMdmChanBW
* Update chipcon_nic.py
Initial Commit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Address #93