[riot-notifications] [RIOT-OS/RIOT] drivers/sx126x : r/NETOPT_RX_TIMEOUT/NETOPT_RX_SYMBOL_TIMEOUT (#16599)

Akshai M (Augustus Diode) notifications at github.com
Thu Jul 8 11:13:26 CEST 2021

@akshaim commented on this pull request.

> @@ -288,8 +288,9 @@ static int _set_state(sx126x_t *dev, netopt_state_t state)
     case NETOPT_STATE_RX:
         DEBUG("[sx126x] netdev: set NETOPT_STATE_RX state\n");
         sx126x_cfg_rx_boosted(dev, true);
-        if (dev->rx_timeout != 0) {
-            sx126x_set_rx(dev, dev->rx_timeout);
+        const int _timeout = (sx126x_symbol_to_msec(dev, dev->rx_timeout));

Just to be safe, compile optimisation and adding some clarity. The variable should only be set via `sx126x_symbol_to_msec` , wrong values will break the stack.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210708/25582ee0/attachment.htm>

More information about the notifications mailing list