[modules][serial] fix simple module ability to send

This commit is contained in:
Mykhailo Lesyk
2022-12-21 01:35:19 -08:00
parent af9d4328eb
commit 4de557b4db
3 changed files with 18 additions and 0 deletions

View File

@@ -221,8 +221,12 @@ MeshPacket *SerialModuleRadio::allocReply()
void SerialModuleRadio::sendPayload(NodeNum dest, bool wantReplies)
{
Channel *ch = (boundChannel != NULL) ? &channels.getByName(boundChannel) : NULL;
MeshPacket *p = allocReply();
p->to = dest;
if (ch != NULL) {
p->channel = ch->index;
}
p->decoded.want_response = wantReplies;
p->want_ack = ACK;