Since in RX_NONE bit is undefined, bit_check() will always return
true. Fix is just removing RX_NONE from the available RX types
on versions using feature bits for RX, since they won't allow
not having a RX configured (FC will fall back to RX_PPM).
Fixes#287
Chrome disallows synchronous URL loading, so all functions requiring
the JSON definitions for the settings over MSPv2 need to be async.
This required rewriting MSPHelper._getSetting() and all its callers
using promises.
Fixes#284
- Add a json file with the types of all settings, generated by
the settings generator on INAV.
- Implement MSPV2_SETTING and MSPV2_SET_SETTING, which gives us
access to any value exposed via settings.
- Use this to set small_angle to 180 in FW presets.
* Properly hiding/showing relevant controls for Minimum Failsafe Distance according to version (>= 1.7.4)
* Fixing bad maximum for centimeters distance
Had not realized developer branch was version 1.7.4; I had started this PR on master which which was on 1.7.3. Which explains my initial confusion about what to put here.
I believe everything works and is OK, but I am unclear about MSP/FC/Configurator versioning, so some of what I've done here may not be correct, or may need to be done differently. I would appreciate guidance/explanation.
Name RX_PARALLEL_PWM was confusing, so it's been renamed to
just RX_PWM.
Values for RX_PWM and RX_PPM were swapper, they're now the correct
ones.
Set the order of the rx types as serial, ppm, pwm, spi, msp and none.
Allow versions using the feature bits to select RX_NONE by clearing
all relevant bits in the features.
OR the high byte of the MSPv2 code with the "code" variable rather
than with this.message_length_expected. This wasn't caught earlier
because it would work for MSPv2 commands with the high byte set to
zero anyway.
Implement a combobox selector for the receiver type, showing
just the options for the specific type (e.g. selecting serial
receiver reveals the combobox for the serial protocol).
On INAV > 1.7.3 read and write receiver type to RX_CONFIG rather
than to feature bits. Note that this will break the configurator
in builds with version = 1.7.4 before https://github.com/iNavFlight/inav/pull/1596/files
is applied.
Implement groups which can be declared in any order including
any item in the order deemed more useful. This way we no longer
need to put elements ordered by their osd_items_e value.
Also, elements and even groups can be disabled when the features
or hardware required for drawing them is not present or not
enabled.
MWC side detection is done by sending an MSPv1 message for
MSP_API_VERSION. If the MSP_VERSION supports MSPv2 (>= 2.0.0),
then the rest of the messages for the session will be MSPv2 only.
Setting the feature also hides the mode from the modes tab, since
the FC won't register the BOXID as an active one. FC support
detection is based on INAV version >= 1.7.3, since support for
the AIRMODE feature has been advertised by previous releases
but it's not really supported (it does nothing).
Support for INAV is at https://github.com/iNavFlight/inav/pull/1949Fixes#154
add peripherals column on ports page
fixed ports page will show the rcsplit with apiversion less 1.27.0
move the modeName adjust function to peripherals.js, and add failsafe modename not update when rcsplit available
cleanup
clean up