Skip to content

Commit

Permalink
Add error value for string with constexpr
Browse files Browse the repository at this point in the history
  • Loading branch information
MSECode committed Nov 15, 2023
1 parent c0a5920 commit 9b7d74e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ static bool nv_not_found(void)
return false;
}

static constexpr double const temperatureErrorValue_s = -3500;




Expand Down Expand Up @@ -4772,7 +4774,7 @@ bool embObjMotionControl::getTemperatureRaw(int m, double* val)
*val = NAN;
if(ret)
{
if (((double)status.mot_temperature) != -5000) //using -5000 as the default value on 2FOC for initializing the temperature. If cannot read from I2C the value cannot be updated
if (((double)status.mot_temperature) != temperatureErrorValue_s) //using -5000 as the default value on 2FOC for initializing the temperature. If cannot read from I2C the value cannot be updated
{
//if ((_foc_based_info[m].temperatureSensorType != motor_temperature_sensor_none) && (serviceConfig.ethservice.configuration.type == eomn_serv_MC_foc))
if(_temperatureSensorsVector.at(m) != nullptr)
Expand Down

0 comments on commit 9b7d74e

Please sign in to comment.