From 0976cfcef52c12f0f544a41da41a049ae0745ecb Mon Sep 17 00:00:00 2001 From: javicalle <31999997+javicalle@users.noreply.github.com> Date: Fri, 7 Jun 2019 21:46:21 +0200 Subject: [PATCH] Correct RFUDEBUG and add QRFDEBUG packet Small PR to correct an typo with RFUDEBUG and add the QRFDEBUG 'protocol'. Maybe also PING protocol can be added here. May it be necessary to control the response in the `decode_packet` function? --- rflink/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rflink/parser.py b/rflink/parser.py index 3ada915..5890283 100644 --- a/rflink/parser.py +++ b/rflink/parser.py @@ -308,7 +308,9 @@ def encode_packet(packet: dict) -> str: if packet['protocol'] == 'rfdebug': return '10;RFDEBUG=' + packet['command'] + ';' elif packet['protocol'] == 'rfudebug': - return '10;RFDEBUG=' + packet['command'] + ';' + return '10;RFUDEBUG=' + packet['command'] + ';' + elif packet['protocol'] == 'qrfdebug': + return '10;QRFDEBUG=' + packet['command'] + ';' else: return SWITCH_COMMAND_TEMPLATE.format( node=PacketHeader.master.value,