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

180 commits

Author SHA1 Message Date
jflyper
d8ff795327 Fixup fc_msp.c (and fc_core.c) 2017-06-11 01:49:52 +09:00
Adrian Miriuta
64c3df565b enable BOXHEADADJ when HEADFREEE is enabled, to enable correction of gyro drift 2017-06-05 10:42:40 +02:00
Petr Ledvina
2eb36ed969 Improve box serialization
- active boxes use bitmask instead of array
- active box serialization is loop based instead of huge expression

Was included in
https://github.com/cleanflight/cleanflight/pull/2075/commits, but never
ported to BF and eventually lost

Conflicts:
	src/main/fc/fc_msp.c
2017-05-28 14:59:46 +02:00
Dan Nixon
7b6dc1b005 Small fixes from #3133 2017-05-23 17:07:18 +01:00
borisbstyle
29917db6f2 Merge pull request #3133 from DanNixon/osd_stats
Allow customisation of the OSD stats screen
2017-05-23 14:07:19 +02:00
Dan Nixon
5f4a72ad5b Add MSP API features for OSD stat screen toggling 2017-05-23 12:44:55 +01:00
Michael Keller
8b35949e9a Added PASSTHRU_MODE mode for MIXER_CUSTOM_AIRPLANE. 2017-05-17 10:11:13 +12:00
Rodrigo Pérez
01912dc0ba Rename OSD SW to OSD DISABLE SW 2017-05-10 23:08:11 -03:00
Martin Budden
71546410de Rearrange PID array to be array of PIDs 2017-05-06 11:06:47 +01:00
Hydra
22147105fb CF/BF - First cut of MSP current sensor.
How it works:
1. Current Meter Source on FC is set to MSP/OSD Slave by user.
2. On reboot FC sends MSP_ANALOG to OSD Slave.
3. OSD Slave listens for incoming MSP as usual.
4. OSD responds to MSP as usual.
6. The FC recevies the data from the OSD Slave and updates the MSP
Current Meter.
2017-04-29 20:57:08 +01:00
Michael Keller
63552348c0 Merge pull request #2737 from betaflight/remove-msp-cruft
CF/BF - Remove more MSP cruft
2017-04-21 12:24:57 +12:00
Hydra
723831b579 SPRACINGF3NEO - Use RTC6705 clk hack.
CF/BF - Fix typo in max7456DmaInProgress.  Always define an
implementation even when there is no TX-DMA.

CF/BF - Ensure that max7456 communication does not disrupt RTC6705
communication when using the same SPI port for both.

CF/BF - Port RTC6705 to use the VTX API.

* Support VTX channel/band/power on OSD for ALL vtx APIs - previously it only supported RTC6705.
* Remove all FEATURE_VTX usage.
* Remove all `#define VTX` usage.

Note that due to the async nature of tramp/smartaudio it's not possible
to know the current band/channel after requesting a change (as the
request hasn't been processed) so it makes no sense to try and save the
config - and on the tramp/smartaudio vtx the vtx maintains it's state.
So on an RTX6705 equipped FC the user should now MANUALLY save the
config using the save config stick position.

CF/BF - Move CMS for RTC6705 into vtx_rtc6705.c for consistency with
other VTX CMS menus.

CF/BF - Update RTC6705 via SOFT SPI to use VTX API.

* Achieved by simply aligning the API at the driver level and removing
all legacy conditional compilation checks.

CF/BF - Use new IO for RTC6705 CLK Hack

CF/BF - Port VTX button from CF v1.x.

Features:
* Channel Cycle
* Band Cycle
* Power Cycle
* Save Settings
* Works with any VTX using VTX API.

CF/BF - Allow support for Internal and External VTX - External takes
precedence when configured.

CF/BF - Fix display of VTX power in CMS.

* Issue occured when CMS was transitioned from integer to list of
strings.

CF/BF - Disable SMARTAUDIO and TRAMP on the SPRacingF3NEO due to flash
size.

CF/BF - Cleanup const usage of bass-by-value parameters.  Cleanup
naming.

CF/BF - Cleanup naming.  Removing noise-words. Improving consistency.

CF/BF - Improve readability by further naming cleanups.

CF/BF - Remove some magic numbers in the RTC6705 VTX code.

CF/BF - Use braces on some procedural macros.

CF/BF - Improve code readability by renaming rtc6705SetChannel to
rtc6705SetBandAndChannel.

CF/BF - Remove editor mishap.

CF/BF - Make the rtc6705Dev variable static.

CF/BF - remove duplicate state variablertc6705Dev_t - vtxDevice_t had
all we needed.  Use brackets on some procedural style macros.  Make all
the vtx vtable static const.

CF/BF - making some declarations const.

CF/BF - Fix vtx_power maximum value (out by one).
2017-04-21 11:49:31 +12:00
Hydra
df9114a778 CF/BF - Fix RSSI output via MSP. 2017-04-20 23:10:07 +01:00
Hydra
ad6dbfee5c CF/BF - Delete unused 'angleAtMin' and 'angleAtMax'. 2017-04-17 22:24:04 +01:00
Hydra
565993a3e8 CF/BF - Fix MSP_SET_SERVO_CONFIGURATION.
In CF 1.x the structure was packed, resulting in a size of 14 bytes.
The servoParam_t is not currently packed, likely due to recent PG group
implementation, so the test for data length in the MSP command fails.
2017-04-17 22:22:17 +01:00
Martin Budden
2493c214b0 Created subdirectories in drivers directory 2017-04-12 08:06:22 +01:00
Hydra
be063ebbbf CF/BF - Remove usage of USE_FC based on PR discussion decisions. Add
USE_VIRTUAL_CURRENT_METER.
2017-04-12 00:39:27 +01:00
Hydra
b4dc3b53f5 CF/BF - Fix more compiler warnings. 2017-04-12 00:39:27 +01:00
Hydra
a140aea013 CF/BF - NAZE fix compiler warnings. 2017-04-12 00:39:27 +01:00
Hydra
2b1dac4c6d CF/BF - First cut of allow building of the OSD SLAVE board without all
the flight controller code.

Likely the dependencies can be further improved.  This is a
minimal-impact solution while there are a lot of other Betaflight PR's
still pending.
2017-04-12 00:39:27 +01:00
Michael Keller
9c29475ba4 Changed float parameters to int16 in 'cli.c'.
Fixed buffer length used for 'ftoa'.

Got rid of magic numbers, replaced 'digitalIdlePercent' with 'digitalIdleValue'.
2017-04-10 13:11:01 +12:00
Michael Keller
ce8c5fbd79 Merge pull request #2760 from mikeller/reworked_altitude_estimation
Reworked altitude estimation. Made it work when ACC is disabled.
2017-04-10 13:00:16 +12:00
Hydra
9bb0e30f1f CF/BF - Reinstate boardType from CF v1.x to allow detection of OSD slave
boards by the configurator.
2017-04-09 14:17:59 +01:00
Hydra
0f7a986003 CF/BF - Allow OSD slave to be configured.
This highlights the face that MSP_SET_OSD_CONFIG is ill-conceived.  See
Cleanflight v1.x where multiple commands are used - one for video config
and one for element config.

In light of other recent changes it's possible a 3rd command is needed,
for unit selection and alarms.
2017-04-09 14:17:58 +01:00
Hydra
ca5bafeab9 CF/BF - SPRACINGF3OSD initial target support inc support for OSD SLAVE via MSP_DISPLAYPORT.
OSD is tested and working on an SPRACINGF3EVO stacked with an SPRACINGF3OSD.
2017-04-09 14:17:17 +01:00
Hydra
18454ad705 CF/BF - Reduce flash usage by cleaning up serializeBoxNamesReply. 2017-04-09 13:48:19 +01:00
mikeller
6a03b48e7f Reworked altitude estimation. Made it work when ACC is disabled. 2017-04-08 22:54:44 +12:00
Michael Keller
e84cbe5fb5 Merge pull request #2818 from mikeller/use_permanent_mode_ids_in_cli
Changed CLI to use permanent mode ids.
2017-04-07 09:06:35 +12:00
Michael Keller
8a7241f6cb Changed CLI to use permanent mode ids. 2017-04-06 10:21:07 +12:00
borisbstyle
6899c66a05 Add anti gravity as feature and mode
3.1.7 mergebacks
2017-04-05 15:27:52 +02:00
Hydra
4f743a0b40 CF/BF - Update MSP_GPS_CONFIG 2017-04-02 19:57:58 +01:00
blckmn
c0d18280d5 Removed feature SDCARD and BLACKBOX
Now uses blackboxConfig()->device instead. Requires co-ordination with configurator.
2017-03-28 21:29:50 +11:00
mikeller
11459f7bb9 Reinstated 'MSP_BF_CONFIG' / 'MSP_SET_BF_CONFIG' as workaround to make it work with Betaflight configurator. 2017-03-23 00:17:11 +13:00
Hydra
1c33cb1cf2 CF/BF - Rename MSP_BOARD_ALIGNMENT to MSP_BOARD_ALIGNMENT_CONFIG 2017-03-21 21:17:25 +00:00
Hydra
601b302c5b CF/BF - Rename MSP_3D to MSP_MOTOR_3D_CONFIG.
now it's really obvious that 3d throttle deadband really doesn't belong
in it.  If you need 3D specific ESC/MOTOR configuration use this.  If yo
need specific 3D RX configuration use other commands like
MSP_RC_DEADBAND, etc.
2017-03-21 21:17:17 +00:00
Hydra
5d602d69ff CF/BF - Delete old/unused MSP commands. Cleaning MSP naming a little.
The commands that are deleted have been deprecated for a LONG time.
They have long been superceed with more specific commands.

Fix voltage meter config to include id and type in the subframe.
2017-03-21 21:17:06 +00:00
Hydra
067d9e619f CF/BF - Include id and type in the voltage meter config subframe.
It was supposed to be like this and now matches the current meter
config.
2017-03-19 18:25:26 +00:00
Hydra
4554019c52 CF/BF - fix naming of currentMeterVirtualState_t 2017-03-19 10:40:25 +00:00
Hydra
d331ceff0b CF/BF - replace magic numbers for subframe lengths. 2017-03-19 10:40:15 +00:00
Hydra
382ef9de68 CF/BF - remove unneeded braces in MSP_ANALOG 2017-03-19 10:40:14 +00:00
Hydra
1cd4227823 CF/BF - separate the virtual and adc current sensor configuration.
update the MSP configuration of current and voltage sensors to use IDs.

revert the i2s_bst changes, since TBS won't be updating their firmware
there is no point adding new features to it, we just need to keep it
compatible
2017-03-19 10:40:12 +00:00
Hydra
2f99749003 CF/BF - add support for reading all voltage and current meters via MSP.
Refactored current meter API and state, now it's more closely aligned
with the the voltage meter API.
2017-03-19 10:40:11 +00:00
Hydra
b0c49caa3d CF/BF - update MSP_BATTERY_STATE based on feedback. 2017-03-19 10:40:10 +00:00
Hydra
f3e740c598 CF/BF - refactor voltage refresh/read api. update voltage/current msp code
msp code is still unfinished, but the plan is clearer now.

move some defaults from battery.h and allow targets to override them.

define ID's for all voltage and current sensors, the idea being a list
of ids wil lbe created for each build which will allow all the voltage
and current meters to be exposed via MSP.
2017-03-19 10:40:07 +00:00
Hydra
15241b1955 CF/BF - cleanup notes regarding the design choices that were made regarding
MSP_VOLTAGE_METER_CONFIG/MSP_CURRENT_METER_CONFIG.
2017-03-19 10:40:05 +00:00
Hydra
c6d1148134 CF/BF - delete legacy multiwiiCurrentMeterOutput setting. 2017-03-19 10:40:04 +00:00
Hydra
067d3c0ac2 CF/BF - First cut of Current/Voltage/Battery cleanup.
many refactorings, bugs squished, concerns separated,
single-responsibility violations fixed and performance optimizations.
2017-03-19 10:40:03 +00:00
DieHertz
0b100bf167 Fixed rxfail and rxrange CLI commands 2017-03-16 23:10:10 +03:00
Martin Budden
1964362dce Removal of USE_PARAMETER_GROUPS 1 2017-03-09 22:03:59 +00:00
Martin Budden
f1ce19167f Converted target config.c files to PG - PG CLI 6 (#2578)
Converted CLI and target config.c files to PGs
2017-03-08 23:26:37 +00:00