Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
17deb9f895 | |||
cedea19f1a |
@ -116,6 +116,18 @@ extern "C"
|
||||
*/
|
||||
const zh_espnow_stats_t *zh_espnow_get_stats(void);
|
||||
|
||||
/**
|
||||
* @brief Reset ESP-NOW statistics.
|
||||
*/
|
||||
void zh_espnow_reset_stats(void);
|
||||
|
||||
/**
|
||||
* @brief Check ESP-NOW initialization status.
|
||||
*
|
||||
* @return true if ESP-NOW is initialized false otherwise.
|
||||
*/
|
||||
bool zh_espnow_is_initialized(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@ -1 +1 @@
|
||||
1.1.2
|
||||
1.3.0
|
13
zh_espnow.c
13
zh_espnow.c
@ -509,3 +509,16 @@ const zh_espnow_stats_t *zh_espnow_get_stats(void)
|
||||
{
|
||||
return &_stats;
|
||||
}
|
||||
|
||||
void zh_espnow_reset_stats(void)
|
||||
{
|
||||
_stats.sent_success = 0;
|
||||
_stats.sent_fail = 0;
|
||||
_stats.received = 0;
|
||||
ZH_ESPNOW_LOGI("ESP-NOW statistic reset successfully.");
|
||||
}
|
||||
|
||||
bool zh_espnow_is_initialized(void)
|
||||
{
|
||||
return _is_initialized;
|
||||
}
|
Reference in New Issue
Block a user