Remove various references of AVR from script and referenced files
This commit is contained in:
+1
-15
@@ -11,7 +11,6 @@ env:
|
||||
# - QT_BASE=56
|
||||
- QT_BASE=57
|
||||
# - GCC_ARM=/opt/gcc-arm-none-eabi/bin
|
||||
- AVR_FLAVORS="AVR9X 9X GRUVIN9X MEGA2560"
|
||||
- PYTHONPATH=${PYTHONPATH}:/usr/lib/python3/dist-packages
|
||||
matrix:
|
||||
#
|
||||
@@ -20,10 +19,6 @@ env:
|
||||
#
|
||||
# - FLAVOR=ALL
|
||||
- FLAVOR=DEFAULT
|
||||
# - FLAVOR=AVR9X
|
||||
# - FLAVOR=9X
|
||||
# - FLAVOR=GRUVIN9X
|
||||
# - FLAVOR=MEGA2560
|
||||
- FLAVOR=ARM9X
|
||||
# - FLAVOR=AR9X
|
||||
# - FLAVOR=SKY9X
|
||||
@@ -54,20 +49,11 @@ before_install:
|
||||
|
||||
install:
|
||||
- sudo apt-get --yes --force-yes install curl libmpfr4 libmpc3 libfox-1.6-dev libgtest-dev
|
||||
- |
|
||||
if [[ " ${AVR_FLAVORS} " =~ " ${FLAVOR} " || ${FLAVOR} == "ALL" ]]; then
|
||||
wget --quiet https://launchpad.net/ubuntu/+source/gcc-avr/1:4.9.2+Atmel3.5.0-1/+build/8403710/+files/gcc-avr_4.9.2+Atmel3.5.0-1_amd64.deb
|
||||
wget --quiet https://launchpad.net/ubuntu/+source/avr-libc/1:1.8.0+Atmel3.5.0-1/+build/8435473/+files/avr-libc_1.8.0+Atmel3.5.0-1_all.deb
|
||||
wget --quiet https://launchpad.net/ubuntu/+source/binutils-avr/2.25+Atmel3.5.0-2/+build/8435474/+files/binutils-avr_2.25+Atmel3.5.0-2_amd64.deb
|
||||
sudo dpkg --install gcc-avr_4.9.2+Atmel3.5.0-1_amd64.deb avr-libc_1.8.0+Atmel3.5.0-1_all.deb binutils-avr_2.25+Atmel3.5.0-2_amd64.deb
|
||||
fi
|
||||
if [[ ! " ${AVR_FLAVORS} " =~ " ${FLAVOR} " || ${FLAVOR} == "ALL" ]]; then
|
||||
sudo apt-get --yes --force-yes install gcc-arm-none-eabi
|
||||
- sudo apt-get --yes --force-yes install gcc-arm-none-eabi
|
||||
# Trying to build with gcc-arm 4.7 isn't working because it can't find the compiler, despite adding to PATH (in commit-tests.sh) by defining GCC_ARM above
|
||||
# - wget --quiet https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q3-update/+download/gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2
|
||||
# - tar xjf gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2
|
||||
# - mv gcc-arm-none-eabi-4_7-2013q3 /opt/gcc-arm-none-eabi
|
||||
fi
|
||||
- sudo apt-get install --yes --force-yes -qq qt${QT_BASE}base qt${QT_BASE}multimedia qt${QT_BASE}svg qt${QT_BASE}tools; source /opt/qt${QT_BASE}/bin/qt${QT_BASE}-env.sh
|
||||
|
||||
script:
|
||||
|
||||
@@ -341,12 +341,8 @@ if(GUI)
|
||||
foreach(FILE ${GUI_SRC})
|
||||
set(SRC ${SRC} gui/${GUI_DIR}/${FILE})
|
||||
endforeach()
|
||||
if(ARCH STREQUAL ARM)
|
||||
set(SRC
|
||||
${SRC}
|
||||
gui/gui_common_arm.cpp
|
||||
set(SRC ${SRC} gui/gui_common_arm.cpp
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
foreach(FILE ${TARGET_SRC})
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
void menuModelCurveOne(event_t event)
|
||||
{
|
||||
TITLE(STR_MENUCURVE);
|
||||
lcdDrawNumber(PSIZE(TR_MENUCURVE)*FW+1, 0, s_curveChan+1, INVERS|LEFT);
|
||||
DISPLAY_PROGRESS_BAR(20*FW+1);
|
||||
|
||||
CurveInfo crv = curveInfo(s_curveChan);
|
||||
|
||||
switch (event) {
|
||||
case EVT_ENTRY:
|
||||
s_editMode = 1;
|
||||
break;
|
||||
|
||||
CASE_EVT_ROTARY_BREAK
|
||||
case EVT_KEY_BREAK(KEY_ENTER):
|
||||
if (s_editMode <= 0)
|
||||
menuHorizontalPosition = 0;
|
||||
if (s_editMode == 1 && crv.custom)
|
||||
s_editMode = 2;
|
||||
else
|
||||
s_editMode = 1;
|
||||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
if (s_editMode <= 0) {
|
||||
if (int8_t(++menuHorizontalPosition) > 4)
|
||||
menuHorizontalPosition = -4;
|
||||
for (uint8_t i=0; i<crv.points; i++)
|
||||
crv.crv[i] = (i-(crv.points/2)) * int8_t(menuHorizontalPosition) * 50 / (crv.points-1);
|
||||
storageDirty(EE_MODEL);
|
||||
killEvents(event);
|
||||
}
|
||||
break;
|
||||
|
||||
case EVT_KEY_BREAK(KEY_EXIT):
|
||||
if (s_editMode > 0) {
|
||||
if (--s_editMode == 0)
|
||||
menuHorizontalPosition = 0;
|
||||
}
|
||||
else {
|
||||
popMenu();
|
||||
}
|
||||
break;
|
||||
|
||||
/* CASE_EVT_ROTARY_LEFT */
|
||||
case EVT_KEY_REPT(KEY_LEFT):
|
||||
case EVT_KEY_FIRST(KEY_LEFT):
|
||||
if (s_editMode==1 && menuHorizontalPosition>0) menuHorizontalPosition--;
|
||||
if (s_editMode <= 0) {
|
||||
if (crv.custom) {
|
||||
moveCurve(s_curveChan, -crv.points+2);
|
||||
}
|
||||
else if (crv.points > MIN_POINTS_PER_CURVE) {
|
||||
moveCurve(s_curveChan, -1, (crv.points+1)/2);
|
||||
}
|
||||
else {
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
/* CASE_EVT_ROTARY_RIGHT */
|
||||
case EVT_KEY_REPT(KEY_RIGHT):
|
||||
case EVT_KEY_FIRST(KEY_RIGHT):
|
||||
if (s_editMode==1 && menuHorizontalPosition<(crv.points-1)) menuHorizontalPosition++;
|
||||
if (s_editMode <= 0) {
|
||||
if (!crv.custom) {
|
||||
moveCurve(s_curveChan, crv.points-2, crv.points);
|
||||
}
|
||||
else if (crv.points < MAX_POINTS_PER_CURVE) {
|
||||
if (moveCurve(s_curveChan, 1)) {
|
||||
for (int8_t i=crv.points+crv.points-2; i>=0; i--) {
|
||||
if (i%2)
|
||||
crv.crv[i] = (crv.crv[i/2] + crv.crv[1+i/2]) / 2;
|
||||
else
|
||||
crv.crv[i] = crv.crv[i/2];
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
AUDIO_WARNING2();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
lcdDrawTextAlignedLeft(7*FH, STR_TYPE);
|
||||
uint8_t attr = (s_editMode <= 0 ? INVERS : 0);
|
||||
lcdDrawNumber(5*FW-2, 7*FH, crv.points, LEFT|attr);
|
||||
lcdDrawText(lcdLastRightPos, 7*FH, crv.custom ? PSTR("pt'") : PSTR("pt"), attr);
|
||||
|
||||
drawCurve();
|
||||
|
||||
if (s_editMode>0) {
|
||||
uint8_t i = menuHorizontalPosition;
|
||||
point_t point = getPoint(i);
|
||||
|
||||
if (s_editMode==1 || !BLINK_ON_PHASE) {
|
||||
// do selection square
|
||||
lcdDrawFilledRect(point.x-1, point.y-2, 5, 5, SOLID, FORCE);
|
||||
lcdDrawFilledRect(point.x, point.y-1, 3, 3, SOLID);
|
||||
}
|
||||
|
||||
int8_t x = -100 + 200*i/(crv.points-1);
|
||||
if (crv.custom && i>0 && i<crv.points-1) x = crv.crv[crv.points+i-1];
|
||||
lcdDrawText(7, 2*FH, PSTR("x=")); lcdDrawNumber(7+2*FW, 2*FH, x, LEFT);
|
||||
lcdDrawText(7, 3*FH, PSTR("y=")); lcdDrawNumber(7+2*FW, 3*FH, crv.crv[i], LEFT);
|
||||
lcdDrawRect(3, 1*FH+4, 7*FW-2, 3*FH-2);
|
||||
|
||||
if (p1valdiff || event==EVT_KEY_FIRST(KEY_DOWN) || event==EVT_KEY_FIRST(KEY_UP) || event==EVT_KEY_REPT(KEY_DOWN) || event==EVT_KEY_REPT(KEY_UP))
|
||||
CHECK_INCDEC_MODELVAR(event, crv.crv[i], -100, 100); // edit Y on up/down
|
||||
|
||||
if (i>0 && i<crv.points-1 && s_editMode==2 && (event==EVT_KEY_FIRST(KEY_LEFT) || event==EVT_KEY_FIRST(KEY_RIGHT) || event==EVT_KEY_REPT(KEY_LEFT) || event==EVT_KEY_REPT(KEY_RIGHT)))
|
||||
CHECK_INCDEC_MODELVAR(event, crv.crv[crv.points+i-1], i==1 ? -99 : crv.crv[crv.points+i-2]+1, i==crv.points-2 ? 99 : crv.crv[crv.points+i]-1); // edit X on left/right
|
||||
}
|
||||
}
|
||||
@@ -1,203 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
enum MenuModelOutputsItems {
|
||||
ITEM_OUTPUTS_OFFSET,
|
||||
ITEM_OUTPUTS_MIN,
|
||||
ITEM_OUTPUTS_MAX,
|
||||
ITEM_OUTPUTS_DIRECTION,
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
ITEM_OUTPUTS_PPM_CENTER,
|
||||
#endif
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
ITEM_OUTPUTS_SYMETRICAL,
|
||||
#endif
|
||||
ITEM_OUTPUTS_COUNT,
|
||||
ITEM_OUTPUTS_MAXROW = ITEM_OUTPUTS_COUNT-1
|
||||
};
|
||||
|
||||
#if defined(PPM_UNIT_US)
|
||||
#define LIMITS_MIN_POS 12*FW+1
|
||||
#else
|
||||
#define LIMITS_MIN_POS 12*FW-2
|
||||
#endif
|
||||
|
||||
#define LIMITS_OFFSET_POS 8*FW
|
||||
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
#define LIMITS_MAX_POS 15*FW+3
|
||||
#define LIMITS_REVERT_POS 16*FW-1
|
||||
#define LIMITS_PPM_CENTER_POS 20*FW+1
|
||||
#else
|
||||
#define LIMITS_DIRECTION_POS 12*FW+4
|
||||
#define LIMITS_MAX_POS 16*FW+4
|
||||
#define LIMITS_REVERT_POS 17*FW
|
||||
#endif
|
||||
#else
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
#define LIMITS_MAX_POS 16*FW
|
||||
#define LIMITS_REVERT_POS 17*FW-2
|
||||
#define LIMITS_PPM_CENTER_POS 21*FW+2
|
||||
#else
|
||||
#define LIMITS_MAX_POS 17*FW
|
||||
#define LIMITS_REVERT_POS 18*FW
|
||||
#define LIMITS_DIRECTION_POS 12*FW+5
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define LIMITS_CURVE_POS 17*FW+1
|
||||
#define LIMITS_MIN_MAX_OFFSET 100
|
||||
#define CONVERT_US_MIN_MAX(x) ((int16_t(x)*128)/25)
|
||||
#define MIN_MAX_ATTR attr
|
||||
|
||||
#if defined(PPM_UNIT_US)
|
||||
#define SET_MIN_MAX(x, val) x = ((val)*250)/128
|
||||
#define MIN_MAX_DISPLAY(x) CONVERT_US_MIN_MAX(x)
|
||||
#else
|
||||
#define MIN_MAX_DISPLAY(x) ((int8_t)(x))
|
||||
#endif
|
||||
|
||||
void menuModelLimits(event_t event)
|
||||
{
|
||||
uint8_t sub = menuVerticalPosition - HEADER_LINE;
|
||||
|
||||
if (sub < MAX_OUTPUT_CHANNELS) {
|
||||
#if defined(PPM_CENTER_ADJUSTABLE) || defined(PPM_UNIT_US)
|
||||
lcdDrawNumber(13*FW, 0, PPM_CH_CENTER(sub)+channelOutputs[sub]/2, RIGHT);
|
||||
lcdDrawText(13*FW, 0, STR_US);
|
||||
#else
|
||||
lcdDrawNumber(13*FW, 0, calcRESXto1000(channelOutputs[sub]), RIGHT|PREC1);
|
||||
#endif
|
||||
}
|
||||
|
||||
MENU(STR_MENULIMITS, menuTabModel, MENU_MODEL_OUTPUTS, HEADER_LINE+MAX_OUTPUT_CHANNELS+1, { HEADER_LINE_COLUMNS ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, ITEM_OUTPUTS_MAXROW, 0});
|
||||
|
||||
if (warningResult) {
|
||||
warningResult = 0;
|
||||
LimitData * ld = limitAddress(sub);
|
||||
ld->revert = !ld->revert;
|
||||
storageDirty(EE_MODEL);
|
||||
}
|
||||
|
||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
|
||||
uint8_t k = i+menuVerticalOffset;
|
||||
|
||||
if (k == MAX_OUTPUT_CHANNELS) {
|
||||
// last line available - add the "copy trim menu" line
|
||||
LcdFlags attr = (sub==MAX_OUTPUT_CHANNELS) ? INVERS : 0;
|
||||
lcdDrawText(CENTER_OFS, y, STR_TRIMS2OFFSETS, NO_HIGHLIGHT() ? 0 : attr);
|
||||
if (attr) {
|
||||
s_editMode = 0;
|
||||
if (event == EVT_KEY_LONG(KEY_ENTER)) {
|
||||
START_NO_HIGHLIGHT();
|
||||
killEvents(event);
|
||||
moveTrimsToOffsets(); // if highlighted and menu pressed - move trims to offsets
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
LimitData * ld = limitAddress(k);
|
||||
|
||||
#if !defined(PPM_CENTER_ADJUSTABLE)
|
||||
int16_t v = (ld->revert) ? -LIMIT_OFS(ld) : LIMIT_OFS(ld);
|
||||
char swVal = '-'; // '-', '<', '>'
|
||||
if ((channelOutputs[k] - v) > 50) swVal = (ld->revert ? 127 : 126); // Switch to raw inputs? - remove trim!
|
||||
if ((channelOutputs[k] - v) < -50) swVal = (ld->revert ? 126 : 127);
|
||||
putsChn(0, y, k+1, 0);
|
||||
lcdDrawChar(LIMITS_DIRECTION_POS, y, swVal);
|
||||
#endif
|
||||
|
||||
limit_min_max_t limit = (g_model.extendedLimits ? LIMIT_EXT_MAX : 100);
|
||||
|
||||
putsChn(0, y, k+1, IS_LINE_SELECTED(sub, k) ? INVERS : 0);
|
||||
|
||||
for (uint8_t j=0; j<ITEM_OUTPUTS_COUNT; j++) {
|
||||
uint8_t attr = ((sub==k && menuHorizontalPosition==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||
uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ;
|
||||
if (active) STICK_SCROLL_DISABLE();
|
||||
switch (j) {
|
||||
case ITEM_OUTPUTS_OFFSET:
|
||||
#if defined(PPM_UNIT_US)
|
||||
lcdDrawNumber(LIMITS_OFFSET_POS, y, ((int32_t)ld->offset*128) / 25, attr|PREC1|RIGHT);
|
||||
#else
|
||||
lcdDrawNumber(LIMITS_OFFSET_POS, y, ld->offset, attr|PREC1|RIGHT);
|
||||
#endif
|
||||
if (active) {
|
||||
ld->offset = checkIncDec(event, ld->offset, -1000, 1000, EE_MODEL|NO_INCDEC_MARKS);
|
||||
}
|
||||
else if (attr && event==EVT_KEY_LONG(KEY_MENU)) {
|
||||
copySticksToOffset(k);
|
||||
s_editMode = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM_OUTPUTS_MIN:
|
||||
lcdDrawNumber(LIMITS_MIN_POS, y, MIN_MAX_DISPLAY(ld->min-LIMITS_MIN_MAX_OFFSET), MIN_MAX_ATTR|RIGHT);
|
||||
if (active) {
|
||||
ld->min = LIMITS_MIN_MAX_OFFSET + checkIncDec(event, ld->min-LIMITS_MIN_MAX_OFFSET, -limit, 0, EE_MODEL);
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM_OUTPUTS_MAX:
|
||||
lcdDrawNumber(LIMITS_MAX_POS, y, MIN_MAX_DISPLAY(ld->max+LIMITS_MIN_MAX_OFFSET), MIN_MAX_ATTR|RIGHT);
|
||||
if (active) {
|
||||
ld->max = -LIMITS_MIN_MAX_OFFSET + checkIncDec(event, ld->max+LIMITS_MIN_MAX_OFFSET, 0, +limit, EE_MODEL);
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM_OUTPUTS_DIRECTION:
|
||||
{
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
lcdDrawChar(LIMITS_REVERT_POS, y, ld->revert ? 127 : 126, attr);
|
||||
#else
|
||||
lcdDrawTextAtIndex(LIMITS_REVERT_POS, y, STR_MMMINV, ld->revert, attr);
|
||||
#endif
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, ld->revert, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
#if defined(PPM_CENTER_ADJUSTABLE)
|
||||
case ITEM_OUTPUTS_PPM_CENTER:
|
||||
lcdDrawNumber(LIMITS_PPM_CENTER_POS, y, PPM_CENTER+ld->ppmCenter, RIGHT|attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR(event, ld->ppmCenter, -PPM_CENTER_MAX, +PPM_CENTER_MAX);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(PPM_LIMITS_SYMETRICAL)
|
||||
case ITEM_OUTPUTS_SYMETRICAL:
|
||||
lcdDrawChar(LCD_W-FW, y, ld->symetrical ? '=' : '^', attr);
|
||||
if (active) {
|
||||
CHECK_INCDEC_MODELVAR_ZERO(event, ld->symetrical, 1);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,17 +23,10 @@ set(GUI_SRC
|
||||
)
|
||||
|
||||
if(GUI_DIR STREQUAL 128x64)
|
||||
if (ARCH STREQUAL ARM)
|
||||
set(GUI_SRC
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
model_outputs_arm.cpp
|
||||
)
|
||||
else()
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
model_outputs_avr.cpp
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
|
||||
@@ -8,26 +8,21 @@ if(HELI)
|
||||
set(GUI_SRC ${GUI_SRC} ../common/stdlcd/model_heli.cpp)
|
||||
endif()
|
||||
|
||||
if(ARCH STREQUAL ARM)
|
||||
add_definitions(-DGRAPHICS)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_inputs.cpp
|
||||
../common/stdlcd/model_mixes.cpp
|
||||
../common/stdlcd/view_text.cpp
|
||||
)
|
||||
set(CURVE_EDIT_SRC model_curve_edit.cpp)
|
||||
else()
|
||||
set(CURVE_EDIT_SRC model_curve_simple_edit.cpp)
|
||||
endif()
|
||||
add_definitions(-DGRAPHICS)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_inputs.cpp
|
||||
../common/stdlcd/model_mixes.cpp
|
||||
../common/stdlcd/view_text.cpp
|
||||
)
|
||||
set(CURVE_EDIT_SRC )
|
||||
|
||||
if(CURVES)
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_curves.cpp
|
||||
${CURVE_EDIT_SRC}
|
||||
)
|
||||
endif()
|
||||
|
||||
set(GUI_SRC
|
||||
${GUI_SRC}
|
||||
../common/stdlcd/model_curves.cpp
|
||||
model_curve_edit.cpp
|
||||
)
|
||||
|
||||
if(SDCARD)
|
||||
set(GUI_SRC
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _PGMTYPES_H_
|
||||
#define _PGMTYPES_H_
|
||||
|
||||
/* this is workaround for g++ bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34734 */
|
||||
#if (((__GNUC__ * 1000) + __GNUC_MINOR__) * 1000 + __GNUC_PATCHLEVEL__) < 4006002
|
||||
# ifdef __cplusplus
|
||||
# undef PROGMEM
|
||||
# define PROGMEM __attribute__(( section(".progmem.data") ))
|
||||
# undef PSTR
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* old (pre 1.8.0) avr-libc does not have progmem macros compatible with new gcc
|
||||
* note: even for old gcc, definition was wrong. Old gcc was just more tolerant. */
|
||||
#if (((__AVR_LIBC_MAJOR__ * 1000) + __AVR_LIBC_MINOR__) * 1000 + __AVR_LIBC_REVISION__) < 1008000
|
||||
# ifndef __PGMSPACE_H_
|
||||
# warning "This file should be included after <avr/pgmspace.h>"
|
||||
# endif
|
||||
# undef PSTR
|
||||
# undef PGM_P
|
||||
# undef PGM_VOID_P
|
||||
# define PGM_P const char *
|
||||
# define PGM_VOID_P const void *
|
||||
#endif
|
||||
|
||||
#ifndef PSTR
|
||||
# define PSTR(s) (__extension__({static const char __c[] PROGMEM = (s);&__c[0];}))
|
||||
#endif
|
||||
|
||||
typedef void pm_void;
|
||||
typedef char pm_char;
|
||||
typedef unsigned char pm_uchar;
|
||||
typedef int8_t pm_int8_t;
|
||||
typedef uint8_t pm_uint8_t;
|
||||
typedef int16_t pm_int16_t;
|
||||
typedef uint16_t pm_uint16_t;
|
||||
typedef int32_t pm_int32_t;
|
||||
typedef uint32_t pm_uint32_t;
|
||||
|
||||
#endif // _PGMTYPES_H_
|
||||
|
||||
@@ -16,14 +16,11 @@ INVALID_BOARD = 6
|
||||
INVALID_LANGUAGE = 7
|
||||
|
||||
# Board types
|
||||
BOARD_9X = 0
|
||||
BOARD_GRUVIN9X = 1
|
||||
BOARD_SKY9X = 2
|
||||
BOARD_TARANIS = 3
|
||||
BOARD_HORUS = 4
|
||||
|
||||
# Board families
|
||||
BOARD_FAMILY_AVR = 0
|
||||
BOARD_FAMILY_ARM = 1
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
@@ -40,47 +37,8 @@ if len(options) < 2 or options[0] != "opentx":
|
||||
optcount = 1
|
||||
command_options = {}
|
||||
|
||||
if options[optcount] == "9x":
|
||||
command_options["PCB"] = "9X"
|
||||
firmware_options = options_9x
|
||||
maxsize = 65536
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "9xr":
|
||||
command_options["PCB"] = "9XR"
|
||||
firmware_options = options_9x
|
||||
maxsize = 65536
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "9x128":
|
||||
command_options["PCB"] = "9X128"
|
||||
command_options["FRSKY_STICKS"] = "YES"
|
||||
firmware_options = options_9x128
|
||||
maxsize = 65536 * 2
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "9xr128":
|
||||
command_options["PCB"] = "9XR128"
|
||||
command_options["FRSKY_STICKS"] = "YES"
|
||||
firmware_options = options_9x128
|
||||
maxsize = 65536 * 2
|
||||
board = BOARD_9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "gruvin9x":
|
||||
command_options["PCB"] = "GRUVIN9X"
|
||||
command_options["TELEMETRY"] = "FRSKY"
|
||||
firmware_options = options_gruvin9x
|
||||
maxsize = 65536 * 4
|
||||
board = BOARD_GRUVIN9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "mega2560":
|
||||
command_options["PCB"] = "MEGA2560"
|
||||
command_options["TELEMETRY"] = "FRSKY"
|
||||
firmware_options = options_mega2560
|
||||
maxsize = 65536 * 4
|
||||
board = BOARD_GRUVIN9X
|
||||
board_family = BOARD_FAMILY_AVR
|
||||
elif options[optcount] == "sky9x":
|
||||
|
||||
if options[optcount] == "sky9x":
|
||||
command_options["PCB"] = "SKY9X"
|
||||
firmware_options = options_sky9x
|
||||
maxsize = 65536 * 4
|
||||
@@ -234,9 +192,6 @@ def build_firmware(path):
|
||||
# Check binary size
|
||||
if board_family == BOARD_FAMILY_ARM:
|
||||
size = os.stat(target).st_size
|
||||
else:
|
||||
size = subprocess.check_output('avr-size -A %s | grep Total | cut -f2- -d " "' % target, shell=True)
|
||||
size = int(size.strip())
|
||||
if size > maxsize:
|
||||
exit(FIRMWARE_SIZE_TOO_BIG)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user