Skip to content

Commit a962728

Browse files
add wifi7 320Mhz support (#511)
* add wifi7 320Mhz support * fix unit test * correct unit test data for new 6Hz navigation tab * fix 6GHz navigation tab, change last channel to 229 * fix unit test for 320Mhz pr --------- Co-authored-by: VREM Software Development <vremsoftwaredevelopment@gmail.com>
1 parent 12c7c64 commit a962728

10 files changed

Lines changed: 77 additions & 66 deletions

File tree

app/src/main/kotlin/com/vrem/wifianalyzer/wifi/band/WiFiChannelsGHZ6.kt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,13 @@ class WiFiChannelsGHZ6 : WiFiChannels(RANGE, SETS) {
3636
if (inRange(frequency)) wiFiChannel(frequency, wiFiChannelPair) else WiFiChannel.UNKNOWN
3737

3838
companion object {
39-
val SET1 = WiFiChannelPair(WiFiChannel(1, 5955), WiFiChannel(29, 6095))
40-
val SET2 = WiFiChannelPair(WiFiChannel(33, 6115), WiFiChannel(61, 6255))
41-
val SET3 = WiFiChannelPair(WiFiChannel(65, 6275), WiFiChannel(93, 6415))
42-
val SET4 = WiFiChannelPair(WiFiChannel(97, 6435), WiFiChannel(125, 6575))
43-
val SET5 = WiFiChannelPair(WiFiChannel(129, 6595), WiFiChannel(157, 6735))
44-
val SET6 = WiFiChannelPair(WiFiChannel(161, 6755), WiFiChannel(189, 6895))
45-
val SET7 = WiFiChannelPair(WiFiChannel(193, 6915), WiFiChannel(229, 7095))
46-
val SETS = listOf(SET1, SET2, SET3, SET4, SET5, SET6, SET7)
39+
val SET1 = WiFiChannelPair(WiFiChannel(1, 5955), WiFiChannel(65, 6275))
40+
val SET2 = WiFiChannelPair(WiFiChannel(33, 6115), WiFiChannel(97, 6435))
41+
val SET3 = WiFiChannelPair(WiFiChannel(65, 6275), WiFiChannel(129, 6595))
42+
val SET4 = WiFiChannelPair(WiFiChannel(97, 6435), WiFiChannel(161, 6755))
43+
val SET5 = WiFiChannelPair(WiFiChannel(129, 6595), WiFiChannel(189, 6895))
44+
val SET6 = WiFiChannelPair(WiFiChannel(161, 6755), WiFiChannel(229, 7095))
45+
val SETS = listOf(SET1, SET2, SET3, SET4, SET5, SET6)
4746
private val RANGE = WiFiRange(5925, 7125)
4847
}
4948
}

app/src/main/kotlin/com/vrem/wifianalyzer/wifi/channelgraph/ChannelGraphNavigation.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ internal val navigationGHZ6Lines = mapOf(
5454
R.id.graphNavigationLine2 to mapOf(
5555
R.id.graphNavigationSet4 to WiFiChannelsGHZ6.SET4,
5656
R.id.graphNavigationSet5 to WiFiChannelsGHZ6.SET5,
57-
R.id.graphNavigationSet6 to WiFiChannelsGHZ6.SET6,
58-
R.id.graphNavigationSet7 to WiFiChannelsGHZ6.SET7
57+
R.id.graphNavigationSet6 to WiFiChannelsGHZ6.SET6
5958
)
6059
)
6160

app/src/main/kotlin/com/vrem/wifianalyzer/wifi/channelgraph/ChannelGraphView.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,15 @@ internal fun makeGraphView(
5353
wiFiChannelPair: WiFiChannelPair
5454
): GraphView {
5555
val resources = mainContext.resources
56-
return GraphViewBuilder(wiFiChannelPair.numX(), graphMaximumY, themeStyle, true)
56+
val gridView = GraphViewBuilder(wiFiChannelPair.numX(), graphMaximumY, themeStyle, true)
5757
.setLabelFormatter(ChannelAxisLabel(wiFiBand, wiFiChannelPair))
5858
.setVerticalTitle(resources.getString(R.string.graph_axis_y))
5959
.setHorizontalTitle(resources.getString(R.string.graph_channel_axis_x))
6060
.build(mainContext.context)
61+
if(wiFiBand.ghz6) {
62+
gridView.gridLabelRenderer.setHorizontalLabelsAngle(45)
63+
}
64+
return gridView;
6165
}
6266

6367
internal fun makeDefaultSeries(frequencyEnd: Int, minX: Int): TitleLineGraphSeries<GraphDataPoint> {

app/src/main/kotlin/com/vrem/wifianalyzer/wifi/model/WiFiWidth.kt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ import kotlin.math.abs
2222

2323
typealias ChannelWidth = Int
2424

25-
typealias CalculateCenter = (primary: Int, center: Int) -> Int
25+
typealias CalculateCenter = (primary: Int, center: Int, center1: Int) -> Int
2626

27-
internal val calculateCenter20: CalculateCenter = { primary, _ -> primary }
27+
internal val calculateCenter20: CalculateCenter = { primary, _ ,_ -> primary }
2828

29-
internal val calculateCenter40: CalculateCenter = { primary, center ->
29+
internal val calculateCenter40: CalculateCenter = { primary, center, _ ->
3030
if (abs(primary - center) >= WiFiWidth.MHZ_40.frequencyWidthHalf) {
3131
(primary + center) / 2
3232
} else {
3333
center
3434
}
3535
}
3636

37-
internal val calculateCenter80: CalculateCenter = { _, center -> center }
37+
internal val calculateCenter80: CalculateCenter = { _, center, _ -> center }
3838

39-
internal val calculateCenter160: CalculateCenter = { primary, center ->
39+
internal val calculateCenter160: CalculateCenter = { primary, center, _ ->
4040
when (primary) {
4141
// 5GHz
4242
in 5170..5330 -> 5250
@@ -53,13 +53,15 @@ internal val calculateCenter160: CalculateCenter = { primary, center ->
5353
else -> center
5454
}
5555
}
56+
internal val calculateCenter320: CalculateCenter = { _, _, center1 ->center1 }
5657

5758
enum class WiFiWidth(val channelWidth: ChannelWidth, val frequencyWidth: Int, val guardBand: Int, val calculateCenter: CalculateCenter) {
5859
MHZ_20(ScanResult.CHANNEL_WIDTH_20MHZ, 20, 2, calculateCenter20),
5960
MHZ_40(ScanResult.CHANNEL_WIDTH_40MHZ, 40, 3, calculateCenter40),
6061
MHZ_80(ScanResult.CHANNEL_WIDTH_80MHZ, 80, 3, calculateCenter80),
6162
MHZ_160(ScanResult.CHANNEL_WIDTH_160MHZ, 160, 3, calculateCenter160),
62-
MHZ_80_PLUS(ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ, 80, 3, calculateCenter80);
63+
MHZ_80_PLUS(ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ, 80, 3, calculateCenter80),
64+
MHZ_320(ScanResult.CHANNEL_WIDTH_320MHZ, 320, 3, calculateCenter320);
6365

6466
val frequencyWidthHalf: Int = frequencyWidth / 2
6567

app/src/main/kotlin/com/vrem/wifianalyzer/wifi/scanner/Transformer.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ internal class Transformer(private val cache: Cache) {
6060

6161
private fun transform(cacheResult: CacheResult): WiFiDetail {
6262
val scanResult = cacheResult.scanResult
63+
6364
val wiFiWidth = WiFiWidth.findOne(scanResult.channelWidth)
64-
val centerFrequency = wiFiWidth.calculateCenter(scanResult.frequency, scanResult.centerFreq0)
65+
val centerFrequency = wiFiWidth.calculateCenter(scanResult.frequency, scanResult.centerFreq0, scanResult.centerFreq1)
6566
val mc80211 = scanResult.is80211mcResponder
6667
val wiFiStandard = WiFiStandard.findOne(scanResult)
6768
val fastRoaming = FastRoaming.find(scanResult)

app/src/main/res/layout/graph_content.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,6 @@
123123
android:minHeight="0dp"
124124
tools:text="600-699" />
125125

126-
<Button
127-
style="?android:attr/buttonBarButtonStyle"
128-
android:id="@+id/graphNavigationSet7"
129-
android:layout_width="wrap_content"
130-
android:layout_height="wrap_content"
131-
android:layout_marginStart="@dimen/activity_vertical_half_margin"
132-
android:layout_weight="1"
133-
android:background="@null"
134-
android:minWidth="0dp"
135-
android:minHeight="0dp"
136-
tools:text="700-799" />
137126
</LinearLayout>
138127
</LinearLayout>
139128

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/band/WiFiChannelsGHZ6Test.kt

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ class WiFiChannelsGHZ6Test {
5050
@Test
5151
fun wiFiChannelByFrequencyNotFound() {
5252
assertThat(fixture.wiFiChannelByFrequency(5952)).isEqualTo(WiFiChannel.UNKNOWN)
53-
assertThat(fixture.wiFiChannelByFrequency(6418)).isEqualTo(WiFiChannel.UNKNOWN)
53+
assertThat(fixture.wiFiChannelByFrequency(7098)).isEqualTo(WiFiChannel.UNKNOWN)
5454
}
5555

5656
@Test
5757
fun wiFiChannelByChannel() {
5858
assertThat(fixture.wiFiChannelByChannel(1).frequency).isEqualTo(5955)
59-
assertThat(fixture.wiFiChannelByChannel(93).frequency).isEqualTo(6415)
59+
assertThat(fixture.wiFiChannelByChannel(97).frequency).isEqualTo(6435)
6060
}
6161

6262
@Test
6363
fun wiFiChannelByChannelNotFound() {
6464
assertThat(fixture.wiFiChannelByChannel(0)).isEqualTo(WiFiChannel.UNKNOWN)
65-
assertThat(fixture.wiFiChannelByChannel(94)).isEqualTo(WiFiChannel.UNKNOWN)
65+
assertThat(fixture.wiFiChannelByChannel(230)).isEqualTo(WiFiChannel.UNKNOWN)
6666
}
6767

6868
@Test
@@ -77,22 +77,21 @@ class WiFiChannelsGHZ6Test {
7777

7878
@Test
7979
fun wiFiChannelPair() {
80-
validatePair(1, 29, fixture.wiFiChannelPairFirst(Locale.US.country))
81-
validatePair(1, 29, fixture.wiFiChannelPairFirst(String.EMPTY))
82-
validatePair(1, 29, fixture.wiFiChannelPairFirst("XYZ"))
80+
validatePair(1, 65, fixture.wiFiChannelPairFirst(Locale.US.country))
81+
validatePair(1, 65, fixture.wiFiChannelPairFirst(String.EMPTY))
82+
validatePair(1, 65, fixture.wiFiChannelPairFirst("XYZ"))
8383
}
8484

8585
@Test
8686
fun wiFiChannelPairs() {
8787
val wiFiChannelPairs: List<WiFiChannelPair> = fixture.wiFiChannelPairs()
88-
assertThat(wiFiChannelPairs).hasSize(7)
89-
validatePair(1, 29, wiFiChannelPairs[0])
90-
validatePair(33, 61, wiFiChannelPairs[1])
91-
validatePair(65, 93, wiFiChannelPairs[2])
92-
validatePair(97, 125, wiFiChannelPairs[3])
93-
validatePair(129, 157, wiFiChannelPairs[4])
94-
validatePair(161, 189, wiFiChannelPairs[5])
95-
validatePair(193, 229, wiFiChannelPairs[6])
88+
assertThat(wiFiChannelPairs).hasSize(6)
89+
validatePair(1, 65, wiFiChannelPairs[0])
90+
validatePair(33, 97, wiFiChannelPairs[1])
91+
validatePair(65, 129, wiFiChannelPairs[2])
92+
validatePair(97, 161, wiFiChannelPairs[3])
93+
validatePair(129, 189, wiFiChannelPairs[4])
94+
validatePair(161, 229, wiFiChannelPairs[5])
9695
}
9796

9897
private fun validatePair(expectedFirst: Int, expectedSecond: Int, pair: WiFiChannelPair) {

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/channelgraph/ChannelGraphNavigationTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,10 @@ class ChannelGraphNavigationTest {
153153
@Test
154154
fun navigationGHZ6Line2() {
155155
val line2 = navigationGHZ6Lines[R.id.graphNavigationLine2]!!
156-
assertThat(line2).hasSize(4)
156+
assertThat(line2).hasSize(3)
157157
assertThat(WiFiChannelsGHZ6.SET4).isEqualTo(line2[R.id.graphNavigationSet4])
158158
assertThat(WiFiChannelsGHZ6.SET5).isEqualTo(line2[R.id.graphNavigationSet5])
159159
assertThat(WiFiChannelsGHZ6.SET6).isEqualTo(line2[R.id.graphNavigationSet6])
160-
assertThat(WiFiChannelsGHZ6.SET7).isEqualTo(line2[R.id.graphNavigationSet7])
161160
}
162161

163162
private fun whenLines(navigationLines: NavigationLines) {

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/model/WiFiWidthTest.kt

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class WiFiWidthTest {
2626

2727
@Test
2828
fun width() {
29-
assertThat(WiFiWidth.entries.size).isEqualTo(5)
29+
assertThat(WiFiWidth.entries.size).isEqualTo(6)
3030
}
3131

3232
@Test
@@ -36,6 +36,7 @@ class WiFiWidthTest {
3636
assertThat(WiFiWidth.MHZ_80.calculateCenter.javaClass.isInstance(calculateCenter80)).isTrue()
3737
assertThat(WiFiWidth.MHZ_160.calculateCenter.javaClass.isInstance(calculateCenter160)).isTrue()
3838
assertThat(WiFiWidth.MHZ_80_PLUS.calculateCenter.javaClass.isInstance(calculateCenter80)).isTrue()
39+
assertThat(WiFiWidth.MHZ_320.calculateCenter.javaClass.isInstance(calculateCenter320)).isTrue()
3940
}
4041

4142
@Test
@@ -45,6 +46,7 @@ class WiFiWidthTest {
4546
assertThat(WiFiWidth.MHZ_80.frequencyWidth).isEqualTo(80)
4647
assertThat(WiFiWidth.MHZ_160.frequencyWidth).isEqualTo(160)
4748
assertThat(WiFiWidth.MHZ_80_PLUS.frequencyWidth).isEqualTo(80)
49+
assertThat(WiFiWidth.MHZ_320.frequencyWidth).isEqualTo(320)
4850
}
4951

5052
@Test
@@ -54,6 +56,7 @@ class WiFiWidthTest {
5456
assertThat(WiFiWidth.MHZ_80.frequencyWidthHalf).isEqualTo(40)
5557
assertThat(WiFiWidth.MHZ_160.frequencyWidthHalf).isEqualTo(80)
5658
assertThat(WiFiWidth.MHZ_80_PLUS.frequencyWidthHalf).isEqualTo(40)
59+
assertThat(WiFiWidth.MHZ_320.frequencyWidthHalf).isEqualTo(160)
5760
}
5861

5962
@Test
@@ -63,6 +66,7 @@ class WiFiWidthTest {
6366
assertThat(WiFiWidth.MHZ_80.guardBand).isEqualTo(3)
6467
assertThat(WiFiWidth.MHZ_160.guardBand).isEqualTo(3)
6568
assertThat(WiFiWidth.MHZ_80_PLUS.guardBand).isEqualTo(3)
69+
assertThat(WiFiWidth.MHZ_320.guardBand).isEqualTo(3)
6670
}
6771

6872
@Test
@@ -71,19 +75,20 @@ class WiFiWidthTest {
7175
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_40MHZ)).isEqualTo(WiFiWidth.MHZ_40)
7276
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_80MHZ)).isEqualTo(WiFiWidth.MHZ_80)
7377
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_160MHZ)).isEqualTo(WiFiWidth.MHZ_160)
78+
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_320MHZ)).isEqualTo(WiFiWidth.MHZ_320)
7479
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ)).isEqualTo(WiFiWidth.MHZ_80_PLUS)
7580
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_20MHZ - 1)).isEqualTo(WiFiWidth.MHZ_20)
76-
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_80MHZ_PLUS_MHZ + 1)).isEqualTo(WiFiWidth.MHZ_20)
81+
assertThat(WiFiWidth.findOne(ScanResult.CHANNEL_WIDTH_320MHZ + 1)).isEqualTo(WiFiWidth.MHZ_20)
7782
}
7883

7984
@Test
8085
fun calculateCenter20() {
8186
// setup
8287
val expected = 35
8388
// execute & validate
84-
assertThat(calculateCenter20(expected, Int.MIN_VALUE)).isEqualTo(expected)
85-
assertThat(calculateCenter20(expected, 0)).isEqualTo(expected)
86-
assertThat(calculateCenter20(expected, Int.MAX_VALUE)).isEqualTo(expected)
89+
assertThat(calculateCenter20(expected, Int.MIN_VALUE,Int.MIN_VALUE)).isEqualTo(expected)
90+
assertThat(calculateCenter20(expected, 0,Int.MIN_VALUE)).isEqualTo(expected)
91+
assertThat(calculateCenter20(expected, Int.MAX_VALUE,Int.MIN_VALUE)).isEqualTo(expected)
8792
}
8893

8994
@Test
@@ -92,8 +97,8 @@ class WiFiWidthTest {
9297
val primary = 10
9398
val center = primary + WiFiWidth.MHZ_40.frequencyWidthHalf - 1
9499
// execute & validate
95-
assertThat(calculateCenter40(primary, center)).isEqualTo(center)
96-
assertThat(calculateCenter40(center, primary)).isEqualTo(primary)
100+
assertThat(calculateCenter40(primary, center,Int.MIN_VALUE)).isEqualTo(center)
101+
assertThat(calculateCenter40(center, primary,Int.MIN_VALUE)).isEqualTo(primary)
97102
}
98103

99104
@Test
@@ -103,29 +108,29 @@ class WiFiWidthTest {
103108
val center = primary + WiFiWidth.MHZ_40.frequencyWidthHalf
104109
val expected = (primary + center) / 2
105110
// execute & validate
106-
assertThat(calculateCenter40(primary, center)).isEqualTo(expected)
107-
assertThat(calculateCenter40(center, primary)).isEqualTo(expected)
111+
assertThat(calculateCenter40(primary, center,Int.MIN_VALUE)).isEqualTo(expected)
112+
assertThat(calculateCenter40(center, primary,Int.MIN_VALUE)).isEqualTo(expected)
108113
}
109114

110115
@Test
111116
fun calculateCenter80() {
112117
// setup
113118
val expected = 35
114119
// execute & validate
115-
assertThat(calculateCenter80(Int.MIN_VALUE, expected)).isEqualTo(expected)
116-
assertThat(calculateCenter80(0, expected)).isEqualTo(expected)
117-
assertThat(calculateCenter80(Int.MAX_VALUE, expected)).isEqualTo(expected)
120+
assertThat(calculateCenter80(Int.MIN_VALUE, expected,Int.MIN_VALUE)).isEqualTo(expected)
121+
assertThat(calculateCenter80(0, expected,Int.MIN_VALUE)).isEqualTo(expected)
122+
assertThat(calculateCenter80(Int.MAX_VALUE, expected,Int.MIN_VALUE)).isEqualTo(expected)
118123
}
119124

120125
@Test
121126
fun calculateCenter160Invalid() {
122127
// execute & validate
123-
assertThat(calculateCenter160(5169, Int.MIN_VALUE)).isEqualTo(Int.MIN_VALUE)
124-
assertThat(calculateCenter160(5169, 0)).isEqualTo(0)
125-
assertThat(calculateCenter160(5169, Int.MAX_VALUE)).isEqualTo(Int.MAX_VALUE)
126-
assertThat(calculateCenter160(5896, Int.MIN_VALUE)).isEqualTo(Int.MIN_VALUE)
127-
assertThat(calculateCenter160(5896, 0)).isEqualTo(0)
128-
assertThat(calculateCenter160(5896, Int.MAX_VALUE)).isEqualTo(Int.MAX_VALUE)
128+
assertThat(calculateCenter160(5169, Int.MIN_VALUE,Int.MIN_VALUE)).isEqualTo(Int.MIN_VALUE)
129+
assertThat(calculateCenter160(5169, 0,Int.MIN_VALUE)).isEqualTo(0)
130+
assertThat(calculateCenter160(5169, Int.MAX_VALUE,Int.MIN_VALUE)).isEqualTo(Int.MAX_VALUE)
131+
assertThat(calculateCenter160(5896, Int.MIN_VALUE,Int.MIN_VALUE)).isEqualTo(Int.MIN_VALUE)
132+
assertThat(calculateCenter160(5896, 0,Int.MIN_VALUE)).isEqualTo(0)
133+
assertThat(calculateCenter160(5896, Int.MAX_VALUE,Int.MIN_VALUE)).isEqualTo(Int.MAX_VALUE)
129134
}
130135

131136
@Test
@@ -136,12 +141,21 @@ class WiFiWidthTest {
136141
}
137142
}
138143

144+
@Test
145+
fun calculateCenter320(){
146+
// setup
147+
val expected = 35
148+
// execute & validate
149+
assertThat(calculateCenter320(Int.MIN_VALUE,Int.MIN_VALUE, expected)).isEqualTo(expected)
150+
assertThat(calculateCenter320(0,Int.MIN_VALUE, expected)).isEqualTo(expected)
151+
assertThat(calculateCenter320(Int.MAX_VALUE,Int.MIN_VALUE, expected)).isEqualTo(expected)
152+
}
139153
private fun validate(expected: Int, start: Int, end: Int) {
140154
// execute & validate
141155
for (value in start..end) {
142-
assertThat(calculateCenter160(value, Int.MIN_VALUE)).isEqualTo(expected)
143-
assertThat(calculateCenter160(value, 0)).isEqualTo(expected)
144-
assertThat(calculateCenter160(value, Int.MAX_VALUE)).isEqualTo(expected)
156+
assertThat(calculateCenter160(value, Int.MIN_VALUE,Int.MIN_VALUE)).isEqualTo(expected)
157+
assertThat(calculateCenter160(value, 0,Int.MIN_VALUE)).isEqualTo(expected)
158+
assertThat(calculateCenter160(value, Int.MAX_VALUE,Int.MIN_VALUE)).isEqualTo(expected)
145159
}
146160
}
147161

app/src/test/kotlin/com/vrem/wifianalyzer/wifi/scanner/TransformerTest.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ class TransformerTest {
153153
WiFiWidth.MHZ_80 -> FREQUENCY + wiFiWidth.frequencyWidthHalf
154154
WiFiWidth.MHZ_160 -> FREQUENCY + wiFiWidth.frequencyWidth
155155
WiFiWidth.MHZ_80_PLUS -> FREQUENCY + wiFiWidth.frequencyWidthHalf
156+
WiFiWidth.MHZ_320 -> FREQUENCY + wiFiWidth.frequencyWidthHalf
157+
}
158+
scanResult.centerFreq1 = when(wiFiWidth) {
159+
WiFiWidth.MHZ_320 -> FREQUENCY + wiFiWidth.frequencyWidth
160+
else -> -1
156161
}
157162
scanResult.level = LEVEL
158163
scanResult.channelWidth = wiFiWidth.ordinal

0 commit comments

Comments
 (0)