Skip to content

Commit

Permalink
chore: use single target to support nv14/el18/pl18/pl18ev/nb4p (#5397)
Browse files Browse the repository at this point in the history
  • Loading branch information
richardclli authored Feb 4, 2025
1 parent 80d8318 commit 0325bd7
Show file tree
Hide file tree
Showing 35 changed files with 1,913 additions and 461 deletions.
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 AND PCBREV STREQUAL PL18EV)
set(FLAVOUR pl18ev)
Expand Down
8 changes: 4 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) || defined(RADIO_NB4P)
#if defined(PCBNV14) || defined(RADIO_NB4P) || defined(RADIO_NV14_FAMILY)
CHKTYPE(TopBarPersistentData, 704);
#else
CHKTYPE(TopBarPersistentData, 1048);
Expand Down Expand Up @@ -104,14 +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)
#if defined(RADIO_NB4P)
#if defined(RADIO_NB4P) || defined(RADIO_NV14_FAMILY)
CHKSIZE(ModelData, 26499);
#else
CHKSIZE(ModelData, 26845);
#endif
#elif defined(PCBNV14)
CHKSIZE(ModelData, 26463);
#elif defined(RADIO_T15)
CHKSIZE(ModelData, 26834);
#elif defined(PCBHORUS)
Expand Down
2 changes: 2 additions & 0 deletions radio/src/storage/yaml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ elseif(PCB STREQUAL NV14)
elseif(PCB STREQUAL PL18)
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()
Expand Down
6 changes: 4 additions & 2 deletions radio/src/storage/yaml/yaml_datastructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@
#else
#include "yaml_datastructs_x10.cpp"
#endif
#elif defined(PCBNV14)
#include "yaml_datastructs_nv14.cpp"
#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(PCBX7)
#if defined(RADIO_TPRO) || defined(RADIO_TPROV2) || defined(RADIO_BUMBLEBEE)
#include "yaml_datastructs_tpro.cpp"
Expand Down
Loading

0 comments on commit 0325bd7

Please sign in to comment.