File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 1
1
#define CA_PK "VnZ0epkCQ5PnguMMIxZCIqFvrTpmMxOve3iCYK2hKX4="
2
- #define FW_VER 32
2
+ #define FW_VER 33
3
3
#define PRODUCT "VIRKEY"
4
4
#define LOG_TAG "MAIN"
5
5
@@ -246,6 +246,11 @@ static bool erase_on_reset;
246
246
static uint32_t reset_button_tm ;
247
247
// --- End Reset button timer
248
248
249
+ // Advertising enable timer
250
+ #define ADV_ENABLE_TIME 300 // 30 seconds
251
+ static uint32_t adv_enable_tm ;
252
+ // --- End Advertising enable timer
253
+
249
254
// Function declarations
250
255
static int reset_flash_config (bool );
251
256
static esp_err_t save_flash_config ();
@@ -1980,6 +1985,15 @@ void app_main(void) {
1980
1985
}
1981
1986
// --- End Reset Timer
1982
1987
1988
+ // Advertising enable timer
1989
+ if (adv_enable_tm > 0 ) {
1990
+ adv_enable_tm -- ;
1991
+ } else {
1992
+ gatts_start_adv ();
1993
+ adv_enable_tm = ADV_ENABLE_TIME ;
1994
+ }
1995
+ // --- End Advertising enable timer
1996
+
1983
1997
xSemaphoreGive (session_sem );
1984
1998
}
1985
1999
}
You can’t perform that action at this time.
0 commit comments