Skip to content

Commit

Permalink
Return only warning temperature limit from icub-main
Browse files Browse the repository at this point in the history
  • Loading branch information
MSECode committed Oct 25, 2023
1 parent 1cab622 commit 0b83905
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4767,17 +4767,19 @@ bool embObjMotionControl::getTemperaturesRaw(double *vals)

bool embObjMotionControl::getTemperatureLimitRaw(int m, double *temp)
{
eOprotID32_t protid = eoprot_ID_get(eoprot_endpoint_motioncontrol, eoprot_entity_mc_motor, m, eoprot_tag_mc_motor_config_temperaturelimit);
uint16_t size;
eOmeas_temperature_t temperaturelimit = {0};
*temp = 0;
if(!askRemoteValue(protid, &temperaturelimit, size))
{
yError() << "embObjMotionControl::getTemperatureLimitRaw() can't read temperature limits for" << getBoardInfo() << " motor " << m;
return false;
}

*temp = (double) temperaturelimit;
// eOprotID32_t protid = eoprot_ID_get(eoprot_endpoint_motioncontrol, eoprot_entity_mc_motor, m, eoprot_tag_mc_motor_config_temperaturelimit);
// uint16_t size;
// eOmeas_temperature_t temperaturelimit = {0};
// *temp = 0;
// if(!askRemoteValue(protid, &temperaturelimit, size))
// {
// yError() << "embObjMotionControl::getTemperatureLimitRaw() can't read temperature limits for" << getBoardInfo() << " motor " << m;
// return false;
// }

// *temp = (double) temperaturelimit;

*temp= _temperatureLimits[m].warningTemperatureLimit;

return true;
}
Expand Down

0 comments on commit 0b83905

Please sign in to comment.