mirror of
https://github.com/nasa/trick.git
synced 2025-01-02 11:26:43 +00:00
Merge pull request #689 from nasa/unitless-no-convert
#687 do not warn or convert unit --
This commit is contained in:
commit
b23fda4e2c
@ -124,7 +124,8 @@ int Trick::VariableServerThread::var_units(std::string var_name, std::string uni
|
|||||||
oss << "Variable Server: " << message << std::endl;
|
oss << "Variable Server: " << message << std::endl;
|
||||||
message_publish(type, oss.str().c_str());
|
message_publish(type, oss.str().c_str());
|
||||||
};
|
};
|
||||||
|
/* if unitless ('--') then do not convert to udunits*/
|
||||||
|
if(units_name.compare("--")){
|
||||||
std::string new_units = map_trick_units_to_udunits(units_name) ;
|
std::string new_units = map_trick_units_to_udunits(units_name) ;
|
||||||
if ( units_name.compare(new_units) ) {
|
if ( units_name.compare(new_units) ) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -170,6 +171,7 @@ int Trick::VariableServerThread::var_units(std::string var_name, std::string uni
|
|||||||
free(variable->ref->units);
|
free(variable->ref->units);
|
||||||
variable->ref->units = strdup(new_units.c_str());
|
variable->ref->units = strdup(new_units.c_str());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return(0) ;
|
return(0) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user