mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
add code_string to error event
This commit is contained in:
parent
462c4311d3
commit
fe2239a8c6
2 changed files with 14 additions and 2 deletions
|
|
@ -4,7 +4,7 @@ import struct
|
|||
import time
|
||||
import io
|
||||
from typing import Any, Dict
|
||||
from .events import Event, EventType, EventDispatcher
|
||||
from .events import Event, EventType, EventDispatcher, ErrorMessages
|
||||
from .packets import BinaryReqType, PacketType, ControlType
|
||||
from .parsing import lpp_parse, lpp_parse_mma, parse_acl, parse_status
|
||||
from cayennelpp import LppFrame, LppData
|
||||
|
|
@ -80,7 +80,10 @@ class MessageReader:
|
|||
|
||||
elif packet_type_value == PacketType.ERROR.value:
|
||||
if len(data) > 1:
|
||||
result = {"error_code": data[1]}
|
||||
result = {
|
||||
"error_code": data[1],
|
||||
"code_string": ErrorMessages[data[1]],
|
||||
}
|
||||
else:
|
||||
result = {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue