1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00
Commit graph

237 commits

Author SHA1 Message Date
Michael Keller
4f923e4827
Merge pull request #8745 from etracer65/dshot_telemetry_info_msp
Add motor telemetry data to MSP - support displaying RPM in the Configurator
2019-08-28 17:17:57 +12:00
Bruce Luckcuck
d698a559c5 Add motor telemetry data to MSP
Adds the RPM (ESC sensor or DSHOT telemetry), invalid packet stats (DSHOT telemetry), and ESC temperature (ESC sensor) for each motor to MSP.

Adds controlling flags and `motor_poles` to `MSP_MOTOR_CONFIG`.

Added to the MSP_MOTOR_CONFIG message:
U8    configured motor count
U8    motor poles
U8    dshot telemetry enabled (boolean)
U8    esc sensor enabled (boolean)

New MSP_MOTOR_DSHOT_TELEMETRY message
U8    motor_count - number of active motors for which data will follow
Loop for motor_count
U32   motor_rpm
U16   invalid_packet_percent - 2 decimal places. So 10000 is 100.00%
U8    esc temperature (degrees celcius)
U16   esc voltage (0.01V per unit)
U16   esc current (0.01A per unit)
U16   esc mAh consumption
2019-08-26 17:56:08 -04:00
IvoFPV
584f3bc9aa Add rc_smoothing_auto_smoothness to MSP 2019-08-25 17:29:09 +02:00
Michael Keller
47df36c961
Merge pull request #8693 from etracer65/vtxtable_msp
Add MSP support for vtxtable
2019-08-18 12:16:33 +12:00
Bruce Luckcuck
ee47957dc3 Add MSP support for vtxtable 2019-08-17 17:57:10 -04:00
jflyper
f1cd99e6b6
Merge pull request #8722 from jflyper/bfdev-isolate-msp-from-pwm_output
Isolate MSP_MOTOR from pwm_output (pwmGetMotors)
2019-08-17 11:19:20 +09:00
jflyper
11994e6ab8 Isolate MSP_MOTOR from pwm_output (pwmGetMotors) 2019-08-14 23:50:13 +09:00
Michael Keller
814caa638f
On-board custom defaults take 2 (#8707)
On-board custom defaults take 2
2019-08-13 08:54:31 +12:00
Michael Keller
e09f418430
Add debug modes to MSP (#8681)
Add debug modes to MSP
2019-08-13 00:12:51 +12:00
mikeller
accb49c157 Made 'features' work when config is in copy. 2019-08-12 03:08:21 +12:00
IvoFPV
0dd42ca9b1 Add debug mode and debug count to msp 2019-08-10 10:38:43 +02:00
Michael Keller
b94da4a5ee
Add dynamic notch setttings to MSP (#8689)
Add dynamic notch setttings to MSP
2019-08-10 17:28:14 +12:00
Dominic Clifton
7a26a47d81
Merge pull request #8680 from hydra/bf-msp-external-flash-capability
Allow MSP clients to know if the target has a flash bootloer.
2019-08-09 12:41:24 +02:00
Michael Keller
343981ec89
Add iterm relax cutoff to msp (#8678)
Add iterm relax cutoff to msp
2019-08-09 08:54:19 +12:00
IvoFPV
2ff2ceec28 Add dyn notch to MSP 2019-08-08 13:47:26 +02:00
IvoFPV
c9573b3c0c Add iterm relax cutoff to msp 2019-08-08 12:12:11 +02:00
Thorsten Laux
91ad2498ff ff from interpolated setpoint 2019-08-08 09:50:18 +02:00
Dominic Clifton
7d72636d2d Allow MSP clients to know if the target has a flash bootloer.
Targets with flash bootloaders need a different reboot sequence for
firmware updates.
2019-08-07 11:42:30 +02:00
mikeller
14994afad5 Fixed reporting of SD card when not configured. 2019-08-04 15:45:50 +12:00
Michael Keller
5123e8bb38
Add support for IRC Tramp race lock flag, and extended VTX stat… (#7128)
Add support for IRC Tramp race lock flag, and extended VTX status.
2019-07-29 02:13:26 +12:00
jflyper
542146c702 Motor code refactor (Phase 1) 2019-07-17 01:33:39 +09:00
Dominic Clifton
980df1536f Refactored arbitrary gyro and mag alignment.
The original implementation:

* removed the old 'alignment' variable
* did not require 'ALIGN_CUSTOM'
* always used rotation matrix
* had no additional per-pid-loop conditional logic.

Extract currently unused code into tests.
In preparation for either deleting or re-using in validateAndFixConfig.

Fix code style of some old boardalignment code.

De-duplicate vector rotation code.

Now that rotation code is exacted from `alignBoard` and now  doesn't use
`boardRotation` some if it was similar to the code in `rotateV` in
maths.c

Use DECIDEGREES for mag and gyro/acc custom alignments.

Use unnamed structure instead of `values`.

Redefine what 'custom' orientation means.

Move alignment test-only code into the tests.

Ensure gyro/mag custom alignment settings follow the enum variations.

This can't be applied to ALIGN_DEFAULT because, in the case of the MAG,
the default isn't actually known until the gyro is detected, see
`compassDetect`.

OMNIBUSF4/F7 - Don't use ALIGN_DEFAULT in target.h,
common_defaults_post.h does this now.

Comment cleanup.

Delete unused alignment code left from various tests/refactoring
efforts.

* Please do not squash this commit.

Fix SITL build by avoiding structure assignment with anonymous inner
struct.

The error from the build server was as follows:

```./src/main/common/sensor_alignment.c:49:5: error: missing initializer
for field ‘yaw’ of ‘struct <anonymous>’
[-Werror=missing-field-initializers]
     *sensorAlignment = CUSTOM_ALIGN_CW0_DEG;
     ^
In file included from ./src/main/common/sensor_alignment.c:27:0:
./src/main/common/sensor_alignment.h:80:17: note: ‘yaw’ declared here
         int16_t yaw;
                 ^
```

Cleanup sensor_alignment API.
2019-07-13 11:51:20 +12:00
mikeller
aeca5665e6 Add support for IRC Tramp race lock flag, and extended VTX status.
Display '-' for settings when VTX is locked.
2019-07-01 01:30:18 +12:00
Michael Keller
d7f62a710c
Merge pull request #8505 from mikeller/fix_msp_conditionals
Fixed USE_MAX7456 conditional in 'msp.c'.
2019-06-30 22:44:38 +12:00
Michael Keller
b03f4ef0b2
Boatloader typo fix (#8502)
Boatloader typo fix
2019-06-30 22:41:51 +12:00
Michael Keller
6130dc3b9e
Move motorConfig_s and motorDevConfig_s to pg/motor (#8498)
Move motorConfig_s and motorDevConfig_s to pg/motor
2019-06-30 12:59:31 +12:00
jflyper
0e63596abd Move motorConfig_s, motorDevConfig_s and associated PG handling into pg/motor.[ch] 2019-06-29 20:03:54 +09:00
mikeller
b40dc427c0 Fixed USE_MAX7456 conditional in 'msp.c'. 2019-06-29 19:35:14 +12:00
TheIsotopes
9fa5cf40d2
boatloader typo fix 2019-06-29 08:56:56 +02:00
mikeller
0e35163ed2 Fixed FLASH boot loader option. 2019-06-28 01:19:42 +12:00
Michael Keller
ed266e7151
[SmartAudio] Added support for custom frequency tables (#8380)
[SmartAudio] Added support for custom frequency tables
2019-06-25 02:16:14 +12:00
functionpointer
7cb34205b3 [VTX] vtxTable factory flag and full integration of vtxTable (#8380)
Moved vtxtable frequency mode implementation into `vtx_common.c`.
This makes the implementation available for all vtx types and allows
for some code deduplication (see point below)

Removed band and channel tracking from tramp and rtc6705.
The hardware underlying both only support frequency mode and
the tracking is now done in `vtx_common.c` using the new factory flag.

Deleted vtxStringXXX. to continue supporting builds without
`USE_VTX_TABLE`, new infrastructure was created in
`drivers/vtx_table.c`, which loads fixed tables into vtxTableXXX
when built witout `USE_VTX_TABLE`. Individual vtx implementations no
longer need to load any band/channel tables. They only need to load
their individual power tables when built without `USE_VTX_TABLE`.
Additionally this allows for the next point:

Fully integrated vtxTableXXX and removed the old and no longer needed
indirection of frequency and power tables in `vtxDevice_t`.

Removed VTX_SETTINGS_* constants from `vtx_common.h` and replaced them
with the vtxtable equivalent.

rtc6705 implementation now uses power values from vtxtable instead of
using indices directly. It also stops using index 0. This makes it
consistent with other vtx implementations and is more user configurable.
It also cleans up `telemetry\srxl.c` which had to have a special case for rtc6705.

Finally, frequency entries in the vtxtable can now be marked as empty
by setting their frequency to 0. Betaflight will never allow a blocked
channel to be selected. This is useful for vtxtable index mode
(FACTORY flag set) where manufacturer-defined bands can be truncated
to ensure compliance with local laws and regulations.
2019-06-24 12:28:46 +02:00
mikeller
5cf42f40b6 Add booting into the flash boot loader as an option. 2019-06-16 14:46:38 +12:00
mikeller
75b1c0d4ce Removed 'slots' from the adjustment range configuration. 2019-06-05 00:56:37 +12:00
Michael Keller
cf32bea79d
Fix VTX chan to 0 via SetFreqByMHz (#8338)
Fix VTX chan to 0 via SetFreqByMHz
2019-05-25 22:56:07 +12:00
E Thomas
c9589fbe4d Fixed VTX chan to 0 via SetFreqByMHz 2019-05-23 22:26:04 -04:00
mikeller
2d184359a0 Fixed build for targets without RC smoothing. 2019-05-22 21:02:24 +12:00
Michael Keller
7cd030559d
Use RC Smoothing initialized settings rather than current PG values (#8282)
Use RC Smoothing initialized settings rather than current PG values
2019-05-21 03:14:26 +12:00
Michael Keller
70215cc758
Really fixed flash erasing. (#8300)
Really fixed flash erasing.
2019-05-20 19:57:13 +12:00
Bruce Luckcuck
25435ea49c Add reboot required arming disabled flag, support for setting in MSP 2019-05-19 09:42:03 -04:00
jflyper
f5084a59bd Partitions are now accessed by types rather than indices 2019-05-19 20:32:52 +09:00
mikeller
babad40dcb Really fixed flash erasing. 2019-05-19 12:30:37 +12:00
Dominic Clifton
92999681e3 Add flash partitioning system 2019-05-18 21:39:08 +09:00
Dominic Clifton
e9b666421a Reinitialise flashFs after erasing flash chip.
Ensures erase actually worked rather than assuming it did.
2019-05-09 14:18:25 +09:00
Michael Keller
d9382ad012
Add new basic feature conditionals (#8175)
Add new basic feature conditionals
2019-05-06 19:07:11 +12:00
Michael Keller
8124b42c76
Fixed missing comments in 'msp.c'. (#8158)
Fixed missing comments in 'msp.c'.
2019-05-05 22:33:17 +12:00
jflyper
45b7fa8095 Add and handle USE_PWM_OUTPUT 2019-05-05 18:05:13 +09:00
mikeller
d468727d98 Fixed missing comments in 'msp.c'. 2019-05-04 14:13:14 +12:00
root
ad43631a8b clean up some spaces before newlines 2019-05-02 23:24:36 +00:00
jflyper
e3fd11014f Report BARO_NONE and MAG_NONE for baro and mag MSP requests
Responding with zero (BARO_DEFAULT and MAG_DEFAULT) will cause
configurator to display these sensors enabled, and since write (set)
side is ignored, they can never be displayed as disabled.
2019-05-01 01:55:59 +09:00