Rather than initializing the rssi percentage lookup table at runtime
on the heap, we would like it to be stored in flash.
This change pre-computes the rssi lookup table.
On SPM4649T receivers with firmware versions at least 1.1RC9, the
serial data will contain an rssi value in dbm, as outlined in the
Remote Receiver Interfacing document section 8.3.1.
If the value received is greater than or equal to zero, the receiver
does not support rssi data, and the incoming value will be ignored.
However, if the value is negative, we can use the rssi value.
When we have a valid rssi, it gets mapped to a percentage from 0 to
100 as expected by mavlink. This mapping is constructed as a
logarithmic function over Spektrum's published minimum and maximum
rssi values, -92dBm to -42dBm as 0 to 100:
100 Log10[1 + (x - min) * (9 / (max - min))]
This change updates all calls to the dsm input rountes to return
the rssi value.
Note that one place this doesn't work with the px4io enabled.
There is a comment left in the absence of analog rssi that:
"we do not actually get digital RSSI regs[PX4IO_P_RAW_RC_NRSSI]".
This restriction has been left in place, as removing it exposes a
problem where the frequency of the control tick is greater than
that of valid dsm frames so the rssi isn't valid every cycle.
Platforms that provide HW versioning tend to have
more FLASH and can have a PX4IO as an option.
(E.G.) FMUv5. This change provides run time
decision to control the safety switch on
platfors that have BOARD_HAS_VERSIONING.
On platforms with no versioning and have
BOARD_HAS_STATIC_MANIFEST defined as a 1
The decision is compile time only. When a PX4IO
is present the fmu control of the safety is
not built.
Safety Switch is HW version dependent on having an PX4IO
So we init to a benign state with the _INIT definition
and use the non _INIT verion in the driver if the run time
decision is we do not have a PX4IO
The phyical led read was not returing the logical state
of the LED. Since they are active low, when on it was
returning 0 and the the negation operation in togggle
was makeing that a 1 which it already was.
Safety Switch is HW version dependent on having an PX4IO
So we init to a benign state with the _INIT definition
and provide the the non _INIT one for the driver to make a run time
decision to use it.
We also define the FMU GPIO_BTN_SAFETY and GPIO_LED_SAFETY alias
so the px4fmu will drrive will be built with the safety switch
code at compile time and have runtime control via the manifest
When BOARD_HAS_STATIC_MANIFEST is defined with a value of 1
and the board_config provides the BOARD_USES_PX4IO_VERSION
then the board_common will define
PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO
When BOARD_HAS_STATIC_MANIFEST is defined with a value of 1
and the board_config provides the BOARD_USES_PX4IO_VERSION
then the board_common will define
PX4_MFT_HW_SUPPORTED_PX4_MFT_PX4IO
It scales the yawspeed setpoint arbitrarily by default with 0.5.
This makes no sense because when you give a setpoint of 1rad/s then
you expect the setpoint to get executed. If you want manual yawspeed
response to be less agressive on the stick use the scaling parameter
for the stick MPC_MAN_Y_MAX.
Until now we replaced legacy position controller functionality inside
the flight task architecture to split up the huge position control
module into the different tasks and have a modular setup with a clear
setpoint interface. This commit removes all the legacy code and hard
switches to using the flight task architecture for multicopter.
This is done because maintaining and testing everything in parallel is
not sustainable. The architecture is by now tested to cover all basic
legacy functionality and missing corner cases can be fixed a lot easier
with the new architecture.