You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We updated the ArduPilot interface so that the default data type should be single and that no single data types need to be specified in the code itself.
However, at least double parameters from the workspace are generated as doubles in the C++ code in rtwtypes (real_T double ...).
As a workaround, the user can manually change "double" to "float" in the generated code if doubles are not desired.
The text was updated successfully, but these errors were encountered:
The proposed solution to use the Single Precision Converter does not seem to work.
Since the Converter seem to be incompatible with custom simulink library functions.
As a possible solution any constants constants in functions might be initialized by using the superiorfloat function.
e.g. x = zeros(size_x,superiorfloat(input_arg)).
And thus setting the data type depending on the fuction input (input_arg).
We updated the ArduPilot interface so that the default data type should be single and that no single data types need to be specified in the code itself.
However, at least double parameters from the workspace are generated as doubles in the C++ code in rtwtypes (real_T double ...).
As a workaround, the user can manually change "double" to "float" in the generated code if doubles are not desired.
The text was updated successfully, but these errors were encountered: