Skip to content

Commit

Permalink
Add channel option to message command (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmatte7 authored May 26, 2024
1 parent 7decd7e commit 8a1f884
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion radio.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (r *Radio) GetRadioInfo() (radioResponses []*pb.FromRadio, err error) {
}

// SendTextMessage sends a free form text message to other radios
func (r *Radio) SendTextMessage(message string, to int64) error {
func (r *Radio) SendTextMessage(message string, to int64, channel int64) error {
var address int64
if to == 0 {
address = broadcastNum
Expand All @@ -240,6 +240,7 @@ func (r *Radio) SendTextMessage(message string, to int64) error {
To: uint32(address),
WantAck: true,
Id: uint32(packetID),
Channel: uint32(channel),
PayloadVariant: &pb.MeshPacket_Decoded{
Decoded: &pb.Data{
Payload: []byte(message),
Expand Down

0 comments on commit 8a1f884

Please sign in to comment.