diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 7a24e5c8d96..ea32ec28aba 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -91,7 +91,7 @@ jobs: strategy: matrix: target: - - nv14 + - nv14;el18 - t12 - t16 - t18 diff --git a/fw.json b/fw.json index 3433729a1bc..21cda5f3b0b 100644 --- a/fw.json +++ b/fw.json @@ -1,7 +1,7 @@ { "targets": [ ["BETAFPV LiteRadio 3 Pro", "lr3pro-"], - ["Flysky EL18", "nv14-"], + ["Flysky EL18", "el18-"], ["Flysky NV14", "nv14-"], ["FrSky Horus X10", "x10-"], ["FrSky Horus X10 Access", "x10-access-"], diff --git a/radio/src/targets/nv14/CMakeLists.txt b/radio/src/targets/nv14/CMakeLists.txt index bdc34592e09..54e62e950df 100644 --- a/radio/src/targets/nv14/CMakeLists.txt +++ b/radio/src/targets/nv14/CMakeLists.txt @@ -42,7 +42,11 @@ 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) +if (PCBREV STREQUAL EL18) + set(FLAVOUR el18) +else() + set(FLAVOUR nv14) +endif() add_definitions(-DPCBNV14 -DPCBFLYSKY -DAFHDS2_BAUDRATE=${PCB_RF_BAUD}) add_definitions(-DBATTERY_CHARGE) diff --git a/radio/src/targets/nv14/board.h b/radio/src/targets/nv14/board.h index 3f1e5b6e0f5..1f252b449f1 100644 --- a/radio/src/targets/nv14/board.h +++ b/radio/src/targets/nv14/board.h @@ -215,8 +215,11 @@ enum EnumSwitches }; #define STORAGE_NUM_SWITCHES NUM_SWITCHES +#if (PCBREV == EL18) +#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 14) + (SWITCH_3POS << 12) + (SWITCH_3POS << 10) + (SWITCH_2POS << 8) + (SWITCH_2POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_2POS << 0); +#else #define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 14) + (SWITCH_3POS << 12) + (SWITCH_3POS << 10) + (SWITCH_TOGGLE << 8) + (SWITCH_2POS << 6) + (SWITCH_TOGGLE << 4) + (SWITCH_3POS << 2) + (SWITCH_2POS << 0); - +#endif enum EnumSwitchesPositions { SW_SA0, @@ -457,9 +460,16 @@ 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) } diff --git a/tools/build-flysky.py b/tools/build-flysky.py index 47220180f9e..c6c60ad74d0 100644 --- a/tools/build-flysky.py +++ b/tools/build-flysky.py @@ -13,6 +13,11 @@ "PCB": "NV14", "DEFAULT_MODE": "1", }, + "EL18": { + "PCB": "NV14", + "PCBREV": "EL18", + "DEFAULT_MODE": "1", + }, } translations = [ diff --git a/tools/build-gh.sh b/tools/build-gh.sh index 2f057586d15..3497364bf77 100755 --- a/tools/build-gh.sh +++ b/tools/build-gh.sh @@ -176,6 +176,9 @@ do nv14) BUILD_OPTIONS+="-DPCB=NV14" ;; + el18) + BUILD_OPTIONS+="-DPCB=NV14 -DPCBREV=EL18" + ;; commando8) BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=COMMANDO8" ;;