fix(sim): resolve compile error in CSI frame generator
Fix byte constant overflow for noise_floor field by using an int8 variable instead of a constant conversion expression. Also update channel field to use --channel flag value instead of hardcoded 6. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c8622fb510
commit
54172abd03
1 changed files with 3 additions and 2 deletions
|
|
@ -45,8 +45,9 @@ func generateCSIFrame(tx, rx *VirtualNode, walkers []*Walker, walls []Wall, fram
|
|||
copy(frame[6:12], rx.MAC[:]) // peer_mac
|
||||
binary.LittleEndian.PutUint64(frame[12:20], uint64(frameNum*50000)) // timestamp_us
|
||||
frame[20] = byte(rssi) // rssi
|
||||
frame[21] = 0xA6 // noise_floor: -90 dBm as uint8 (two's complement of -90)
|
||||
frame[22] = 6 // channel (2.4 GHz ch6)
|
||||
var noiseFloor int8 = -95
|
||||
frame[21] = byte(noiseFloor) // noise_floor: -95 dBm
|
||||
frame[22] = byte(*flagChannel) // channel (from --channel flag)
|
||||
frame[23] = nSub // n_sub
|
||||
|
||||
// Generate I/Q pairs for each subcarrier
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue