Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port new VTX API and settings from Betaflight #3401

Merged
merged 1 commit into from
Jun 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/Cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,13 @@ Re-apply any new defaults as desired.
| model_preview_type | -1 | ID of mixer preset applied in a Configurator. **Do not modify manually**. Used only for backup/restore reasons. |
| tz_offset | 0 | Time zone offset from UTC, in minutes. This is applied to the GPS time for logging and time-stamping of Blackbox logs |
| tz_automatic_dst | OFF | Automatically add Daylight Saving Time to the GPS time when needed or simply ignore it. Includes presets for EU and the USA - if you live outside these areas it is suggested to manage DST manually via `tz_offset`. |
| vtx_band | 4 | Configure the VTX band. Set to zero to use `vtx_freq`. Bands: 1: A, 2: B, 3: E, 4: F, 5: Race. |
| vtx_channel | 1 | Channel to use within the configured `vtx_band`. Valid values are [1, 8]. |
| vtx_freq | 5740 | Set the VTX frequency using raw MHz. This parameter is ignored unless `vtx_band` is 0. |
| vtx_halfduplex | ON | Use half duplex UART to communicate with the VTX, using only a TX pin in the FC. |
| vtx_low_power_disarm | OFF | When the craft is disarmed, set the VTX to its lowest power. `ON` will set the power to its minimum value on startup, increase it to `vtx_power` when arming and change it back to its lowest setting after disarming. `UNTIL_FIRST_ARM` will start with minimum power, but once the craft is armed it will increase to `vtx_power` and it will never decrease until the craft is power cycled. |
| vtx_pit_mode_freq | Frequency to use (in MHz) when the VTX is in pit mode. |
| vtx_power | 1 | VTX RF power level to use. The exact number of mw depends on the VTX hardware. |

This Markdown table is made by MarkdwonTableMaker addon for google spreadsheet.
Original Spreadsheet used to make this table can be found here https://docs.google.com/spreadsheets/d/1ubjYdMGmZ2aAMUNYkdfe3hhIF7wRfIjcuPOi_ysmp00/edit?usp=sharing
1 change: 1 addition & 0 deletions make/source.mk
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ COMMON_SRC = \
telemetry/msp_shared.c \
telemetry/smartport.c \
telemetry/telemetry.c \
io/vtx.c \
io/vtx_string.c \
io/vtx_smartaudio.c \
io/vtx_tramp.c \
Expand Down
1 change: 1 addition & 0 deletions src/main/build/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ typedef enum {
DEBUG_VIBE,
DEBUG_CRUISE,
DEBUG_REM_FLIGHT_TIME,
DEBUG_SMARTAUDIO,
DEBUG_COUNT
} debugType_e;

Expand Down
6 changes: 3 additions & 3 deletions src/main/cms/cms_menu_builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ static const OSD_Entry menuFeaturesEntries[] =
#if defined(VTX) || defined(USE_RTC6705)
OSD_SUBMENU_ENTRY("VTX", &cmsx_menuVtx),
#endif // VTX || USE_RTC6705
#if defined(VTX_CONTROL)
#if defined(VTX_SMARTAUDIO)
#if defined(USE_VTX_CONTROL)
#if defined(USE_VTX_SMARTAUDIO)
OSD_SUBMENU_ENTRY("VTX SA", &cmsx_menuVtxSmartAudio),
#endif
#if defined(VTX_TRAMP)
#if defined(USE_VTX_TRAMP)
OSD_SUBMENU_ENTRY("VTX TR", &cmsx_menuVtxTramp),
#endif
#endif // VTX_CONTROL
Expand Down
4 changes: 2 additions & 2 deletions src/main/cms/cms_menu_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static const OSD_Entry menuOsdElemsEntries[] =
OSD_ELEMENT_ENTRY("THR. (MANU)", OSD_THROTTLE_POS),
OSD_ELEMENT_ENTRY("THR. (MANU/AUTO)", OSD_THROTTLE_POS_AUTO_THR),
OSD_ELEMENT_ENTRY("SYS MESSAGES", OSD_MESSAGES),
#ifdef VTX_COMMON
#ifdef USE_VTX_COMMON
OSD_ELEMENT_ENTRY("VTX CHAN", OSD_VTX_CHANNEL),
#endif // VTX
OSD_ELEMENT_ENTRY("CURRENT (A)", OSD_CURRENT_DRAW),
Expand Down Expand Up @@ -215,7 +215,7 @@ static const OSD_Entry menuOsdElemsEntries[] =
OSD_END_ENTRY,
};

#if defined(VTX_COMMON) && defined(USE_GPS) && defined(USE_BARO) && defined(USE_PITOT)
#if defined(USE_VTX_COMMON) && defined(USE_GPS) && defined(USE_BARO) && defined(USE_PITOT)
// All CMS OSD elements should be enabled in this case. The menu has 3 extra
// elements (label, back and end), but there's an OSD element that we intentionally
// don't show here (OSD_DEBUG).
Expand Down
Loading