VirtualWatchdog: fix name for member timeout

pull/10857/head
Martin Kojtal 2019-06-28 11:01:10 +01:00
parent a18ba70c1b
commit 88a9548167
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ VirtualWatchdog::VirtualWatchdog(uint32_t timeout, const char *const str): _name
_current_count = 0;
_is_initialized = false;
_next = NULL;
_max_timeout = timeout;
_timeout = timeout;
// start watchdog
Watchdog &watchdog = Watchdog::get_instance();
if (!_is_hw_watchdog_running) {
@ -108,7 +108,7 @@ void VirtualWatchdog::process(uint32_t elapsed_ms)
{
VirtualWatchdog *cur_ptr = _first;
while (cur_ptr != NULL) {
if (cur_ptr->_current_count > cur_ptr->_max_timeout) {
if (cur_ptr->_current_count > cur_ptr->_timeout) {
system_reset();
} else {
cur_ptr->_current_count += elapsed_ms;

View File

@ -108,7 +108,7 @@ protected :
*/
void remove_from_list();
private:
uint32_t _max_timeout; //_max_timeout initialized via constructor while creating instance of this class
uint32_t _timeout; //_timeout initialized via constructor while creating instance of this class
const char *_name; //To store the details of user
uint32_t _current_count; //this parameter is used to reset everytime threads/user calls kick
bool _is_initialized; //To control start and stop functionality