olindgre 2ece01e1d7 Make powertrain-build not overlap with pybuild in site-packages
Change-Id: I7b59f3f04f0f787d35db0b9389f295bf1ad24f56
2024-09-17 10:25:04 +02:00

22 lines
518 B
Matlab

% Copyright 2024 Volvo Car Corporation
% Licensed under Apache 2.0.
function jsonValue = getProperValue(tlPort, tlValue)
%GETPROPERVALUE Get a value fitting for a json file, given a TL property
%value.
if strcmp(tlValue, 'IMPLICIT_ENUM')
tlValue = getEnumName(tlPort);
end
if ischar(tlValue)
jsonValue = tlValue;
elseif isempty(tlValue)
jsonValue = '-';
else
jsonValue = tlValue(1);
if isnan(jsonValue)
jsonValue = '-';
end
end
end