Skip to content

Commit

Permalink
ns: Add LastBatteryPercentage to the ApplicationUplink message
Browse files Browse the repository at this point in the history
  • Loading branch information
halimi committed Dec 18, 2024
1 parent 9d6e011 commit c7e75f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/networkserver/grpc_gsns.go
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,11 @@ func (ns *NetworkServer) handleDataUplink(ctx context.Context, up *ttnpb.UplinkM
ConsumedAirtime: up.ConsumedAirtime,
PacketErrorRate: mac.LossRate(stored.MacState, matched.phy),
NetworkIds: ns.networkIdentifiers(ctx),
LastBatteryPercentage: &ttnpb.LastBatteryPercentage{
FCnt: stored.MacState.LastDevStatusFCntUp,
Value: stored.BatteryPercentage,
ReceivedAt: stored.LastDevStatusReceivedAt,
},
},
},
})
Expand Down

0 comments on commit c7e75f7

Please sign in to comment.