Skip to content

Commit 00ecdaa

Browse files
authored
Code maintenance (#1355)
1 parent 4947a63 commit 00ecdaa

File tree

6 files changed

+31
-12
lines changed

6 files changed

+31
-12
lines changed

Logparser/logparser.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<link rel="stylesheet" href="logparser.css" />
66
</head>
77
<body>
8-
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"></script>
9-
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
8+
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
9+
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.9.1/underscore-min.js"></script>
1010
<div id="parser">
1111
<h4>Paste log from gateway or node here:</h4>
1212
<textarea class="form-control" @change="parse" rows="10" v-model="source"></textarea>
@@ -20,7 +20,7 @@ <h4>Human readable output:</h4>
2020
<th>Node Id</th>
2121
<th>Child Sensor</th>
2222
<th>Command Type</th>
23-
<th>Ack Req/Resp</th>
23+
<th>Echo Req/Resp</th>
2424
<th>Type</th>
2525
<th>Payload</th>
2626
<th>Description</th>

Logparser/logparser.js

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ var match = [
224224
{ re: "MCO:BGN:INIT CP=([^,]+)", d: "Core initialization with capabilities <b>$1</b>" },
225225
{ re: "MCO:BGN:INIT (\\w+),CP=([^,]+),VER=(.*)", d: "Core initialization of <b>$1</b>, with capabilities <b>$2</b>, library version <b>$3</b>" },
226226
{ re: "MCO:BGN:INIT (\\w+),CP=([^,]+),REL=(.*),VER=(.*)", d: "Core initialization of <b>$1</b>, with capabilities <b>$2</b>, library version <b>$4</b>, release <b>$3</b>" },
227+
{ re: "MCO:BGN:INIT (\\w+),CP=([^,]+),FQ=(\\d+),REL=(.*),VER=(.*)", d: "Core initialization of <b>$1</b>, with capabilities <b>$2</b>, CPU frequency <b>$4</b> MHz, library version <b>$5</b>, release <b>$4</b>" },
227228
{ re: "MCO:BGN:BFR", d: "Callback before()" },
228229
{ re: "MCO:BGN:STP", d: "Callback setup()" },
229230
{ re: "MCO:BGN:INIT OK,TSP=(.*)", d: "Core initialized, transport status <b>$1</b>, (1=initialized, 0=not initialized, NA=not available)" },
@@ -269,7 +270,6 @@ var match = [
269270
{ re: "TSM:READY", d: "Transition to <b>Ready</b> state" },
270271
{ re: "TSM:FAIL:DIS", d: "Disable transport" },
271272
{ re: "TSM:FAIL:CNT=(\\d+)", d: "Transition to <b>Failure</b> state, consecutive failure counter is <b>$1</b>" },
272-
273273
{ re: "TSM:FAIL:PDT", d: "Power-down transport" },
274274
{ re: "TSM:FAIL:RE-INIT", d: "Attempt to re-initialize transport" },
275275
{ re: "TSF:CKU:OK,FCTRL", d: "Uplink OK, flood control prevents pinging GW in too short intervals" },
@@ -322,7 +322,27 @@ var match = [
322322
{ re: "TSF:MSG:READ,(\\d+)-(\\d+)-(\\d+),s=(\\d+),c=(\\d+),t=(\\d+),pt=(\\d+),l=(\\d+),sg=(\\d+):(.*)", d: "<u><b>Received Message</b></u><br><b>Sender</b>: $1<br><b>Last Node</b>: $2<br><b>Destination</b>: $3<br><b>Sensor Id</b>: $4<br><b>Command</b>: {command:$5}<br><b>Message Type</b>: {type:$5:$6}<br><b>Payload Type</b>: {pt:$7}<br><b>Payload Length</b>: $8<br><b>Signing</b>: $9<br><b>Payload</b>: $10" },
323323
{ re: "TSF:MSG:SEND,(\\d+)-(\\d+)-(\\d+)-(\\d+),s=(\\d+),c=(\\d+),t=(\\d+),pt=(\\d+),l=(\\d+),sg=(\\d+),ft=(\\d+),st=(\\w+):(.*)", d: "<u><b>Sent Message</b></u><br><b>Sender</b>: $1<br><b>Last Node</b>: $2<br><b>Next Node</b>: $3<br><b>Destination</b>: $4<br><b>Sensor Id</b>: $5<br><b>Command</b>: {command:$6}<br><b>Message Type</b>:{type:$6:$7}<br><b>Payload Type</b>: {pt:$8}<br><b>Payload Length</b>: $9<br><b>Signing</b>: $10<br><b>Failed uplink counter</b>: $11<br><b>Status</b>: $12 (OK=success, NACK=no radio ACK received)<br><b>Payload</b>: $13" },
324324
{ re: "!TSF:MSG:SEND,(\\d+)-(\\d+)-(\\d+)-(\\d+),s=(\\d+),c=(\\d+),t=(\\d+),pt=(\\d+),l=(\\d+),sg=(\\d+),ft=(\\d+),st=(\\w+):(.*)", d: "<u><b style='color:red'>Sent Message</b></u><br><b>Sender</b>: $1<br><b>Last Node</b>: $2<br><b>Next Node</b>: $3<br><b>Destination</b>: $4<br><b>Sensor Id</b>: $5<br><b>Command</b>: {command:$6}<br><b>Message Type</b>:{type:$6:$7}<br><b>Payload Type</b>: {pt:$8}<br><b>Payload Length</b>: $9<br><b>Signing</b>: $10<br><b>Failed uplink counter</b>: $11<br><b>Status</b>: $12 (OK=success, NACK=no radio ACK received)<br><b>Payload</b>: $13" },
325-
325+
{ re: "\\?TSF:MSG:SEND,(\\d+)-(\\d+)-(\\d+)-(\\d+),s=(\\d+),c=(\\d+),t=(\\d+),pt=(\\d+),l=(\\d+),sg=(\\d+),ft=(\\d+),st=(\\w+):(.*)", d: "<u><b style='color:orange'>Sent Message without radio ACK</b></u><br><b>Sender</b>: $1<br><b>Last Node</b>: $2<br><b>Next Node</b>: $3<br><b>Destination</b>: $4<br><b>Sensor Id</b>: $5<br><b>Command</b>: {command:$6}<br><b>Message Type</b>:{type:$6:$7}<br><b>Payload Type</b>: {pt:$8}<br><b>Payload Length</b>: $9<br><b>Signing</b>: $10<br><b>Failed uplink counter</b>: $11<br><b>Status</b>: $12 (OK=success, NACK=no radio ACK received)<br><b>Payload</b>: $13" },
326+
327+
// transport HAL
328+
329+
{ re: "THA:INIT", d: "Initialise transport HAL" },
330+
{ re: "THA:INIT:PSK=(.*)", d: "Initialise transport HAL, PSK=<b>$1</b>" },
331+
{ re: "THA:SAD:ADDR=(\\d+)", d: "Set transport address: <b>$1</b>" },
332+
{ re: "THA:GAD:ADDR=(\\d+)", d: "Get transport address: <b>$1</b>" },
333+
{ re: "THA:DATA:AVAIL", d: "Transport HAL received data" },
334+
{ re: "THA:SAN:RES=(\\d+)", d: "Transport sanity check, result=<b>$1</b> (0=NOK, 1=OK)" },
335+
{ re: "THA:RCV:MSG=(.*)", d: "Message received: <b>$1</b>" },
336+
{ re: "THA:RCV:DECRYPT", d: "Decrypt message" },
337+
{ re: "THA:RCV:PLAIN=(.*)", d: "Message plaint text: <b>$1</b>" },
338+
{ re: "!THA:RCV:PVER=(\\d+)", d: "Message protocol version mismatch: <b>$1</b>" },
339+
{ re: "!THA:RCV:LEN=(\\d+),EXP=(\\d+)", d: "Invalid message length, actual <b>$1</b>, expected <b>$2</b>" },
340+
{ re: "THA:RCV:MSG LEN=(\\d+)", d: "Length of received message: <b>$1</b>" },
341+
{ re: "THA:SND:MSG=(.*)", d: "Send message: <b>$1</b>" },
342+
{ re: "THA:SND:ENCRYPT", d: "Encrypt message" },
343+
{ re: "THA:SND:CIP=(.*)", d: "Ciphertext of encrypted message: <b>$1</b>" },
344+
{ re: "THA:SND:MSG LEN=(\\d+),RES=(\\d+)", d: "Sending message with length=<b>$1</b>, result=<b>$2</b> (0=NOK, 1=OK)" },
345+
326346
// Signing backend
327347

328348
{ re: "SGN:INI:BND OK", d: "Backend has initialized ok" },

core/MySensorsCore.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ int8_t sleep(const uint8_t interrupt1, const uint8_t mode1, const uint8_t interr
341341
/**
342342
* \deprecated Use sleep(ms, true) instead
343343
* Same as sleep(), send heartbeat and process incoming messages before going to sleep.
344-
* Specify the time to wait for incoming messages by defining MY_SMART_SLEEP_WAIT_DURATION to a time (ms).
344+
* Specify the time to wait for incoming messages by defining @ref MY_SMART_SLEEP_WAIT_DURATION_MS to a time (ms).
345345
* @param sleepingMS Number of milliseconds to sleep.
346346
* @return @ref MY_WAKE_UP_BY_TIMER if timer woke it up, @ref MY_SLEEP_NOT_POSSIBLE if not possible (e.g. ongoing FW update)
347347
*/
@@ -350,7 +350,7 @@ int8_t smartSleep(const uint32_t sleepingMS);
350350
/**
351351
* \deprecated Use sleep(interrupt, mode, ms, true) instead
352352
* Same as sleep(), send heartbeat and process incoming messages before going to sleep.
353-
* Specify the time to wait for incoming messages by defining MY_SMART_SLEEP_WAIT_DURATION to a time (ms).
353+
* Specify the time to wait for incoming messages by defining @ref MY_SMART_SLEEP_WAIT_DURATION_MS to a time (ms).
354354
* @param interrupt Interrupt that should trigger the wakeup
355355
* @param mode RISING, FALLING, CHANGE
356356
* @param sleepingMS Number of milliseconds to sleep or 0 to sleep forever
@@ -361,7 +361,7 @@ int8_t smartSleep(const uint8_t interrupt, const uint8_t mode, const uint32_t sl
361361
/**
362362
* \deprecated Use sleep(interrupt1, mode1, interrupt2, mode2, ms, true) instead
363363
* Same as sleep(), send heartbeat and process incoming messages before going to sleep.
364-
* Specify the time to wait for incoming messages by defining MY_SMART_SLEEP_WAIT_DURATION to a time (ms).
364+
* Specify the time to wait for incoming messages by defining @ref MY_SMART_SLEEP_WAIT_DURATION_MS to a time (ms).
365365
* @param interrupt1 First interrupt that should trigger the wakeup
366366
* @param mode1 Mode for first interrupt (RISING, FALLING, CHANGE)
367367
* @param interrupt2 Second interrupt that should trigger the wakeup

core/Version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
#define MYSENSORS_LIBRARY_VERSION_MINOR 3 //!< Minor release version
5151
#define MYSENSORS_LIBRARY_VERSION_PATCH 2 //!< Patch version
5252
#define MYSENSORS_LIBRARY_VERSION_PRERELEASE "beta" //!< Pre-release suffix, i.e. alpha, beta, rc.1, etc
53-
#define MYSENSORS_LIBRARY_VERSION_PRERELEASE_NUMBER 0x08 //!< incremental counter, starting at 0x00. 0xFF for final release
53+
#define MYSENSORS_LIBRARY_VERSION_PRERELEASE_NUMBER 0x09 //!< incremental counter, starting at 0x00. 0xFF for final release
5454

5555

5656
#if (MYSENSORS_LIBRARY_VERSION_PRERELEASE_NUMBER != 0xFF)

hal/transport/MyTransportHAL.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* | | THA | RCV | PLAIN=%%s | Decrypted message (PLAIN)
3232
* |!| THA | RCV | PVER=%%d | Message protocol version (PVER) mismatch
3333
* |!| THA | RCV | LEN=%%d,EXP=%%d | Invalid message length (LEN), exptected length (EXP)
34-
* |!| THA | RCV | MSG LEN=%%d | Length of received message (LEN)
34+
* | | THA | RCV | MSG LEN=%%d | Length of received message (LEN)
3535
* | | THA | SND | MSG=%%s | Send message (MSG)
3636
* | | THA | SND | ENCRYPT | Encrypt message to send (%AES)
3737
* | | THA | SND | CIP=%%s | Ciphertext of encypted message (CIP)

keywords.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ MY_RX_MESSAGE_BUFFER_SIZE LITERAL1
4343
MY_RX_MESSAGE_BUFFER_FEATURE LITERAL1
4444
MY_SERIAL_OUTPUT_SIZE LITERAL1
4545
MY_SLEEP_NOT_POSSIBLE LITERAL1
46-
MY_SMART_SLEEP_WAIT_DURATION LITERAL1
4746
MY_SPLASH_SCREEN_DISABLED LITERAL1
4847
MY_WAKE_UP_BY_TIMER LITERAL1
4948

@@ -148,7 +147,7 @@ MY_SOFT_SPI_MOSI_PIN LITERAL1
148147
MY_SOFT_SPI_SCK_PIN LITERAL1
149148

150149
# TransportHAL
151-
MY_DEBUG_VERBOSE_TRANSPORT_HAL
150+
MY_DEBUG_VERBOSE_TRANSPORT_HAL LITERAL1
152151

153152
# RF24
154153
MY_DEBUG_VERBOSE_RF24 LITERAL1

0 commit comments

Comments
 (0)