chores(flysky): Separate AFHDS2A and AFHDS3 into 2 different module type (#3783)
* chores(flysky): separate AFHDS2A and AFHDS3 into 2 different module type This should allow to remove some of the hacks added earlier. * chore: Add some EL18 CI bits * fix(afhds): cmake defs * fix(ci): add el18 to commit-tests.sh * chore(cpn): separate AFHDS2A and AFHDS3 * chore(cpn): remove binary import of afhds and legacy fxFreq field for afhds3 * fix(cpn): limit available internal afhds protocols to those supported by hardware * chore(cpn): update Flysky int module test * fix(cpn): compile error * fix(cpn): afhds2a max channels * fix: TR_MODULE_PROTOCOLS * enh(cpn): more support for afhds2a and 3 * fix(cpn): rebase compile error * fix(cpn): bit indexes * fix(cpn): emi toString * fix(cpn): limit available internal afhds protocols to those supported by hardware * enh(cpn): add support for Flysky EL18 * fix(cpn): available protocols * fix(cpn): rebase moduledata * chore(cpn): add module fields to model print * Separate AFHDS2A and AFHDS3 UI settings. * Fix AFHDS3 conversion from old subtype value. Fix 'Channel Range' layout on portrait LCD. * Fix name. --------- Co-authored-by: Peter Feerick <peter.feerick@gmail.com> Co-authored-by: elecpower <neilh713@tpg.com.au> Co-authored-by: Phil Mitchell <phil.a.mitchell@gmail.com>
This commit is contained in:
co-authored by
Peter Feerick
elecpower
Phil Mitchell
parent
9515d29c9d
commit
c4f1e7127d
@@ -2,7 +2,6 @@ option(DISK_CACHE "Enable SD card disk cache" ON)
|
||||
option(UNEXPECTED_SHUTDOWN "Enable the Unexpected Shutdown screen" ON)
|
||||
option(STICKS_DEAD_ZONE "Enable sticks dead zone" YES)
|
||||
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
|
||||
option(AFHDS2 "Support for AFHDS2" ON)
|
||||
option(GHOST "Ghost TX Module" ON)
|
||||
option(PXX1 "PXX1 protocol support" ON)
|
||||
option(PXX2 "PXX2 protocol support" OFF)
|
||||
@@ -39,13 +38,22 @@ set(RF_BAUD_RATE 921600 230400 115200 57600 38400 19200 9600 4800 2400 1200)
|
||||
set(PCB_RF_BAUD 921600 CACHE STRING "INTERNAL_MODULE_BAUDRATE: ${RF_BAUD_RATE}")
|
||||
set_property(CACHE PCB_RF_BAUD PROPERTY STRINGS ${RF_BAUD_RATE})
|
||||
|
||||
set(FLAVOUR nv14)
|
||||
add_definitions(-DPCBNV14 -DPCBFLYSKY -DAFHDS2_BAUDRATE=${PCB_RF_BAUD})
|
||||
add_definitions(-DBATTERY_CHARGE -DUSE_TRIMS_AS_BUTTONS)
|
||||
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES AFHDS2A;AFHDS3 CACHE STRING "Internal modules")
|
||||
set(DEFAULT_INTERNAL_MODULE FLYSKY CACHE STRING "Default internal module")
|
||||
if (PCBREV STREQUAL EL18)
|
||||
set(FLAVOUR el18)
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES AFHDS3 CACHE STRING "Internal modules")
|
||||
set(DEFAULT_INTERNAL_MODULE FLYSKY_AFHDS3 CACHE STRING "Default internal module")
|
||||
set(AFHDS3 ON)
|
||||
else()
|
||||
set(FLAVOUR nv14)
|
||||
# defines existing internal modules
|
||||
set(INTERNAL_MODULES AFHDS2A CACHE STRING "Internal modules")
|
||||
set(DEFAULT_INTERNAL_MODULE FLYSKY_AFHDS2A CACHE STRING "Default internal module")
|
||||
set(AFHDS2 ON)
|
||||
endif()
|
||||
|
||||
set(BITMAPS_TARGET nv14_bitmaps)
|
||||
set(FONTS_TARGET x12_fonts)
|
||||
@@ -81,9 +89,6 @@ if(STICKS_DEAD_ZONE)
|
||||
add_definitions(-DSTICK_DEAD_ZONE)
|
||||
endif()
|
||||
|
||||
set(AFHDS2 ON)
|
||||
set(AFHDS3 ON)
|
||||
|
||||
# VCP CLI
|
||||
set(ENABLE_SERIAL_PASSTHROUGH ON CACHE BOOL "Enable serial passthrough")
|
||||
set(CLI ON CACHE BOOL "Enable CLI")
|
||||
|
||||
@@ -234,9 +234,15 @@ bool isBacklightEnabled();
|
||||
#if !defined(SIMU)
|
||||
void usbJoystickUpdate();
|
||||
#endif
|
||||
#define USB_NAME "FlySky NV14"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 'S', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#if (PCBREV == EL18)
|
||||
#define USB_NAME "Flysky EL18"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 's', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'E', 'L', '1', '8', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#else
|
||||
#define USB_NAME "Flysky NV14"
|
||||
#define USB_MANUFACTURER 'F', 'l', 'y', 's', 'k', 'y', ' ', ' ' /* 8 bytes */
|
||||
#define USB_PRODUCT 'N', 'V', '1', '4', ' ', ' ', ' ', ' ' /* 8 Bytes */
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(SIMU)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user