1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-21 15:25:29 +03:00
Commit graph

14 commits

Author SHA1 Message Date
Pawel Spychalski (DzikuVx)
339b1047e0 Add new stateds 2020-02-18 17:39:38 +01:00
Pawel Spychalski (DzikuVx)
dd5d586a67 Rename state FIXED_WING to AIRPLANE_ROVER_BOAT that is closer to reality 2020-02-18 15:10:16 +01:00
Paweł Spychalski
b643a83412
On MR allow airmode to be sticky and activated by throttle threshold (#4634)
* on MR allow airmode to be sticky and activated by throttle threshold

* fix bug

* make airmode activation threshold configurable

* Keep arimore activation flag as state

* Review changes
2019-04-29 22:23:29 +02:00
Pawel Spychalski (DzikuVx)
cf431d7d5c Remove unused variable 2019-04-24 21:08:12 +02:00
Pawel Spychalski (DzikuVx)
6ea467bd4c Remove sticks arming 2019-04-24 21:08:12 +02:00
Alberto García Hierro
d524d8c8cc Refactor handling of RC input data
- Remove globals rcData and rcRaw
- Use accesor functions to retrieve RX input data
- Refactor rx.c to use an array of structs instead of multiple arrays
- Drop the RC Preview menu from CMS. Implementing this without
globals requires significant flash and the usefulness of this menu
is questionable. If we get complains, we can add it back later.

Flash usage goes down ~250 bytes due to the removed menu. Final
binary is mostly unaffected, since LTO is able to inline the new
accessor functions in most cases.
2019-03-10 21:50:05 +00:00
Alberto García Hierro
59eac2b046 Cleanup rc_modes.c
- Replace usages of 25 as a magic number with CHANNEL_RANGE_STEP_WIDTH
- Remove constrain() call from isRangeActive(), since it's not needed

Should slightly improve performance and saves 24 bytes of flash.
2018-06-25 16:08:20 +01:00
giacomo892
46ef27db85 Implement CRUISE MODE for Fixed Wing (#3311)
* Nav cruise mode (2D/3D)
* CRUISE FLM on LTM telemetry
2018-06-16 18:27:22 +02:00
Alberto García Hierro
c5401d74d2 Initial support for multiple OSD layouts
- Add 3 new boxes that can be controlled by a switch to toggle
between the default and 3 alternate layouts.
- Add new MSP cmds to retrieve/set the whole layouts, the OSD alarms
and the preferences.
- For now, CMS and settings just see the default layout. This
will be addressed on future commits.
2018-04-23 11:28:04 +01:00
Alberto García Hierro
d5ba9c4eec Rename a few more flags
NAV -> USE_NAV
FIXED_WING_LANDING -> NAV_FIXED_WING_LANDING
ASYNC_GYRO_PROCESSING -> USE_ASYNC_GYRO_PROCESSING
BOOTLOG -> USE_BOOTLOG
STATS -> USE_STATS
2017-12-04 15:28:31 +00:00
Alberto García Hierro
9fd3b4286f Add a proper type for bit arrays
- Define type bitArrayElement_t as uint32_t.
- Add BITARRAY_DECLARE() macro, which declares a bit array given
the number of desired bits, taking care of aligment and rounding
up its size to a multiple of 32.
- Change bit array functions to accept bitarrayElement_t* rather
than void*.
- Replace bit array declarations with BITARRAY_DECLARE() macro
- Add BITARRAY_FIND_FIRST_SET() macro to call bitArrayFindFirstSet()
without explicitely specifying its size.
- Update comments in bitarray.h to reflect these changes.
2017-09-15 10:19:19 +01:00
Alberto García Hierro
afc0a3d413 Respect feature AIRMODE
While the AIRMODE feature is available in the CLI, the current
code only takes BOXAIRMODE into account (triggered by an RC channel).

This PR introduces an isAirmodeActive() function which also returns
true when if the AIRMODE feature has been set, not only when BOXAIRMODE
is active. Checks for IS_RC_MODE_ACTIVE(BOXAIRMODE) have been replaced
by calls to isAirmodeActive().

This will allow adding a simple switch in the configurator, as
reported in https://github.com/iNavFlight/inav-configurator/issues/154.

Eventually, isAirmodeActive() might be modified to always
return true in FW, since there's no reason to disable it in FW
models AFAIK.
2017-08-20 20:16:48 +02:00
Konstantin Sharlaimov (DigitalEntity)
3dee85cb46 Add STATIC_ASSERT check for box mode count 2017-08-08 23:14:10 +10:00
Konstantin Sharlaimov (DigitalEntity)
c03c7d6bce Add bitarray support; Migrage rcModeActivationMask to bitArray 2017-08-08 23:14:10 +10:00