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

chore: use single target to support nv14/el18/pl18/pl18ev/nb4p #5397

Draft
wants to merge 44 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
455a718
Initial support of NB4+
richardclli Mar 27, 2024
eb24f1a
Current works: LCD, touch, ST, TH, some switches
richardclli Mar 29, 2024
0e31059
Fixed battery charging and USB detection
richardclli Apr 2, 2024
1cf4e3a
Mapped audio mute
richardclli Apr 2, 2024
fca5c52
Disable voice chip
richardclli Jul 9, 2024
7bcfc49
Added encoder
richardclli Jul 10, 2024
92f5134
Fixed haptic
richardclli Apr 18, 2024
4158af7
Unified bootloader menu for all Flysky radios
richardclli Apr 18, 2024
c3499b8
Can enter bootloader with S2 + S3
richardclli Apr 17, 2024
51a036b
Switch driver, key/trim driver
richardclli Apr 23, 2024
621b216
Mapped SW1 to encoder control, SW2 and SW3 are user usable switches, …
richardclli Jul 12, 2024
bc6158e
Update Cmakelist
richardclli Jul 15, 2024
e127c95
Update battery divider for NB4+
richardclli Jul 15, 2024
b4bca52
Fixed EM in keys diagnostic screen
richardclli Jul 16, 2024
05a130b
Map bluetooth port as int module (2 wires)
richardclli Aug 5, 2024
a5b0a5f
USB should switch back to MCU when exiting bootloader
richardclli Aug 6, 2024
acf9301
Cleaned up hal.h
richardclli Aug 6, 2024
036be2e
chore(ci): build nb4p firmware
pfeerick Aug 8, 2024
6433083
chore: define nb4p as a surface radio
pfeerick Aug 8, 2024
10bcb70
chore: consistent formatting
pfeerick Aug 8, 2024
4df4068
Updated naming of switches and pots according to what is printed in t…
richardclli Aug 8, 2024
f04dcf9
Fixed build problem by PR #5396
richardclli Aug 18, 2024
3faa2f5
chore: formatting
pfeerick Aug 19, 2024
a593d81
Added touch type display
richardclli Aug 21, 2024
d7b26c4
chore: add USE_RTC_CLOCK build time option
pfeerick Aug 21, 2024
0d25496
Fixed nv14 target build error
richardclli Aug 22, 2024
95bacd2
Fixed NB4+ int module power logic
richardclli Aug 22, 2024
5975360
Better handling reboot
richardclli Aug 7, 2024
1bd83f8
Fix tests failure
richardclli Nov 29, 2024
5fba56a
Define a new RAW ADC type for hidden ADC channels for customize drive…
richardclli Nov 29, 2024
0180de8
Clean up namings
richardclli Dec 3, 2024
7bfed48
SW2 and SW3 swapped
richardclli Dec 3, 2024
21d5888
Use new custom switch framework.
richardclli Dec 13, 2024
c3511e3
Fixed nb4p yaml data structure
richardclli Dec 24, 2024
396fc7e
Initial merge of nv14 target to pl18 target
richardclli Aug 6, 2024
b0a7c08
LCD and touch works for EL18
richardclli Aug 6, 2024
920942d
Fixed audio volume, LED strip, int module pwr, battery divider
richardclli Aug 7, 2024
9e91346
Fixed gimbal, SPI flash, yaml saving, keys, trims
richardclli Aug 7, 2024
588a1f2
Updated build scripts
richardclli Aug 7, 2024
921cc7c
Fixed charging mechanism, EL18 and NB4P use the same chip have the sa…
richardclli Aug 7, 2024
66dd254
Fixed build errors of other targets
richardclli Aug 8, 2024
e7808f0
Battery divider value is wrong according to schematic
richardclli Sep 11, 2024
13aa778
Fixed yaml data structure
richardclli Dec 24, 2024
8350e83
NV14 should support AFHDS3 as well (FRM303)
richardclli Jan 3, 2025
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
2 changes: 2 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- xlites
- mt12
- gx12
- nb4p
container:
image: ghcr.io/edgetx/edgetx-dev:latest
volumes:
Expand Down Expand Up @@ -116,6 +117,7 @@ jobs:
- x9lite;x9lites
- xlite;xlites
- mt12;gx12
- nb4p
container:
image: ghcr.io/edgetx/edgetx-dev:latest
volumes:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- x9lite;x9lites
- xlite;xlites
- mt12
- gx12
- nb4p
container:
image: ghcr.io/edgetx/edgetx-dev:latest
volumes:
Expand Down
2 changes: 1 addition & 1 deletion companion/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T16)
set(FLAVOUR t16)
elseif(PCB STREQUAL X10 AND PCBREV STREQUAL T18)
set(FLAVOUR t18)
elseif(PCB STREQUAL NV14 AND PCBREV STREQUAL EL18)
elseif(PCB STREQUAL PL18 AND PCBREV STREQUAL EL18)
set(FLAVOUR el18)
elseif(PCB STREQUAL PL18)
set(FLAVOUR pl18)
Expand Down
1 change: 1 addition & 0 deletions fw.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
["Flysky NV14", "nv14-"],
["Flysky PL18", "pl18-"],
["Flysky PL18EV", "pl18ev-"],
["Flysky NB4+", "nb4p-"],
["FrSky Horus X10", "x10-"],
["FrSky Horus X10 Express", "x10express-"],
["FrSky Horus X12s", "x12s-"],
Expand Down
2 changes: 1 addition & 1 deletion radio/src/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ enum AudioBufferState
#define AUDIO_DATA_MIN 0
#define AUDIO_DATA_MAX 0xffff
#define AUDIO_BITS_PER_SAMPLE 16
#elif defined(PCBX12S) || defined(PCBNV14)
#elif defined(AUDIO_SPI)
typedef int16_t audio_data_t;
#define AUDIO_DATA_SILENCE 0
#define AUDIO_DATA_MIN INT16_MIN
Expand Down
2 changes: 1 addition & 1 deletion radio/src/boards/generic_stm32/switches.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ __weak SwitchHwPos boardSwitchGetPosition(uint8_t cat, uint8_t idx)
return stm32_switch_get_position(&_switch_offsets[cat][idx]);
}

const char* boardSwitchGetName(uint8_t cat, uint8_t idx)
__weak const char* boardSwitchGetName(uint8_t cat, uint8_t idx)
{
return _switch_offsets[cat][idx].name;
}
Expand Down
12 changes: 8 additions & 4 deletions radio/src/datastructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static inline void check_struct()
CHKSIZE(TimerData, 17);
CHKSIZE(ModelHeader, 131);
CHKSIZE(CustomScreenData, 1892);
#if defined(PCBNV14)
#if defined(PCBNV14) || defined(RADIO_NB4P) || defined(RADIO_NV14_FAMILY)
CHKTYPE(TopBarPersistentData, 704);
#else
CHKTYPE(TopBarPersistentData, 1048);
Expand Down Expand Up @@ -104,10 +104,14 @@ static inline void check_struct()
CHKSIZE(ModelData, 6770);
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
CHKSIZE(ModelData, 6329);
#elif defined(PCBNV14)
CHKSIZE(ModelData, 26463);
#elif defined(PCBPL18)
CHKSIZE(ModelData, 26845);
#if defined(RADIO_NB4P) || defined(RADIO_NV14_FAMILY)
CHKSIZE(ModelData, 26499);
#else
CHKSIZE(ModelData, 26845);
#endif
#elif defined(PCBNV14)
CHKSIZE(ModelData, 21899);
#elif defined(RADIO_T15)
CHKSIZE(ModelData, 26834);
#elif defined(PCBHORUS)
Expand Down
5 changes: 4 additions & 1 deletion radio/src/gui/colorlcd/radio/radio_diagkeys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
#include "libopenui.h"
#include "edgetx.h"

#if defined(PCBPL18)
#if defined(RADIO_NB4P)
static const uint8_t _trimMap[MAX_TRIMS * 2] = {0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12, 13, 14, 15};
#elif defined(PCBPL18)
static const uint8_t _trimMap[MAX_TRIMS * 2] = {8, 9, 10, 11, 12, 13, 14, 15,
2, 3, 4, 5, 0, 1, 6, 7};
#else
Expand Down
4 changes: 4 additions & 0 deletions radio/src/gui/colorlcd/radio/radio_version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ RadioVersionPage::RadioVersionPage() :

#if defined(PCBNV14) || defined(PCBPL18)
extern const char* boardLcdType;
extern const char* boardTouchType;
#endif

void RadioVersionPage::build(Window* window)
Expand Down Expand Up @@ -370,6 +371,9 @@ void RadioVersionPage::build(Window* window)
version += nl;
version += "LCD: ";
version += boardLcdType;
version += nl;
version += "Touch: ";
version += boardTouchType;
#endif

auto txt = new StaticText(window, rect_t{}, version);
Expand Down
8 changes: 7 additions & 1 deletion radio/src/storage/yaml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ if((PCB STREQUAL X10) OR (PCB STREQUAL X12S))
elseif(PCB STREQUAL NV14)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_nv14.cpp)
elseif(PCB STREQUAL PL18)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_pl18.cpp)
if(PCBREV STREQUAL NB4P)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_nb4p.cpp)
elseif(PCBREV STREQUAL NV14)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_nv14_family.cpp)
else()
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_pl18.cpp)
endif()
elseif(PCB STREQUAL X7)
if(PCBREV STREQUAL TPRO)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tpro.cpp)
Expand Down
10 changes: 8 additions & 2 deletions radio/src/storage/yaml/yaml_datastructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,16 @@
#else
#include "yaml_datastructs_x10.cpp"
#endif
#elif defined(PCBPL18)
#if defined(RADIO_NB4P)
#include "yaml_datastructs_nb4p.cpp"
#elif defined(RADIO_NV14_FAMILY)
#include "yaml_datastructs_nv14_family.cpp"
#else
#include "yaml_datastructs_pl18.cpp"
#endif
#elif defined(PCBNV14)
#include "yaml_datastructs_nv14.cpp"
#elif defined(PCBPL18)
#include "yaml_datastructs_pl18.cpp"
#elif defined(PCBX7)
#if defined(RADIO_TPRO) || defined(RADIO_TPROV2) || defined(RADIO_BUMBLEBEE)
#include "yaml_datastructs_tpro.cpp"
Expand Down
Loading
Loading