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

feat: Add Radiomaster Boxer #2877

Merged
merged 3 commits into from
Dec 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ body:
- Jumper T18
- Jumper T-Lite
- Jumper T-Pro
- Radiomaster Boxer
- Radiomaster T8
- RadioMaster TX12 / TX12MK2
- Radiomaster TX16S / TX16SMK2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
- t18
- t8;zorro;commando8
- tlite;tpro;lr3pro
- tx12;tx12mk2
- tx12;tx12mk2;boxer
- tx16s
- x10;x10-access
- x12s
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- t18
- t8;zorro;commando8
- tlite;tpro;lr3pro
- tx12;tx12mk2
- tx12;tx12mk2;boxer
- tx16s
- x10;x10-access
- x12s
Expand Down
6 changes: 6 additions & 0 deletions radio/src/dataconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,12 @@ enum MixSources {
MIXSRC_SLIDER3, LUA_EXPORT("lcs", "Left center slider (X9E only)")
MIXSRC_SLIDER4, LUA_EXPORT("rcs", "Right center slider (X9E only)")
MIXSRC_LAST_POT SKIP = MIXSRC_SLIDER4,
#elif defined(RADIO_BOXER)
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
MIXSRC_POT3, LUA_EXPORT("s3", "6 POS")
MIXSRC_FIRST_SLIDER SKIP = MIXSRC_POT3,
MIXSRC_LAST_POT SKIP = MIXSRC_POT3,
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBNV14)
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
Expand Down
3 changes: 3 additions & 0 deletions radio/src/datastructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ static inline void check_struct()
#elif defined(RADIO_TPRO)
CHKSIZE(RadioData, 843);
CHKSIZE(ModelData, 6189);
#elif defined(RADIO_BOXER)
CHKSIZE(RadioData, 875);
CHKSIZE(ModelData, 6165);
#elif defined(PCBX7)
CHKSIZE(RadioData, 866);
CHKSIZE(ModelData, 6164);
Expand Down
10 changes: 10 additions & 0 deletions radio/src/gui/128x64/radio_calibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,17 @@ void menuCommonCalib(event_t event)
}
}
else {
#if defined(RADIO_BOXER)
// load 6pos calib with factory data if 6 pos was not manually calibrated
constexpr int16_t factoryValues[]= {0x5,0xd,0x16,0x1f,0x28};
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT3];
calib->count = 5;
for (int j=0; j<calib->count ; j++) {
calib->steps[j] = factoryValues[j];
}
#else
g_eeGeneral.potsConfig &= ~(0x03<<(2*idx));
#endif
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/view_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct {

#define BIGSIZE DBLSIZE
#if defined (PCBTARANIS)
#define LBOX_CENTERX (LCD_W/4 + 14)
#define LBOX_CENTERX (LCD_W/4 + 13)
#define RBOX_CENTERX (3*LCD_W/4 - 13)
#else
#define LBOX_CENTERX (LCD_W/4 + 10)
Expand Down
2 changes: 2 additions & 0 deletions radio/src/gui/common/stdlcd/radio_hardware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ enum {
(MIXSRC_SI - MIXSRC_FIRST_SWITCH == sw || MIXSRC_SJ - MIXSRC_FIRST_SWITCH == sw)) ? SWITCH_2POS : SWITCH_3POS)
#elif defined(RADIO_TX12MK2)
#define SWITCH_TYPE_MAX(sw) (((MIXSRC_SA - MIXSRC_FIRST_SWITCH == sw || MIXSRC_SD - MIXSRC_FIRST_SWITCH == sw)) ? SWITCH_2POS : SWITCH_3POS)
#elif defined(RADIO_BOXER)
#define SWITCH_TYPE_MAX(sw) (((MIXSRC_SB - MIXSRC_FIRST_SWITCH == sw || MIXSRC_SC - MIXSRC_FIRST_SWITCH == sw)) ? SWITCH_3POS : SWITCH_2POS)
#elif defined(RADIO_T12)
#define SWITCH_TYPE_MAX(sw) ((MIXSRC_SG - MIXSRC_FIRST_SWITCH == sw || MIXSRC_SH - MIXSRC_FIRST_SWITCH == sw) ? SWITCH_2POS : SWITCH_3POS)
#else
Expand Down
2 changes: 2 additions & 0 deletions radio/src/hal/adc_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ const etx_hal_adc_driver_t* etx_hal_adc_driver = nullptr;
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, -1,-1, 1, 1};
#elif defined(RADIO_TX12MK2)
const int8_t adcDirection[NUM_ANALOGS] = {-1,1,-1,1, 1,-1};
#elif defined(RADIO_BOXER)
const int8_t adcDirection[NUM_ANALOGS] = {1,-1,1,-1, -1,-1};
#elif defined(RADIO_ZORRO)
const int8_t adcDirection[NUM_ANALOGS] = {-1, 1, 1, -1, -1, 1, 1, 1};
#elif defined(RADIO_TPRO)
Expand Down
1 change: 1 addition & 0 deletions radio/src/lua/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ if(PYTHONINTERP_FOUND)
add_lua_export_target(tpro ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_TPRO)
add_lua_export_target(tx12 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_TX12)
add_lua_export_target(tx12mk2 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_TX12MK2)
add_lua_export_target(boxer ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_BOXER)
add_lua_export_target(zorro ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_ZORRO)
add_lua_export_target(t8 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_T8)
add_lua_export_target(commando8 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_COMMANDO8)
Expand Down
4 changes: 3 additions & 1 deletion radio/src/lua/api_general.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
#include "lua/lua_exports_tx12mk2.inc"
#elif defined(RADIO_LR3PRO)
#include "lua/lua_exports_lr3pro.inc"
#elif defined(RADIO_BOXER)
#include "lua/lua_exports_boxer.inc"
#elif defined(RADIO_ZORRO)
#include "lua/lua_exports_zorro.inc"
#elif defined(RADIO_T8)
Expand Down Expand Up @@ -2922,7 +2924,7 @@ const luaR_value_entry opentxConstants[] = {
{ "EVT_VIRTUAL_ENTER_LONG", EVT_KEY_LONG(KEY_ENTER) },
{ "EVT_VIRTUAL_EXIT", EVT_KEY_BREAK(KEY_EXIT) },
#elif defined(NAVIGATION_X7) || defined(NAVIGATION_X9D)
#if defined(RADIO_TX12) || defined(RADIO_TX12MK2) || defined(RADIO_ZORRO) || defined(RADIO_T8) || defined(RADIO_COMMANDO8)
#if defined(RADIO_TX12) || defined(RADIO_TX12MK2) || defined(RADIO_BOXER) || defined(RADIO_ZORRO) || defined(RADIO_T8) || defined(RADIO_COMMANDO8)
{ "EVT_VIRTUAL_PREV_PAGE", EVT_KEY_BREAK(KEY_PAGEUP) },
{ "EVT_VIRTUAL_NEXT_PAGE", EVT_KEY_BREAK(KEY_PAGEDN) },
{ "EVT_VIRTUAL_MENU", EVT_KEY_BREAK(KEY_MODEL) },
Expand Down
2 changes: 1 addition & 1 deletion radio/src/simu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void OpenTxSim::updateKeysAndSwitches(bool start)
KEY_Left, KEY_LEFT,
KEY_Up, KEY_UP,
KEY_Down, KEY_DOWN,
#elif defined(RADIO_TX12) || defined(RADIO_TX12MK2) || defined(RADIO_ZORRO)
#elif defined(RADIO_TX12) || defined(RADIO_TX12MK2) || defined(RADIO_BOXER) || defined(RADIO_ZORRO)
KEY_Page_Up, KEY_PAGEUP,
KEY_Page_Down, KEY_PAGEDN,
KEY_Return, KEY_ENTER,
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 @@ -29,6 +29,8 @@ elseif(PCB STREQUAL X7)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tx12.cpp)
elseif(PCBREV STREQUAL TX12MK2)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tx12mk2.cpp)
elseif(PCBREV STREQUAL BOXER)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_boxer.cpp)
elseif(PCBREV STREQUAL ZORRO)
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_zorro.cpp)
elseif(PCBREV STREQUAL T8)
Expand Down
2 changes: 2 additions & 0 deletions radio/src/storage/yaml/yaml_datastructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
#include "yaml_datastructs_tx12.cpp"
#elif defined(RADIO_TX12MK2)
#include "yaml_datastructs_tx12mk2.cpp"
#elif defined(RADIO_BOXER)
#include "yaml_datastructs_boxer.cpp"
#elif defined(RADIO_ZORRO)
#include "yaml_datastructs_zorro.cpp"
#elif defined(RADIO_T8)
Expand Down
Loading