mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 22:05:17 +03:00
Review comment fixes
This commit is contained in:
parent
9d70ed5079
commit
4ca3b9428f
6 changed files with 44 additions and 46 deletions
|
@ -100,28 +100,30 @@ Other devices can be added starting from id 50.
|
|||
|
||||
### 2. Serial Port Function
|
||||
|
||||
| Function | Value |
|
||||
| ---------------------------- | ------ |
|
||||
| FUNCTION_NONE | 0 |
|
||||
| FUNCTION_MSP | 1 |
|
||||
| FUNCTION_GPS | 2 |
|
||||
| FUNCTION_TELEMETRY_FRSKY_HUB | 4 |
|
||||
| FUNCTION_TELEMETRY_HOTT | 8 |
|
||||
| FUNCTION_TELEMETRY_LTM | 16 |
|
||||
| FUNCTION_TELEMETRY_SMARTPORT | 32 |
|
||||
| FUNCTION_RX_SERIAL | 64 |
|
||||
| FUNCTION_BLACKBOX | 128 |
|
||||
| FUNCTION_TELEMETRY_MAVLINK | 512 |
|
||||
| FUNCTION_ESC_SENSOR | 1024 |
|
||||
| FUNCTION_VTX_SMARTAUDIO | 2048 |
|
||||
| FUNCTION_TELEMETRY_IBUS | 4096 |
|
||||
| FUNCTION_VTX_TRAMP | 8192 |
|
||||
| FUNCTION_RCDEVICE | 16384 |
|
||||
| FUNCTION_LIDAR_TF | 32768 |
|
||||
| FUNCTION_FRSKY_OSD | 65536 |
|
||||
| FUNCTION_VTX_MSP | 131072 |
|
||||
| Function | Value | Bit |
|
||||
| ---------------------------- | ------ | --- |
|
||||
| FUNCTION_NONE | 0 | 0 |
|
||||
| FUNCTION_MSP | 1 | 1 << 0 |
|
||||
| FUNCTION_GPS | 2 | 1 << 1 |
|
||||
| FUNCTION_TELEMETRY_FRSKY_HUB | 4 | 1 << 2 |
|
||||
| FUNCTION_TELEMETRY_HOTT | 8 | 1 << 3 |
|
||||
| FUNCTION_TELEMETRY_LTM | 16 | 1 << 4 |
|
||||
| FUNCTION_TELEMETRY_SMARTPORT | 32 | 1 << 5 |
|
||||
| FUNCTION_RX_SERIAL | 64 | 1 << 6 |
|
||||
| FUNCTION_BLACKBOX | 128 | 1 << 7 |
|
||||
| NOT USED | 256 | 1 << 8 |
|
||||
| FUNCTION_TELEMETRY_MAVLINK | 512 | 1 << 9 |
|
||||
| FUNCTION_ESC_SENSOR | 1024 | 1 << 10 |
|
||||
| FUNCTION_VTX_SMARTAUDIO | 2048 | 1 << 11 |
|
||||
| FUNCTION_TELEMETRY_IBUS | 4096 | 1 << 12 |
|
||||
| FUNCTION_VTX_TRAMP | 8192 | 1 << 13 |
|
||||
| FUNCTION_RCDEVICE | 16384 | 1 << 14 |
|
||||
| FUNCTION_LIDAR_TF | 32768 | 1 << 15 |
|
||||
| FUNCTION_FRSKY_OSD | 65536 | 1 << 16 |
|
||||
| FUNCTION_VTX_MSP | 131072 | 1 << 17 |
|
||||
|
||||
Note: `FUNCTION_FRSKY_OSD` = `(1<<16)` requires 17 bits.
|
||||
Note2: We can use up to 32 bits (1<<32) here.
|
||||
|
||||
### 3. MSP Baudrates
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ COMMON_SRC = \
|
|||
io/vtx_tramp.c \
|
||||
io/vtx_control.c \
|
||||
io/vtx_msp.c \
|
||||
cms/cms_menu_vtx_msp.c \
|
||||
cms/cms_menu_vtx_msp.c
|
||||
|
||||
COMMON_DEVICE_SRC = \
|
||||
$(CMSIS_SRC) \
|
||||
|
@ -363,7 +363,7 @@ SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
|
|||
osd/osd_warnings.c \
|
||||
rx/rx_bind.c \
|
||||
io/vtx_msp.c \
|
||||
cms/cms_menu_vtx_msp.c \
|
||||
cms/cms_menu_vtx_msp.c
|
||||
|
||||
# Gyro driver files that only contain initialization and configuration code - not runtime code
|
||||
SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include <stdint.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <drivers/vtx_table.h>
|
||||
|
||||
#include "platform.h"
|
||||
|
||||
|
@ -35,6 +34,7 @@
|
|||
#include "cms/cms_types.h"
|
||||
|
||||
#include "drivers/vtx_common.h"
|
||||
#include "drivers/vtx_table.h"
|
||||
|
||||
#include "config/config.h"
|
||||
|
||||
|
@ -249,7 +249,7 @@ static const OSD_Entry mspCmsMenuCommenceEntries[] = {
|
|||
|
||||
static CMS_Menu mspCmsMenuCommence = {
|
||||
#ifdef CMS_MENU_DEBUG
|
||||
.GUARD_text = "XVTXMSC",
|
||||
.GUARD_text = "XVTXMSPC",
|
||||
.GUARD_type = OME_MENU,
|
||||
#endif
|
||||
.onEnter = NULL,
|
||||
|
@ -261,7 +261,6 @@ static CMS_Menu mspCmsMenuCommence = {
|
|||
static const OSD_Entry mspMenuEntries[] =
|
||||
{
|
||||
{ "- MSP -", OME_Label, NULL, NULL },
|
||||
|
||||
{ "", OME_Label | DYNAMIC, NULL, mspCmsStatusString },
|
||||
{ "PIT", OME_TAB, mspCmsSetPitMode, &mspCmsEntPitMode },
|
||||
{ "BAND", OME_TAB, mspCmsConfigBand, &mspCmsEntBand },
|
||||
|
@ -269,7 +268,6 @@ static const OSD_Entry mspMenuEntries[] =
|
|||
{ "(FREQ)", OME_UINT16 | DYNAMIC, NULL, &mspCmsEntFreqRef },
|
||||
{ "POWER", OME_TAB, mspCmsConfigPower, &mspCmsEntPower },
|
||||
{ "SAVE", OME_Submenu, cmsMenuChange, &mspCmsMenuCommence },
|
||||
|
||||
{ "BACK", OME_Back, NULL, NULL },
|
||||
{ NULL, OME_END, NULL, NULL }
|
||||
};
|
||||
|
|
|
@ -98,7 +98,7 @@ void setMspVtxDeviceStatusReady(const int descriptor)
|
|||
}
|
||||
}
|
||||
|
||||
STATIC_UNIT_TESTED void prepareMspFrame(uint8_t *mspFrame)
|
||||
void prepareMspFrame(uint8_t *mspFrame)
|
||||
{
|
||||
mspFrame[0] = VTXDEV_MSP;
|
||||
mspFrame[1] = vtxSettingsConfig()->band;
|
||||
|
|
|
@ -32,6 +32,4 @@ typedef enum {
|
|||
|
||||
bool vtxMspInit(void);
|
||||
void setMspVtxDeviceStatusReady(const int descriptor);
|
||||
#ifdef UNIT_TEST
|
||||
STATIC_UNIT_TESTED void prepareMspFrame(uint8_t *mspFrame);
|
||||
#endif
|
||||
void prepareMspFrame(uint8_t *mspFrame);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue