File tree 1 file changed +19
-0
lines changed
internal/backend/concentratord
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 {
362
362
return nil
363
363
}
364
364
365
+ // Hz to kHz
365
366
loRaModInfo := pl .GetTxInfo ().GetLoraModulationInfo ()
366
367
if loRaModInfo != nil {
367
368
loRaModInfo .Bandwidth = loRaModInfo .Bandwidth / 1000
@@ -388,6 +389,24 @@ func (b *Backend) handleGatewayStats(bb []byte) error {
388
389
var statsID uuid.UUID
389
390
copy (statsID [:], pl .GetStatsId ())
390
391
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
+
391
410
log .WithFields (log.Fields {
392
411
"stats_id" : statsID ,
393
412
}).Info ("backend/concentratord: stats event received" )
You can’t perform that action at this time.
0 commit comments