mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 00:05:17 +03:00
Compilation fix
This commit is contained in:
parent
86df9fee4a
commit
87f8ea516b
4 changed files with 33 additions and 32 deletions
|
@ -22,10 +22,10 @@
|
|||
|
||||
#define XPOT_DELTA 10
|
||||
#define XPOT_DELAY 10 /* cycles */
|
||||
#define BAR_WIDTH 7
|
||||
#define BAR_HEIGHT (BOX_WIDTH-9)
|
||||
#define BAR_INTERVAL 20
|
||||
#define BAR_BOTTOM 200
|
||||
#define POT_BAR_WIDTH 7
|
||||
#define POT_BAR_HEIGHT (BOX_WIDTH-9)
|
||||
#define POT_BAR_INTERVAL 20
|
||||
#define POT_BAR_BOTTOM 200
|
||||
#define LBOX_CENTERX (BOX_WIDTH/2 + 17)
|
||||
#define RBOX_CENTERX (LCD_W-LBOX_CENTERX)
|
||||
|
||||
|
@ -33,12 +33,12 @@ void drawPotsBars()
|
|||
{
|
||||
// Optimization by Mike Blandford
|
||||
unsigned int x, i, len ; // declare temporary variables
|
||||
for (x=LCD_W/2-(BAR_INTERVAL*NUM_POTS/2), i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; x+=BAR_INTERVAL, i++) {
|
||||
for (x=LCD_W/2-(POT_BAR_INTERVAL*NUM_POTS/2), i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; x+=POT_BAR_INTERVAL, i++) {
|
||||
if (IS_POT_AVAILABLE(i)) {
|
||||
len = ((calibratedStick[i]+RESX)*BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
|
||||
len = ((calibratedStick[i]+RESX)*POT_BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
|
||||
// TODO 220 constant
|
||||
lcdDrawSolidFilledRect(x, BAR_BOTTOM-len, BAR_WIDTH, len, TEXT_COLOR);
|
||||
putsStickName(x-2, BAR_BOTTOM+5, i, TEXT_COLOR|TINSIZE);
|
||||
lcdDrawSolidFilledRect(x, POT_BAR_BOTTOM-len, POT_BAR_WIDTH, len, TEXT_COLOR);
|
||||
putsStickName(x-2, POT_BAR_BOTTOM+5, i, TEXT_COLOR|TINSIZE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ bool menuCommonCalib(evt_t event)
|
|||
}
|
||||
}
|
||||
else {
|
||||
g_eeGeneral.potsConfig &= ~(0x03<<(2*idx));
|
||||
// g_eeGeneral.potsConfig &= ~(0x03<<(2*idx));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ bool menuCommonCalib(evt_t event)
|
|||
steps = calib->count + 1;
|
||||
}
|
||||
if (steps > 0 && steps <= XPOTS_MULTIPOS_COUNT) {
|
||||
lcdDrawNumber(LCD_W/2-(BAR_INTERVAL*NUM_POTS/2)+(BAR_INTERVAL*(i-POT1)), BAR_BOTTOM+15, steps, TEXT_COLOR|TINSIZE, 0, "[", "]");
|
||||
lcdDrawNumber(LCD_W/2-(POT_BAR_INTERVAL*NUM_POTS/2)+(POT_BAR_INTERVAL*(i-POT1)), POT_BAR_BOTTOM+15, steps, TEXT_COLOR|TINSIZE, 0, "[", "]");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
#define MAX_FLIGHT_MODES 9
|
||||
#define MAX_MIXERS 64
|
||||
#define MAX_EXPOS 64
|
||||
#define NUM_LOGICAL_SWITCH 32 // number of custom switches
|
||||
#define NUM_LOGICAL_SWITCH 64 // number of custom switches
|
||||
#define NUM_CFN 64 // number of functions assigned to switches
|
||||
#define MAX_SCRIPTS 9
|
||||
#define MAX_INPUTS 32
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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"
|
||||
|
||||
#define CS_LAST_VALUE_INIT -32768
|
||||
|
@ -554,7 +554,7 @@ bool getSwitch(swsrc_t swtch)
|
|||
result = true;
|
||||
}
|
||||
else if (cs_idx <= SWSRC_LAST_SWITCH) {
|
||||
#if defined(PCBTARANIS) // TODO || defined(PCBFLAMENCO)
|
||||
#if defined(PCBTARANIS) || defined(PCBHORUS) // TODO || defined(PCBFLAMENCO)
|
||||
if (flags & GETSWITCH_MIDPOS_DELAY)
|
||||
result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
|
||||
else
|
||||
|
|
|
@ -136,6 +136,7 @@ void menusTask(void * pdata)
|
|||
break;
|
||||
}
|
||||
else if (pwr_check == e_power_press) {
|
||||
CoTickDelay(MENU_TASK_PERIOD_TICKS);
|
||||
continue;
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue