mirror of
https://github.com/nasa/trick.git
synced 2024-12-19 05:07:54 +00:00
#687 do not warn or convert unit --
This commit is contained in:
parent
2a059719ba
commit
d2e81257c2
@ -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