Commit Graph

179 Commits

Author SHA1 Message Date
Martin Budden 23f158913e Moved time functions out of system.h into time.h 2017-05-26 14:03:28 +01:00
Anders Höglund 2463d5164e Merge pull request #3072 from ledvinap/fix-sitl-warnings
Fix SITL warnings
2017-05-16 11:18:10 +02:00
Petr Ledvina 58212464c5 Fix SITL warnings 2017-05-15 19:49:15 +02:00
rav 75089ea24c fix build errors 2017-05-11 23:10:00 +02:00
jflyper 4b80bceb1f Rebased on to master 2017-05-07 22:26:47 +09:00
J Blackman 0a37e76a37 Merge pull request #2922 from jflyper/bfdev-fix-resource-command-output
Fix resource command outputs
2017-05-06 13:26:53 +10:00
jflyper 9461672b46 Make inverter resource configurable
Add XXX comment about inverterConfig size

Fixed non-USE_INVERTER case

Moved inverter pin to serialPinConfig_t

Various improvements

Per @ledvinap ’s comments.

Only include "drivers/serial.h" from inverter.h

SERIAL_PORT_UART{4,5}, not _USART{4,5}

Dah!

Avoid magic number

Prepare for SERIAL_PORT_IDENTIFIER_TO_INDEX change (#3015)
2017-05-05 02:34:50 +09:00
Martin Budden 1c9e5598ce Allow high serial baudrates for OpenLager blackbox logging 2017-05-01 09:43:01 +01:00
mikeller a2a9c4d05d Fixed buffer length used for ftoa. 2017-04-26 22:06:54 +12:00
Michael Keller 44ed1d2091 Merge pull request #2920 from mikeller/fix_cli_negative_values
Fixed setting of negative values in CLI.
2017-04-24 23:16:26 +12:00
jflyper 8007303df3 cliPrintLinefeed() is the consensus? 2017-04-24 18:03:30 +09:00
jflyper 2034895b27 Per line feed rule 2017-04-24 14:49:13 +09:00
Hydra 9726e52a54 CF/BF - Fix HoTT telemetry.
Two issues:
1 - failure to work on softserial ports.

The TX pin was not allocated due to the initial port mode.

HoTT telemetry is different in that it changes the serial port mode
between sending and receiving.

This change opens the port in RX/TX mode so that both RX and TX pins are
initally allocated.

Test scenario:
* HoTT on SoftSerial 1
* Diode connecting between RX and TX pins.

2 - bidirectional hardware ports were not supported.

Renamed `sport_halfduplex` to `tlm_halfduplex`.  The setting is now used
by sport and hott telemetry.
2017-04-23 11:30:29 +01:00
mikeller 485a8ef37f Fixed setting of negative values in CLI. 2017-04-23 14:37:58 +12:00
jflyper 0eb2b2b394 Hmm... 2017-04-23 11:21:45 +09:00
jflyper 3697f19c8c Some more savings.
This change will save 16B for F4 and F7 (no difference for F1 and F3).
2017-04-23 03:53:07 +09:00
jflyper 0aa40e822a Space-saving 2017-04-23 03:14:21 +09:00
jflyper 07b1918acd Fix resource command outputs 2017-04-23 03:05:17 +09:00
Michael Jakob 278350b7e6 Fix alignment of tasklist output 2017-04-22 17:45:06 +02:00
Dominic Clifton c997e634da BF - Fix incorrectly merge conflict resolution. 2017-04-21 19:27:55 +01:00
Dominic Clifton 970f193dd7 CF/BF - Extract cli settings so they can be re-used.
CF/BF - Save 1280 bytes of flash and delete over 300 lines of code by
removing giant switch statement and static variables in the CLI.

fix

CF/BF - Remove some conditional code because there is a copy of every PG
so it will always be found*.

* unless a developer makes an error in the value table by specifying an
invalid PG.

CF/BF - Remove final usages of getCurrentAndDefaultConfigs to save more
flash space.

CF/BF - Change CLI command 'dump showdefaults' to simply 'dump defaults'.

* This will save a few bytes of flash space due to string re-use of the
'defaults' string.

CF/BF - Save a few more bytes by re-using the 'defaults' string again.

CF/BF - Fix CLI not being size optimized.

* The file had moved but the makefile was not updated to reflect that.

CF/BF - Add 'fc_init.c' and 'settings.c' to the size optimizations list.

CF/BF - Add some config source files to the size-optimized list.

CF/BF - De-duplicate CR/LF code by using appropriate methods. Promote
additional string re-use.

* This saves quite a lot of space when the file is size optimized, but grows it otherwise.

CF/BF - Further flash savings by removing more CR/LF on the
cliDump/cliDefaultPrintf format strings.

* It turns out that all the format strings ended in CR+LF so they could
all be removed.

CF/BF - Fix LF+CR being used instead of CR+LF for further flash savings.
2017-04-21 12:34:13 +12: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
Michael Keller 7a453bf4d1 Merge pull request #2894 from betaflight/vtx-rtc6705-api
Cleanup VTX api for RTC6705 via SPI and SoftSPI and add button support to SPRACINGF3NEO.
2017-04-21 12:16:22 +12:00
Michael Keller c838ab5af8 Merge pull request #2874 from TheAngularity/patch-1
align_board_xxx - only positive values allowed
2017-04-21 11:51:41 +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
Martin Budden 9032c3cbfd Merge pull request #2877 from TheAngularity/patch-2
fixed blackbox devicelist
2017-04-18 08:16:23 +01:00
borisbstyle 769f72a0a6 Merge pull request #2570 from ethomas999/addHorTiltEffectCmds2
Add horizon_tilt_effect command (2)
2017-04-17 23:37:29 +02:00
Dean Brestel 6b82b803cc Fixed servo cli to process correct arguments. 2017-04-17 22:26:40 +01:00
Hydra ad6dbfee5c CF/BF - Delete unused 'angleAtMin' and 'angleAtMax'. 2017-04-17 22:24:04 +01:00
TheAngularity f0d07753d3 fixed blackbox devicelist
selecting bb device was broken in configurator ... this solves the problem
2017-04-13 20:14:03 +02:00
TheAngularity 09cbca2a02 align_board_xxx - only positive values allowed
fixed #2866
2017-04-13 12:35:07 +02:00
Martin Budden 996e8b31d9 Merge pull request #2782 from martinbudden/bf_osd_debug
Added debug fields to OSD
2017-04-12 17:18:18 +01:00
ethomas999 8167892604 Added horizon_tilt_effect command
and horizon_tilt_expert_mode command.
Modified 'calcHorizonLevelStrength()' function.
Changed 'd_level' (D8[PIDLEVEL]) default from 100 to 75
Added horizon static float vars
2017-04-12 10:41:54 -04:00
Martin Budden 2493c214b0 Created subdirectories in drivers directory 2017-04-12 08:06:22 +01:00
Martin Budden a9bb3fb8f6 Merge pull request #2783 from martinbudden/mb_crash_recovery
Added experimental crash detection and recovery
2017-04-12 07:57:52 +01:00
Hydra 17a430e5f9 CF/BF - Fix missing #ifdef around the virtual current meter settings. 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
Martin Budden 1dc5f88820 Added crash detection and recovery 2017-04-11 22:58:18 +01:00
Martin Budden 63b7f18a00 Merge pull request #2649 from martinbudden/bf_cli_sensors
Optimised sensor lookup tables in cli to save ROM
2017-04-11 22:23:36 +01:00
Martin Budden 3a672c82e8 Merge pull request #2849 from martinbudden/bf_fake_accgyro_locks
Added locking to fake gyro and acc
2017-04-11 19:05:00 +01:00
Martin Budden 0219d6adc7 Updated accgyro locking. Printf tidy 2017-04-10 14:54:25 +01:00
Michael Keller e66b74579b Changed CLI variables to use a union. Some build fixes. 2017-04-10 19:12:41 +12: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
Michael Keller 572c5762d5 Merge pull request #2847 from wind0r/clean_cli
remove double featureConfigCopy
2017-04-10 11:50:16 +12:00
Michael Keller 9204d0a34e Fixed conditionals for SPEKTRUM_BIND_PIN. 2017-04-10 09:55:40 +12:00
Steffen Windoffer 9955271e3c remove double featureConfigCopy 2017-04-09 20:22:48 +02:00
Hydra 4653cfd4ad CF/BF - Reduce flash usage by re-using a couple of strings. 2017-04-09 13:48:19 +01:00
Hydra 297f362257 CF/BF - Reduce flash usage of cliSerialPassthrough.
Minimize string duplication, be less verbose, use shorter words, avoid
duplicate id parameter code.
2017-04-09 13:48:04 +01:00
mikeller 6a03b48e7f Reworked altitude estimation. Made it work when ACC is disabled. 2017-04-08 22:54:44 +12:00