MobiFlight-Connector
MobiFlight-Connector copied to clipboard
Output -> Input action does not work with float values
Describe the bug When passing an output config value to an input using the "Display -> Input action" loopback, the value is not passed on properly unless it is integer. If it is a float, the value results in a zero.
Steps To Reproduce Steps to reproduce the behavior:
- Add potentiometer input config ("pot-input"), read it to a MF variable called "test"
- Create output config ("test-output") for the same MF variable "test" and verify you can see the potentiometer value properly.
- Set the DISPLAY of test-output to "Input action" and send it to another MF variable, called "test2".
- Add an output config ("test2-output") for MF variable "test2". Verify that you see the same value twice, so far everything works.
pot-input => test-output => test2-output.
- Add a Transform modifier on test-output and set it to
$/2so 1023 becomes 511.5, but even values still produce an integer result.
Expected behavior The value should be passed on as-is
Actual behavior Integer values get passed, but if the value is a float, the receiving MF variable value becomes 0.
Details
- MobiFlight Version: beta
Additional context
The issue seems to be between modifiers and the Input Action. IF I do the division in the Input Action form, by setting Value to @/2, everything works properly.
relates #1832