Skip to content

Commit

Permalink
Merge pull request #81 from OpenI6X/janek/1.1
Browse files Browse the repository at this point in the history
OpenI6X 1.1 - to make it short
  • Loading branch information
ajjjjjjjj authored Dec 19, 2021
2 parents 0c59088 + cd954a4 commit 706daf2
Show file tree
Hide file tree
Showing 71 changed files with 307 additions and 338 deletions.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,26 @@ jobs:
machine: true
steps:
- checkout
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=NO GVARS=NO LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO PCBI6_ELRSV2=YES" -v $PWD:/opentx vitass/opentx-fw-build
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=NO GVARS=NO LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO PCBI6X_ELRSV2=YES" -v $PWD:/opentx vitass/opentx-fw-build
- store_artifacts:
path: opentx-i6x-2.3.0.bin
destination: opentx-i6x-elrsv2-<< pipeline.git.tag >>.bin
path: opentx-i6x-1.1.0.bin
destination: openi6x-elrsv2-<< pipeline.git.tag >>.bin
build-gvars:
machine: true
steps:
- checkout
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=NO GVARS=YES LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO" -v $PWD:/opentx vitass/opentx-fw-build
- store_artifacts:
path: opentx-i6x-2.3.0.bin
destination: opentx-i6x-gvars-<< pipeline.git.tag >>.bin
build-heli:
path: opentx-i6x-1.1.0.bin
destination: openi6x-gvars-<< pipeline.git.tag >>.bin
build-gvars-heli:
machine: true
steps:
- checkout
- run: docker run -it -e "BOARD_NAME=I6X" -e "CMAKE_FLAGS=PCB=I6X HELI=YES GVARS=YES LUA_COMPILER=NO MULTIMODULE=NO DEBUG=NO" -v $PWD:/opentx vitass/opentx-fw-build
- store_artifacts:
path: opentx-i6x-2.3.0.bin
destination: opentx-i6x-heli-<< pipeline.git.tag >>.bin
path: opentx-i6x-1.1.0.bin
destination: openi6x-gvars-heli-<< pipeline.git.tag >>.bin
publish-github-release:
docker:
- image: cibuilds/github:0.13
Expand Down Expand Up @@ -57,7 +57,7 @@ workflows:
# ignore: /.*/
# tags:
# only: /.*-release$/
- build-heli
- build-gvars-heli
# filters:
# branches:
# ignore: /.*/
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
project(OpenTX)

set(VERSION_MAJOR "2")
set(VERSION_MINOR "3")
set(VERSION_MAJOR "1")
set(VERSION_MINOR "1")
set(VERSION_REVISION "0")
set(VERSION_SUFFIX $ENV{OPENTX_VERSION_SUFFIX})
set(VERSION_FAMILY ${VERSION_MAJOR}.${VERSION_MINOR})
Expand Down
24 changes: 4 additions & 20 deletions radio/src/buzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,14 @@

#include "opentx.h"

void pushPrompt(uint16_t value)
{
TRACE("pushPrompt %u", value);
}

void pushCustomPrompt(uint8_t value)
{
pushPrompt(PROMPT_CUSTOM_BASE + value);
}

void pushNumberPrompt(uint8_t value)
{
pushPrompt(PROMPT_I18N_BASE + value);
}

void pushUnit(uint8_t unit, uint8_t idx, uint8_t id){
TRACE("pushUnit %u", unit);
}
#define pushPrompt(value)
#define pushCustomPrompt(value)
#define pushNumberPrompt(value)

void audioEvent(unsigned int index){
TRACE("audioEvent %u", index);
// TRACE("audioEvent %u", index);
}

bool isPlaying(){
TRACE("isPlaying");
return false;
}
11 changes: 1 addition & 10 deletions radio/src/buzzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ extern void pushUnit(uint8_t unit, uint8_t idx, uint8_t id);
extern bool isPlaying();
extern void audioEvent(unsigned int index);

extern uint8_t g_beepCnt;
extern uint8_t beepAgain;
extern uint8_t beepAgainOrig;
extern uint8_t beepOn;
extern bool warble;
extern bool warbleC;

#if defined(HAPTIC)
extern uint8_t hapticTick;
#endif /* HAPTIC */
Expand Down Expand Up @@ -75,8 +68,6 @@ void buzzerEvent(unsigned int index);
#define AUDIO_TRAINER_LOST() buzzerEvent(AU_TRAINER_LOST)
#define AUDIO_TRAINER_BACK() buzzerEvent(AU_TRAINER_BACK)

#define IS_AUDIO_BUSY() (g_beepCnt || beepAgain || beepOn)

#define AUDIO_RESET()
#define AUDIO_FLUSH()

Expand All @@ -99,7 +90,7 @@ void buzzerEvent(unsigned int index);
#define PUSH_NUMBER_PROMPT(p) pushPrompt(PROMPT_I18N_BASE+(p))
#define PUSH_SYSTEM_PROMPT(p) pushPrompt(PROMPT_SYSTEM_BASE+(p))
#define PLAY_NUMBER(n, u, a)
#define PUSH_UNIT_PROMPT(p, i) pushUnit((p), (i), id)
#define PUSH_UNIT_PROMPT(p, i)
#define PLAY_DURATION(d, att) {}
#define PLAY_TIME
#define IS_PLAY_TIME() (0)
Expand Down
8 changes: 4 additions & 4 deletions radio/src/cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ int cliTrace(const char ** argv)

int cliStackInfo(const char ** argv)
{
#if !defined(PCBI6)
#if !defined(PCBI6X)
serialPrint("[MAIN] %d available / %d", stackAvailable(), stackSize() * 4); // stackSize() returns size in 32bit chunks
#endif
serialPrint("[MENUS] %d available / %d", menusStack.available(), menusStack.size());
Expand Down Expand Up @@ -792,7 +792,7 @@ const MemArea memAreas[] = {
{ "GPIOD", GPIOD, sizeof(GPIO_TypeDef) },
{ "GPIOE", GPIOE, sizeof(GPIO_TypeDef) },
{ "GPIOF", GPIOF, sizeof(GPIO_TypeDef) },
#if !defined(PCBI6)
#if !defined(PCBI6X)
{ "GPIOG", GPIOG, sizeof(GPIO_TypeDef) },
#endif
{ "USART1", USART1, sizeof(USART_TypeDef) },
Expand Down Expand Up @@ -1035,7 +1035,7 @@ int cliDisplay(const char ** argv)
case 2:
tim = TIM2;
break;
#if !defined(PCBI6)
#if !defined(PCBI6X)
case 13:
tim = TIM13;
break;
Expand Down Expand Up @@ -1063,7 +1063,7 @@ int cliDisplay(const char ** argv)
serialPrint(" CCR4 0x%x", tim->CCR4);
}
}
#if !defined(PCBI6)
#if !defined(PCBI6X)
else if (!strcmp(argv[1], "dma")) {
serialPrint("DMA1_Stream7");
serialPrint(" CR 0x%x", DMA1_Stream7->CR);
Expand Down
42 changes: 21 additions & 21 deletions radio/src/dataconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
#define MAX_INPUTS 32
#define MAX_TRAINER_CHANNELS 16
#define MAX_TELEMETRY_SENSORS 32
#elif defined(PCBI6)
#elif defined(PCBI6X)
#define MAX_MODELS 16
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
#define MAX_FLIGHT_MODES 5
Expand All @@ -79,12 +79,12 @@
#define MAX_SPECIAL_FUNCTIONS 11 // number of functions assigned to switches
#define MAX_TRAINER_CHANNELS 8
#define MAX_INPUTS 16
#if defined(PCBI6_ELRSV2)
#define MAX_TELEMETRY_SENSORS 22
#if defined(PCBI6X_ELRSV2)
#define MAX_TELEMETRY_SENSORS 24 // 48b each
#else
#define MAX_TELEMETRY_SENSORS 28
#define MAX_TELEMETRY_SENSORS 30
#endif
#define MAX_SCRIPTS 0
#define MAX_SCRIPTS 0
#else
#define MAX_MODELS 16
#define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
Expand Down Expand Up @@ -149,7 +149,7 @@ enum CurveType {
#define MAX_CURVE_POINTS 512
#endif

#if defined(PCBTARANIS) || defined(PCBSKY9X) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBSKY9X) || defined(PCBHORUS) || defined(PCBI6X)
#define NUM_MODULES 2
#else
#define NUM_MODULES 1
Expand Down Expand Up @@ -203,7 +203,7 @@ enum BeeperMode {
e_mode_all
};

#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
enum ModuleIndex {
INTERNAL_MODULE,
EXTERNAL_MODULE,
Expand Down Expand Up @@ -239,7 +239,7 @@ enum BeeperMode {
#define TRAINER_MODE_MAX() HAS_WIRELESS_TRAINER_HARDWARE() ? TRAINER_MODE_MASTER_BATTERY_COMPARTMENT : TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE
#endif

#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
#define IS_INTERNAL_MODULE_ENABLED() (g_model.moduleData[INTERNAL_MODULE].type != MODULE_TYPE_NONE)
#elif defined(PCBSKY9X)
#define IS_INTERNAL_MODULE_ENABLED() (false)
Expand Down Expand Up @@ -376,7 +376,7 @@ enum SwitchSources {

SWSRC_FIRST_SWITCH,

#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6)
#if defined(PCBTARANIS) || defined(PCBHORUS) || defined(PCBI6X)
SWSRC_SA0 = SWSRC_FIRST_SWITCH,
SWSRC_SA1,
SWSRC_SA2,
Expand All @@ -389,22 +389,22 @@ enum SwitchSources {
SWSRC_SD0,
SWSRC_SD1,
SWSRC_SD2,
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SE0,
SWSRC_SE1,
SWSRC_SE2,
#endif
#if !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SF0,
SWSRC_SF1,
SWSRC_SF2,
#endif
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SG0,
SWSRC_SG1,
SWSRC_SG2,
#endif
#if !defined(PCBXLITE) && !defined(PCBI6)
#if !defined(PCBXLITE) && !defined(PCBI6X)
SWSRC_SH0,
SWSRC_SH1,
SWSRC_SH2,
Expand Down Expand Up @@ -444,7 +444,7 @@ enum SwitchSources {
#if defined(PCBX9E)
SWSRC_TRAINER = SWSRC_SH2,
SWSRC_LAST_SWITCH = SWSRC_SR2,
#elif defined(PCBXLITE) || defined(PCBI6)
#elif defined(PCBXLITE) || defined(PCBI6X)
SWSRC_TRAINER = SWSRC_SD2,
SWSRC_LAST_SWITCH = SWSRC_SD2,
#else
Expand Down Expand Up @@ -574,7 +574,7 @@ 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 = MIXSRC_SLIDER4,
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBI6)
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBI6X)
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
MIXSRC_LAST_POT = MIXSRC_POT2,
Expand Down Expand Up @@ -625,7 +625,7 @@ enum MixSources {

MIXSRC_FIRST_SWITCH,

#if defined(PCBXLITE) || defined(PCBI6)
#if defined(PCBXLITE) || defined(PCBI6X)
MIXSRC_SA = MIXSRC_FIRST_SWITCH, LUA_EXPORT("sa", "Switch A")
MIXSRC_SB, LUA_EXPORT("sb", "Switch B")
MIXSRC_SC, LUA_EXPORT("sc", "Switch C")
Expand Down Expand Up @@ -749,16 +749,16 @@ enum Functions {
// then the other functions
FUNC_FIRST_WITHOUT_ENABLE,
FUNC_PLAY_SOUND = FUNC_FIRST_WITHOUT_ENABLE,
// FUNC_PLAY_TRACK,
// FUNC_PLAY_VALUE,
// FUNC_PLAY_TRACK,
// FUNC_PLAY_VALUE,
FUNC_RESERVE4,
FUNC_PLAY_SCRIPT,
FUNC_RESERVE5,
// FUNC_BACKGND_MUSIC,
// FUNC_BACKGND_MUSIC_PAUSE,
// FUNC_BACKGND_MUSIC,
// FUNC_BACKGND_MUSIC_PAUSE,
FUNC_VARIO,
FUNC_HAPTIC,
// FUNC_LOGS,
// FUNC_LOGS,
FUNC_BACKLIGHT,
#if defined(PCBTARANIS)
FUNC_SCREENSHOT,
Expand Down
12 changes: 6 additions & 6 deletions radio/src/datastructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ PACK(struct ModuleData {
uint8_t failsafeMode : 4; // only 3 bits used
uint8_t subType : 3;
uint8_t invertedSerial : 1; // telemetry serial inverted from standard
#if defined(PCBI6)
#if defined(PCBI6X)
uint8_t rxID[4];
uint16_t servoFreq;
#endif
Expand Down Expand Up @@ -492,7 +492,7 @@ typedef uint32_t swarnenable_t;
typedef uint16_t swconfig_t;
typedef uint16_t swarnstate_t;
typedef uint8_t swarnenable_t;
#elif defined(PCBI6)
#elif defined(PCBI6X)
typedef uint8_t swconfig_t;
typedef uint8_t swarnstate_t;
typedef uint8_t swarnenable_t;
Expand Down Expand Up @@ -566,7 +566,7 @@ PACK(struct CustomScreenData {
char inputNames[MAX_INPUTS][LEN_INPUT_NAME]; \
uint8_t potsWarnEnabled; \
int8_t potsWarnPosition[NUM_POTS + NUM_SLIDERS];
#elif defined(PCBI6)
#elif defined(PCBI6X)
#define MODELDATA_EXTRA \
NOBACKUP(uint8_t spare : 3); \
NOBACKUP(uint8_t trainerMode : 3); \
Expand Down Expand Up @@ -701,7 +701,7 @@ PACK(struct TrainerData {
NOBACKUP(uint8_t spare : 1); \
NOBACKUP(uint8_t blOffBright : 7); \
NOBACKUP(char bluetoothName[LEN_BLUETOOTH_NAME]);
#elif defined(PCBTARANIS) || defined(PCBI6)
#elif defined(PCBTARANIS) || defined(PCBI6X)
#if defined(BLUETOOTH)
#define BLUETOOTH_FIELDS \
uint8_t spare; \
Expand Down Expand Up @@ -887,7 +887,7 @@ static inline void check_struct() {
CHKSIZE(FrSkyTelemetryData, 88);
CHKSIZE(ModelHeader, 12);
CHKTYPE(CurveData, 4);
#elif defined(PCBI6)
#elif defined(PCBI6X)
CHKSIZE(LimitData, 11);
CHKSIZE(MixData, 20);
CHKSIZE(ExpoData, 17);
Expand Down Expand Up @@ -924,7 +924,7 @@ static inline void check_struct() {
CHKSIZE(LogicalSwitchData, 9);
CHKSIZE(TelemetrySensor, 14);

#if defined(PCBI6)
#if defined(PCBI6X)
CHKSIZE(ModuleData, 44);
#else
CHKSIZE(ModuleData, 70);
Expand Down
2 changes: 1 addition & 1 deletion radio/src/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ enum InterruptNames {
#endif // #if defined(DEBUG_USB_INTERRUPTS)
INT_LAST
};
#elif defined(PCBTARANIS) || defined(PCBI6)
#elif defined(PCBTARANIS) || defined(PCBI6X)
enum InterruptNames {
INT_TICK,
INT_5MS,
Expand Down
Loading

0 comments on commit 706daf2

Please sign in to comment.