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

luci-app-dawn: Fix getChannelFromFrequency for 6GHz #7523

Merged
merged 1 commit into from
Jan 5, 2025

Conversation

PIPIPIG233666
Copy link
Contributor

  • This PR is not from my main or master branch πŸ’©, but a separate branch βœ…
  • Each commit has a valid βœ’οΈ Signed-off-by: <my@email.address> row (via git commit --signoff)
  • Each commit and PR title has a valid πŸ“ <package name>: title first line subject for packages
  • Incremented πŸ†™ any PKG_VERSION in the Makefile
  • Tested on: (qualcommax, main, MS edge) βœ…
    - [ ] ( Preferred ) Mention: @ the original code author for feedback
  • ( Preferred ) Screenshot or mp4 of changes:
    image

- [ ] ( Optional ) Closes: e.g. openwrt/luci#issue-number
- [ ] ( Optional ) Depends on: e.g. openwrt/packages#pr-number in sister repo

  • Description: (describe the changes proposed in this PR)
    The calculation is as follows:
    (6GHz freq - 5950) / 5

i.e. (6135 - 5950) / 5 = 185 / 5 = 33

@systemcrash
Copy link
Contributor

Reformat your commit message to at least be mathematically correct.

The calculation is as follows:
(6GHz freq - 5950) / 5

i.e. (6135 - 5950) / 5 = 185 / 5 = 33

(6135 - 5950) / 5 β‰  185

6135 - 5950 = 185

185 / 5 = 37

Revise to:

For (5.9-)6GHz channels
Center Frequency = 5950 + ( 5 * channel_number )
or
( Center Frequency - 5950 ) / 5 = channel_number

e.g. 
( 1 * 5  ) + 5950 = 5955MHz
or
( 5955 - 5950 ) / 5 = Channel 1

@PIPIPIG233666
Copy link
Contributor Author

PIPIPIG233666 commented Jan 3, 2025

Reformat your commit message to at least be mathematically correct.

The calculation is as follows:
(6GHz freq - 5950) / 5

i.e. (6135 - 5950) / 5 = 185 / 5 = 33

(6135 - 5950) / 5 β‰  185

6135 - 5950 = 185

185 / 5 = 37

Revise to:

For (5.9-)6GHz channels
Center Frequency = 5950 + ( 5 * channel_number )
or
( Center Frequency - 5950 ) / 5 = channel_number

e.g. 
( 1 * 5  ) + 5950 = 5955MHz
or
( 5955 - 5950 ) / 5 = Channel 1

Okay 33 was a typo in the message, meant to type 37. The change itself is correct though.

(6135 - 5950) / 5 β‰  185

Also I meant (6135-5950) first to get 185 how is this not mathematically correct...

For (5.9-)6GHz channels
( Center Frequency - 5950 ) / 5 = channel_number

e.g. ( 5955 - 5950 ) / 5 = Channel 1

Signed-off-by: Weikai Kong <priv@pppig236.com>
@PIPIPIG233666
Copy link
Contributor Author

Done

@systemcrash systemcrash merged commit 15a8136 into openwrt:master Jan 5, 2025
4 checks passed
@systemcrash
Copy link
Contributor

Merged. Thanks @PIPIPIG233666

@PIPIPIG233666 PIPIPIG233666 deleted the dawn-6G-channel branch January 5, 2025 14:33
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