1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-24 00:35:20 +03:00
inav-configurator/js
Alberto García Hierro b9fef4e25c Fix double dispatch of MSP calls with the same code
Current MSP handling groups callbacks by their MSP command
and when a response comes back it calls all the pending handlers
with the same response object.

This works fine when all MSP calls are either pure input or pure
output (e.g. the have a non-empty payload in just one direction).
However, we've had some calls that have a payload in both directions
for some time, like MSPV2_SETTING. For those MSP commands, the
response will depend on the request, so calling all handlers on
the first response received produces the wrong results. It's also
problematic on handlers that expect any kind of response, since the
DataView object is reused, but its offset was never reset which
would result in the second handler getting an empty response.

Change this strategy to call just the first pending handlers for
the MSP command received in the response. While this is still
a theoretical race condition (there's no guarantee a sequence of
the same command with different payloads will be replied in the
same order as they were issued to the FC), it's the best we can
do unless we add some kind of nonce/token system to each MSP
request, which would incur a significant overhead.
2020-01-21 21:03:03 +00:00
..
libraries Fix app not starting in chrome 2019-06-09 13:11:09 +02:00
msp Fix double dispatch of MSP calls with the same code 2020-01-21 21:03:03 +00:00
protocols Make firmware flasher more robust 2019-07-16 19:56:58 +02:00
workers more strict 2014-08-24 23:36:17 +01:00
appUpdater.js offer update only if latest release is not prerelease 2019-02-13 09:24:04 +01:00
boards.js Cleanup and default to VCP board 2019-01-23 17:25:47 +01:00
data_storage.js Allow firmware of 2.4 family 2019-12-04 18:31:14 +01:00
debug_trace.js Move code for the debug trace window to an external script 2018-02-12 21:41:49 +00:00
defaults_dialog.js Basic framework to work with features 2019-11-21 18:28:52 +01:00
eventFrequencyAnalyzer.js Frequency analyzer for MSP frames 2017-01-18 19:10:29 +01:00
fc.js Show µs in mixer when "ONE" input is selected 2020-01-11 19:21:50 +01:00
feature_framework.js Improve Outputs handling 2019-11-21 19:52:28 +01:00
gui.js Cleanup servos tab 2019-09-23 19:03:08 +02:00
helpers.js Rebase CLI tab on latest CF 2018-11-29 14:26:02 +01:00
injected_methods.js Add maximum PITCH and ROLL angles to the PID tuning tab 2018-07-09 14:02:53 +01:00
intervals.js callback update improvements 2017-01-18 22:20:15 +01:00
localization.js various code improvements 2016-11-29 23:10:09 +01:00
logicCondition.js Report logic condiotion activation status 2019-09-14 12:55:16 +02:00
logicConditionsCollection.js Report logic condiotion activation status 2019-09-14 12:55:16 +02:00
logicConditionsStatus.js Report logic condiotion activation status 2019-09-14 12:55:16 +02:00
model.js Fix Nano Talon mixer 2018-07-22 08:20:36 +02:00
motorMixerRuleCollection.js motor tab updates 2018-04-05 14:11:11 +02:00
motorMixRule.js increased range for motor rules roll/pitch/yaw to -2/2 2018-04-11 09:09:58 +02:00
msp.js Add a workaround for uploading fonts on F3 from macOS 2018-05-19 11:35:28 +01:00
msp_balanced_interval.js adaptive intervals 2017-01-25 21:13:58 +01:00
outputMapping.js Fix some minor issues on mixer tab 2019-12-09 17:55:33 +01:00
periodicStatusUpdater.js Cleanup INAV 2.0.0 2019-10-26 22:30:59 +02:00
peripherals.js Change 'RunCam Split' to 'RunCam Device' 2017-10-19 16:51:48 +08:00
pid_controller.js improved PID controller 2017-01-21 21:41:25 +01:00
port_handler.js Remove Autoconnect 2019-04-27 19:24:14 +02:00
serial.js Increase timeout on serial port 2019-02-11 09:26:42 +01:00
serial_backend.js Merge remote-tracking branch 'origin/master' into release-2-3-0 2019-11-20 23:56:16 +01:00
serial_queue.js lower periodic tasks frequency 2019-02-11 10:36:44 +01:00
servoMixerRuleCollection.js Fix some minor issues on mixer tab 2019-12-09 17:55:33 +01:00
servoMixRule.js Backend for getting logic conditions from FC 2019-03-10 14:39:32 +01:00
settings.js Fix 2.1 compatibility issues 2019-05-25 13:51:08 +02:00
simple_smooth_filter.js refactoring 2017-01-21 19:07:53 +01:00
tabs.js Basic PID Tab rework 2019-11-21 22:20:44 +01:00
tasks.js lower periodic tasks frequency 2019-02-11 10:36:44 +01:00
timeouts.js timing methods extracted to separate classes 2017-01-18 15:54:45 +01:00
vtx.js Fix GUI VTX power settings 2019-03-24 17:58:53 +01:00
walking_average_filter.js refactoring 2017-01-21 19:07:53 +01:00