mirror of
https://github.com/nasa/trick.git
synced 2024-12-30 18:07:00 +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;
|
||||
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) ;
|
||||
if ( units_name.compare(new_units) ) {
|
||||
std::ostringstream oss;
|
||||
@ -170,6 +171,7 @@ int Trick::VariableServerThread::var_units(std::string var_name, std::string uni
|
||||
free(variable->ref->units);
|
||||
variable->ref->units = strdup(new_units.c_str());
|
||||
}
|
||||
}
|
||||
return(0) ;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user