1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-24 00:35:34 +03:00
Commit graph

571 commits

Author SHA1 Message Date
Michel Pastor
85f98ecc01 Add MSP message for reading air speed 2018-03-01 04:00:35 +01:00
Konstantin Sharlaimov
a2a5854440
Merge pull request #2783 from iNavFlight/agh_msp_board_info
Output more information in MSP_BOARD_INFO
2018-02-18 13:33:43 +10:00
Michel Pastor
78afbc6c01 Small new MSPV2 messages changes 2018-02-18 02:33:24 +01:00
Alberto García Hierro
8ad2bb867c Don't use a whole byte to indicate VCP support
Instead, define that byte to indicate communication capabilities
and use bit 0 for VCP and bit 1 for software serial.
2018-02-17 12:13:52 +00:00
Alberto García Hierro
947bb3df77 Output more information in MSP_BOARD_INFO
- Report wether the board has OSD support
- Report wether the board uses VCP
- Include the full target name in the response
2018-02-16 23:17:48 +00:00
Konstantin Sharlaimov (DigitalEntity)
5ecd069173 Add MSPv2 DONT_REPLY flag 2018-02-13 22:06:44 +10:00
shellixyz
f00194c167 Improve battery monitoring (#2705)
* increase battery voltage resolution to 10mV
* increase battery voltage resolution to 10mV: update VBATT_HYSTERESIS
* increase battery voltage resolution to 10mV: fix telemetry and other places where vbat calculations needs to be divided by 10
* increase battery voltage resolution to 10mV: revert blackbox data to 100mV resolution because modifying the viewer is not trivial
* increase battery voltage resolution to 10mV: change new MSPv2 frame type names to follow convention

* smartport telemetry: remove wrong and now irrelevant comments

* Improve battery monitoring
* improve battery monitoring: fix/simplify the batteryAdcToVoltage function
* improve battery monitoring: Add OSD voltage decimals setting to OSD MISC menu
* improve battery monitoring: clean the batteryConfig struct
* improve battery monitoring: increase batteryConfig PG group version to 1
* improve battery monitoring: change capacity settings type from uin16_t to uint32_t (65Wh is not very large, it is about 6Ah for a 3S Li-Po)
* improve battery monitoring: rename capacity settings
* improve battery monitoring: improve OSD code
* improve battery monitoring: simplified taskUpdateBattery
* improve battery monitoring: use unfiltered vbat to decide if the battery is full
2018-02-02 12:28:34 +10:00
shellixyz
fd40892d8e Replace PASSTHROUGH with MANUAL flight mode (FW) (#2661)
* FW: add manual flight mode
* manual mode: separate roll and pitch expo
* manual flight mode: cleaning
* replace PASSTHRU mode with MANUAL mode
* manual mode: merge pitch and roll expo
* manual mode: add OSD menu for manual rates and expo
* manual mode: forgot to add yaw rate adjustment in OSD menu
* manual mode: add adjustments
* manual mode: move rates applications in fc_core
* group controlRateConfig settings by function
* group controlRateConfig settings by function: fix ALIENFLIGHTF3 default rates config
* manual mode rc adjustments: adapt to fc723121 changes
* manual mode: clean rc adjustments
* add new MSPv2 messages: MSP2_INAV_RATE_PROFILE and MSP2_INAV_SET_RATE_PROFILE
2018-01-31 19:44:43 +10:00
Pawel Spychalski (DzikuVx)
4480a768b7 fixed scaling of mixer values 2018-01-26 11:36:40 +01:00
Pawel Spychalski (DzikuVx)
8584cf50cd MSP2 frames to support mmix command over MSP 2018-01-26 11:17:31 +01:00
Konstantin Sharlaimov
a198568ac2
Merge pull request #2624 from iNavFlight/de_update_calibration_api
Update calibration API
2017-12-31 23:32:43 +10:00
Konstantin Sharlaimov (DigitalEntity)
03e2f4e0f5 Make MSP_CALIBRATION_DATA return accelerometer calibration bitmask 2017-12-28 20:19:58 +10:00
Konstantin Sharlaimov (DigitalEntity)
66da4ab012 Fix compilation with undefined USE_OPTICAL_FLOW 2017-12-22 17:31:34 +10:00
Konstantin Sharlaimov (DigitalEntity)
f3422ce423 CXOF flow sensor (UART)
Enable opflow on sparky2
Optical flow MSP updates
2017-12-22 17:21:00 +10: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
7a1491e158 Prepend USE_ prefix to CPP directives for enabling features
Prepended to: 'ACC', 'GYRO', 'BARO', 'MAG', 'LED_STRIP',
'SPEKTRUM_BIND', 'SERIAL_RX', 'BLACKBOX', 'GPS', 'GPS_PROTO_UBLOX',
'TELEMETRY', 'TELEMETRY_LTM', 'TELEMETRY_FRSKY', 'CMS',
'GPS_PROTO_NMEA', 'GPS_PROTO_I2C_NAV', 'GPS_PROTO_NAZA',
'GPS_PROTO_UBLOX_NEO7PLUS', 'GPS_PROTO_MTK', 'TELEMETRY_HOTT',
'TELEMETRY_IBUS', 'TELEMETRY_MAVLINK', 'TELEMETRY_SMARTPORT',
'TELEMETRY_CRSF', 'PWM_DRIVER_PCA9685', 'PITOT', 'OSD',
2017-12-04 13:01:24 +00:00
Konstantin Sharlaimov (DigitalEntity)
aa3ce0faad Fix incorrect presentation of data in RAW_IMU message 2017-11-29 22:33:21 +10:00
Martin Budden
089680ffce Scale acc value in acc sensor code 2017-11-28 07:22:31 +00:00
Alberto García Hierro
c4d2847239 Add support for MSP_NAME and MSP_SET_NAME
Allow getting and setting the craft name via MSP, so the
configurator can now change its value.
2017-11-18 22:57:54 +00:00
Jonathan Hudson
5b27b667bf another attempt at consensus on MSP2_INAV_STATUS 2017-11-11 15:50:56 +00:00
Jonathan Hudson
73b4f3157c Implement MSP2_INAV_STATUS as a variation an improved MSP_STATUS_EX,
providing a 32 bit armingFlags (no other changes).
2017-11-01 17:36:43 +00:00
Konstantin Sharlaimov
773636ad2d Merge pull request #2274 from fiam/mspv2_settings
Add support for getting and setting arbitrary settings via MSPv2
2017-10-12 18:52:18 +10:00
Konstantin Sharlaimov
59570f0af8 Merge pull request #2296 from fiam/osd_alarms
Add OSD alarms for distance and negative altitude. Refactor alarms to use SI units internally.
2017-10-12 18:51:55 +10:00
Alberto García Hierro
ea29cc3241 Add setting_get_value_size() function and use it for MSP
Used to reply to MSP2_COMMON_SETTING, since we're just copying
the value from memory to the wire. Will be used in more places
eventually.
2017-10-11 18:49:46 +01:00
Alberto García Hierro
dd797dfc91 Add missing range check when setting VAR_FLOAT settings 2017-10-11 18:06:36 +01:00
Alberto García Hierro
0d10fe7e13 Correctly return settings of type VAR_UINT16
Its case was breaking out if switch rather than falling through
to VAR_INT16, which writes the value to the wire.

Kudos to @stronnag for catching it!
2017-10-11 18:06:36 +01:00
Alberto García Hierro
ff18b726d3 Add support for getting and setting arbitrary settings via MSPv2
Add MSP2_COMMON_SETTING for retrieving arbitrary settings and
MSP2_COMMON_SET_SETTING for setting them. This exposes any setting
which was only available from the CLI via MSP now.

Add support in settings.rb to generate a JSON file with all the
settings, their types and their possible values for settings using
a table. This file can be used by clients to properly format
messages for settings over MSP.
2017-10-11 18:06:36 +01:00
Konstantin Sharlaimov
cfe2a7b9ce Merge pull request #2244 from StewLG/DistanceFailsafe
Configurable Minimum Failsafe Distance Procedure
2017-10-11 23:39:53 +10:00
Stewart Loving-Gibbard
12ced110d7 Another batch of cherry picks 2017-10-09 11:35:57 -07:00
Stewart Loving-Gibbard
6062411740 This adds a minimum failsafe distance behavior that only operates when the craft is below the Minimum Failsafe Distance. The distance is configurable, as well as the behavior that will be taken. It defaults to off (0 distance). 2017-10-09 11:28:53 -07:00
Alberto García Hierro
a9081d9b86 Add OSD alarms for distance and negative altitude
Distance alarm makes the OSD blink when distance to home goes
above a given threshold. Default is 1000m and it always works
on meters to avoid performing unnecessary arithmetic operations
for displaying the distance indicator. Unit conversion is done
in the configurator instead. Zero disables the alarm.

Negative altitude alarm blinks when negative altitude is below
the given threshold. Note that the alarm is a positive number,
but will trigger with -ALT > NEG_ALT_ALARM. Default value is 5
(which means -5 meters). Again, conversion is pushed to the
configurator.

Fixes #2242 and #2199
2017-10-09 19:08:28 +01:00
Paweł Spychalski
855bb46e30 Merge pull request #2173 from iNavFlight/dzikuvx-msp-vtx-config
added MSP_VTX_CONFIG & MSP_SET_VTX_CONFIG
2017-10-09 19:53:53 +02:00
Konstantin Sharlaimov (DigitalEntity)
6bfee2caa7 Add opflow_hardware to MSP_SENSOR_CONFIG 2017-10-09 21:47:14 +10:00
Konstantin Sharlaimov (DigitalEntity)
0f2a814b57 Optical flow sensor code initial implementation (phase 1) 2017-10-09 20:51:26 +10:00
Konstantin Sharlaimov (DigitalEntity)
67166e021f Merge remote-tracking branch 'origin/development' into de_rx_and_failsafe_cleanup 2017-10-07 10:14:33 +10:00
Konstantin Sharlaimov (DigitalEntity)
66db00c21c Align base format with Betaflight, fix bugs 2017-10-06 22:14:02 +10:00
giacomo892
d12b230db2 fix typos in function names 2017-10-03 17:36:12 +01:00
Martin Budden
8c36df3ea1 Split box code out of MSP 2017-10-02 09:21:17 +01:00
Konstantin Sharlaimov
631ceaed09 Merge pull request #2110 from iNavFlight/de_msp_boxnames_overflow_check
Check for buffer overflow in MSP_BOX_NAMES reply
2017-09-19 14:31:12 +10:00
Raphael Coeffic
a4becb1401 added MSP_VTX_CONFIG & MSP_SET_VTX_CONFIG 2017-09-18 13:15:47 +02:00
Konstantin Sharlaimov
f571000017 Merge branch 'development' into de_rx_and_failsafe_cleanup 2017-09-16 10:17:33 +10: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
c2943dbb24 Force an OSD redraw after MSP_SET_OSD_CONFIG
Moving elements or changing the units could cause ghosting otherwise
2017-09-12 22:29:55 +01:00
Konstantin Sharlaimov (DigitalEntity)
dc1b4224cc Deprecate RX-related features; Introduce receiver_type CLI setting 2017-09-13 00:12:04 +10:00
Alberto García Hierro
8158d555fa Rename MSP2_INAV_TZ and MSP2_INAV_SET_TZ
MSP2_COMMON_TZ and MSP2_COMMON_SET_TZ are the new names. Also,
move the definitions to the file msp_protocol_v2_common.h
2017-09-11 12:23:03 +01:00
Alberto García Hierro
622e4bf7dd Add MSP2_INAV_TZ and MSP2_INAV_SET_TZ MSP commands
MSPv2 only, defined as 0x1001 and 0x1002
2017-09-11 12:23:03 +01:00
Alberto García Hierro
5e6658b9d9 Make cmdMSP uint16_t
uint8_t can't hold MSPv2 commands, so we need to increase its size
in mspFcProcessOutCommand(), mspFcProcessInCommand() and
mspFcProcessCommand().
2017-09-11 12:23:03 +01:00
Alberto García Hierro
3eec0d07e5 Add MSP_RTC message
Returns the RTC from the FC to the sender. Note that MSP_SET_RTC
has been changed to 247 and MSP_RTC is now code 246. This follows
the convention of other MSP message pairs, where the getter has
a lower number than the setter.

Since there are still no MSP senders which send these messages,
there should be no problem with the code modification.
2017-09-11 12:23:03 +01:00
Martin Budden
af12945f43 Added Safe suffix where previously ommitted
Add sbufWriteDataSafe function
2017-09-11 10:17:38 +01:00
Martin Budden
433d9a784c Additional streambuf safe functions and MSP conversions to safe functions 2017-09-11 09:01:46 +01:00