BLE: Proper timeout configuration
The following discussion from !360 (merged) should be addressed:
-
@rahix started a discussion: (+1 comment) All warnings fixed, except one in the BLE code:
epicardium/ble/ble_main.c:125:1: warning: missing initializer for field 'maxAttemptTimeout' of 'smpCfg_t' {aka 'const struct <anonymous>'} [-Wmissing-field-initializers] 125 | }; | ^ In file included from ../epicardium/ble/ble_main.c:26: lib/sdk/Libraries/BTLE/stack/ble-host/include/smp_api.h:102:23: note: 'maxAttemptTimeout' declared here 102 | uint32_t maxAttemptTimeout; /*!< \brief Maximum 'Repeated attempts' timeout in msec */ | ^~~~~~~~~~~~~~~~~
@hauke, @schneider: There are three fields left in this struct which are not initialized:
maxAttemptTimeout
,attemptDecTimeout
, andattemptExp
. What should we do with them?
This is the relevant 'documentation', if this helps ...
uint32_t maxAttemptTimeout; /*!< \brief Maximum 'Repeated attempts' timeout in msec */
uint32_t attemptDecTimeout; /*!< \brief Time msec before attemptExp decreases */
uint16_t attemptExp; /*!< \brief Exponent to raise attemptTimeout on maxAttempts */