Skip to content

Commit

Permalink
Update and test final
Browse files Browse the repository at this point in the history
  • Loading branch information
MSECode committed Nov 23, 2023
1 parent a4ac82d commit e07bdc3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static bool nv_not_found(void)
return false;
}

static constexpr double const temperatureErrorValue_s = -3500;
static constexpr double const temperatureErrorValue_s = -5000;



Expand Down Expand Up @@ -135,10 +135,8 @@ bool embObjMotionControl::alloc(int nj)
_kalman_params.resize(nj);
_temperatureSensorsVector.resize(nj);
_temperatureExceededLimitWatchdog.resize(nj);
_temperatureSensorErrorWatchdog.resize(nj); // use 1000 as limit on the watchdog for the error on the temperature sensor receiving of the values -
// since the ETH callback timing is 5ms by default so using 1000s we can set a checking threshould of 1 second
// in which we can allow the tdb to not respond. If cannot receive response over 1s we trigger the error

_temperatureSensorErrorWatchdog.resize(nj);

return true;
}

Expand Down Expand Up @@ -1593,7 +1591,7 @@ bool embObjMotionControl::update(eOprotID32_t id32, double timestamp, void *rxda
}
}

if((eoprot_entity_mc_joint == ent) && (eoprot_tag_mc_motor_status_basic == tag))
if((eoprot_entity_mc_motor == ent) && (eoprot_tag_mc_motor_status == tag))
{
if(false == initialised())
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,15 @@ class Watchdog

bool _isStarted;
uint32_t _count;
uint32_t _threshold;
uint32_t _threshold; // use 10000 as limit on the watchdog for the error on the temperature sensor receiving of the values -
// since the ETH callback timing is 2ms by default so using 10000 we can set a checking threshould of 5 second
// in which we can allow the tdb to not respond. If cannot receive response over 1s we trigger the error

double _time;

public:

Watchdog(): _count(0), _isStarted(false), _threshold(500), _time(0){;}
Watchdog(): _count(0), _isStarted(false), _threshold(10000), _time(0){;}
Watchdog(uint32_t threshold):_count(0), _isStarted(false),_threshold(threshold), _time(0){;}
~Watchdog() = default;
Watchdog(const Watchdog& other) = default;
Expand Down

0 comments on commit e07bdc3

Please sign in to comment.