Skip to content

Commit

Permalink
chore: Add EL18 specific firmware naming (#2609)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
richardclli and pfeerick committed Apr 28, 2023
1 parent 438fd0b commit 82a711f
Show file tree
Hide file tree
Showing 7 changed files with 25 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 .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,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
11 changes: 9 additions & 2 deletions radio/src/targets/nv14/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -457,9 +457,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 @@ -173,6 +173,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 82a711f

Please sign in to comment.