Skip to content

Commit 35cd307

Browse files
committed
Report fractional RSSI
1 parent 75b911a commit 35cd307

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packet_forwarder/src/lora_pkt_fwd.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ License: Revised BSD License, see LICENSE.TXT file include in the project
109109
#define STD_FSK_PREAMB 5
110110

111111
#define STATUS_SIZE 200
112-
#define TX_BUFF_SIZE ((540 * NB_PKT_MAX) + 30 + STATUS_SIZE)
112+
#define TX_BUFF_SIZE ((542 * NB_PKT_MAX) + 30 + STATUS_SIZE)
113113
#define ACK_BUFF_SIZE 64
114114

115115
#define UNIX_GPS_EPOCH_OFFSET 315964800 /* Number of seconds ellapsed between 01.Jan.1970 00:00:00
@@ -2023,7 +2023,7 @@ void thread_up(void) {
20232023
}
20242024

20252025
/* Signal RSSI, payload size */
2026-
j = snprintf((char *)(buff_up + buff_index), TX_BUFF_SIZE-buff_index, ",\"rssis\":%.0f", roundf(p->rssis));
2026+
j = snprintf((char *)(buff_up + buff_index), TX_BUFF_SIZE-buff_index, ",\"rssis\":%.1f", p->rssis);
20272027
if (j > 0) {
20282028
buff_index += j;
20292029
} else {
@@ -2066,7 +2066,7 @@ void thread_up(void) {
20662066
}
20672067

20682068
/* Channel RSSI, payload size, 18-23 useful chars */
2069-
j = snprintf((char *)(buff_up + buff_index), TX_BUFF_SIZE-buff_index, ",\"rssi\":%.0f,\"size\":%u", roundf(p->rssic), p->size);
2069+
j = snprintf((char *)(buff_up + buff_index), TX_BUFF_SIZE-buff_index, ",\"rssi\":%.1f,\"size\":%u", p->rssic, p->size);
20702070
if (j > 0) {
20712071
buff_index += j;
20722072
} else {

0 commit comments

Comments
 (0)