Skip to content

Commit

Permalink
chore: Add EL18 specific build for v2.9 (#3539)
Browse files Browse the repository at this point in the history
* chore: Add EL18 specific firmware naming (#2609)

* Added EL18 specific firmware naming.

* fix: Update USB identifier

* chore: Add to github builds

* fix: Lowercase s in Flysky

* chore: Reference EL18 specific firmware file

Co-authored-by: Peter Feerick <[email protected]>

* chore(el18): Change default switch cfg to match production (#2675)

* chore: no nightly build for this branch
  • Loading branch information
richardclli authored Jun 21, 2023
1 parent 72c733c commit a1528db
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:
strategy:
matrix:
target:
- nv14
- nv14;el18
- t12
- t16
- t18
Expand Down
2 changes: 1 addition & 1 deletion fw.json
Original file line number Diff line number Diff line change
@@ -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-"],
Expand Down
6 changes: 5 additions & 1 deletion radio/src/targets/nv14/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
16 changes: 13 additions & 3 deletions radio/src/targets/nv14/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
}
Expand Down
5 changes: 5 additions & 0 deletions tools/build-flysky.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"PCB": "NV14",
"DEFAULT_MODE": "1",
},
"EL18": {
"PCB": "NV14",
"PCBREV": "EL18",
"DEFAULT_MODE": "1",
},
}

translations = [
Expand Down
3 changes: 3 additions & 0 deletions tools/build-gh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ do
nv14)
BUILD_OPTIONS+="-DPCB=NV14"
;;
el18)
BUILD_OPTIONS+="-DPCB=NV14 -DPCBREV=EL18"
;;
commando8)
BUILD_OPTIONS+="-DPCB=X7 -DPCBREV=COMMANDO8"
;;
Expand Down

0 comments on commit a1528db

Please sign in to comment.