mirror of
https://github.com/espressif/openthread.git
synced 2026-10-01 21:37:39 +00:00
[diag] handle errors of TransmitPacket() (#11076)
`TransmitPacket()` should return an error from platform Radio implementation, as for example Radio can be in incorrect state. If error occurs, increase `mSentErrorInvalidStatePackets` stat. Add wrong state case to tests and fix `diag repeat stop` called too lata. Signed-off-by: Maciej Baczmanski <[email protected]>
This commit is contained in:
@@ -2693,13 +2693,14 @@ class OTCI(object):
|
||||
result['sent_success_packets'] = int(output[1].split(":")[1])
|
||||
result['sent_error_cca_packets'] = int(output[2].split(":")[1])
|
||||
result['sent_error_abort_packets'] = int(output[3].split(":")[1])
|
||||
result['sent_error_others_packets'] = int(output[4].split(":")[1])
|
||||
result['sent_error_invalid_state_packets'] = int(output[4].split(":")[1])
|
||||
result['sent_error_others_packets'] = int(output[5].split(":")[1])
|
||||
|
||||
values = re.findall("\-?\d+", output[5])
|
||||
values = re.findall("\-?\d+", output[6])
|
||||
result['first_received_packet_rssi'] = int(values[0])
|
||||
result['first_received_packet_lqi'] = int(values[1])
|
||||
|
||||
values = re.findall("\-?\d+", output[6])
|
||||
values = re.findall("\-?\d+", output[7])
|
||||
result['last_received_packet_rssi'] = int(values[0])
|
||||
result['last_received_packet_lqi'] = int(values[1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user