Skip to content

Commit

Permalink
Update icub_firmware_shared_VERSION requirement to higher than 1.37.2
Browse files Browse the repository at this point in the history
  • Loading branch information
MSECode committed Nov 23, 2023
1 parent d7db86d commit c44ee41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 16 deletions.
4 changes: 2 additions & 2 deletions conf/iCubFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ checkandset_dependency(OpenCV)
checkandset_dependency(Qt5)

if(icub_firmware_shared_FOUND AND ICUB_USE_icub_firmware_shared)
if(icub_firmware_shared_VERSION VERSION_LESS 1.37.0)
message(FATAL_ERROR "An old version of icub-firmware-shared has been detected: at least 1.37.0 is required")
if(icub_firmware_shared_VERSION VERSION_LESS 1.37.2)
message(FATAL_ERROR "An old version of icub-firmware-shared has been detected: at least 1.37.2 is required")
endif()
endif()

Expand Down
17 changes: 3 additions & 14 deletions src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,20 +1600,11 @@ bool embObjMotionControl::update(eOprotID32_t id32, double timestamp, void *rxda
if((_temperatureSensorsVector.at(motor)->getType() == motor_temperature_sensor_none))
return true;

eOmc_motor_status_basic_t mc_motor_status_basic = {};
id32 = eoprot_ID_get(eoprot_endpoint_motioncontrol, eoprot_entity_mc_motor, motor, eoprot_tag_mc_motor_status_basic);
eOmc_motor_status_t *mc_motor_status = reinterpret_cast<eOmc_motor_status_t*>(rxdata);

if (!res->getLocalValue(id32, &mc_motor_status_basic))
if((double)mc_motor_status->basic.mot_temperature != temperatureErrorValue_s) //I get a valid value
{
yError() << getBoardInfo() << "getLocalValue() cannot retrieve motor" << motor << "status basic";
return true; //do we need to actually return false here since is eth error
}

//eOmc_motor_status_basic_t *mc_motor_status_basic = reinterpret_cast<eOmc_motor_status_basic_t*>(rxdata);

if((double)mc_motor_status_basic.mot_temperature != temperatureErrorValue_s) //I get a valid value
{
double tmp = _temperatureSensorsVector.at(motor)->convertRawToTempCelsius((double)mc_motor_status_basic.mot_temperature);
double tmp = _temperatureSensorsVector.at(motor)->convertRawToTempCelsius((double)mc_motor_status->basic.mot_temperature);

if (tmp > _temperatureLimits[motor].warningTemperatureLimit)
{
Expand Down Expand Up @@ -1656,8 +1647,6 @@ bool embObjMotionControl::update(eOprotID32_t id32, double timestamp, void *rxda
}
}



return true;
}

Expand Down

0 comments on commit c44ee41

Please sign in to comment.