From 0b839058d7c31c8ca77cf968c6e69d5cc7dd3207 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Wed, 25 Oct 2023 08:46:27 +0200 Subject: [PATCH] Return only warning temperature limit from icub-main --- .../embObjMotionControl.cpp | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp b/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp index 21bf22822d..de15248927 100644 --- a/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp +++ b/src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp @@ -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; }