Skip to content

Commit b32015a

Browse files
committed
Trick View: Can't set variables with -- units #301
Called map_trick_units_to_udunits to convert incoming units to udunits.
1 parent 302f1fe commit b32015a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

trick_source/sim_services/VariableServer/var_server_ext.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "trick/message_proto.h"
77
#include "trick/message_type.h"
88
#include "trick/memorymanager_c_intf.h"
9+
#include "trick/map_trick_units_to_udunits.hh"
910

1011
extern Trick::VariableServer * the_vs ;
1112

@@ -524,7 +525,8 @@ int var_set_base( const char * var , T value , const char * units ) {
524525
V_DATA v_data ;
525526
v_tree.v_data = &v_data ;
526527
var_set_value( v_data , value) ;
527-
ref->units = (char *)units ;
528+
//ref->units = (char *)units ;
529+
ref->units = (char *)(map_trick_units_to_udunits(units).c_str()) ;
528530
ref_assignment(ref , &v_tree) ;
529531
free(ref) ;
530532
} else {

0 commit comments

Comments
 (0)