File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
internal/backend/concentratord Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -362,6 +362,7 @@ func (b *Backend) handleUplinkFrame(bb []byte) error {
362362 return nil
363363 }
364364
365+ // Hz to kHz
365366 loRaModInfo := pl .GetTxInfo ().GetLoraModulationInfo ()
366367 if loRaModInfo != nil {
367368 loRaModInfo .Bandwidth = loRaModInfo .Bandwidth / 1000
@@ -388,6 +389,24 @@ func (b *Backend) handleGatewayStats(bb []byte) error {
388389 var statsID uuid.UUID
389390 copy (statsID [:], pl .GetStatsId ())
390391
392+ // Hz to kHz
393+ for i := range pl .RxPacketsPerModulation {
394+ if mod := pl .RxPacketsPerModulation [i ].GetModulation (); mod != nil {
395+ if lora := mod .GetLora (); lora != nil {
396+ lora .Bandwidth = lora .Bandwidth / 1000
397+ }
398+ }
399+ }
400+
401+ // Hz to kHz
402+ for i := range pl .TxPacketsPerModulation {
403+ if mod := pl .TxPacketsPerModulation [i ].GetModulation (); mod != nil {
404+ if lora := mod .GetLora (); lora != nil {
405+ lora .Bandwidth = lora .Bandwidth / 1000
406+ }
407+ }
408+ }
409+
391410 log .WithFields (log.Fields {
392411 "stats_id" : statsID ,
393412 }).Info ("backend/concentratord: stats event received" )
You can’t perform that action at this time.
0 commit comments