BOLD = YES / NO option
Because this option costs around 400bytes
This commit is contained in:
+6
-1
@@ -62,8 +62,9 @@ HAPTIC = NO
|
||||
# SPLASH on START
|
||||
SPLASH = YES
|
||||
|
||||
# GRAPHICS (sliders / checkboxes)
|
||||
# GRAPHICS (sliders / checkboxes / bold)
|
||||
GRAPHICS = YES
|
||||
BOLD = YES
|
||||
|
||||
# THR trace (in STATS screen)
|
||||
THR_TRACE = YES
|
||||
@@ -257,6 +258,10 @@ ifeq ($(GRAPHICS), YES)
|
||||
CPPDEFS += -DGRAPHICS
|
||||
endif
|
||||
|
||||
ifeq ($(BOLD), YES)
|
||||
CPPDEFS += -DBOLD_FONT
|
||||
endif
|
||||
|
||||
ifeq ($(THR_TRACE), YES)
|
||||
CPPDEFS += -DTHRTRACE
|
||||
endif
|
||||
|
||||
@@ -135,6 +135,7 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
|
||||
if (p<DISPLAY_END) {
|
||||
*p = (*p & (~(0xff << ym8))) + (b << ym8);
|
||||
if (ym8) { uint8_t *r = p + DISPLAY_W; if (r<DISPLAY_END) *r = (*r & (~(0xff >> (8-ym8)))) + (b >> (8-ym8)); }
|
||||
#ifdef BOLD_FONT
|
||||
if (mode & BOLD) {
|
||||
if (inv)
|
||||
*(p+1) &= (b << ym8);
|
||||
@@ -142,6 +143,7 @@ void lcd_putcAtt(uint8_t x, uint8_t y, const unsigned char c, uint8_t mode)
|
||||
*(p+1) |= (b << ym8);
|
||||
|
||||
}
|
||||
#endif
|
||||
}
|
||||
p--;
|
||||
}
|
||||
|
||||
@@ -46,7 +46,11 @@
|
||||
/* lcd text flags */
|
||||
#define INVERS 0x02
|
||||
#define DBLSIZE 0x04
|
||||
#ifdef BOLD_FONT
|
||||
#define BOLD 0x40
|
||||
#else
|
||||
#define BOLD 0x00
|
||||
#endif
|
||||
|
||||
/* lcd putc flags */
|
||||
#define CONDENSED 0x08
|
||||
|
||||
@@ -354,7 +354,9 @@ int16_t Expo::expo(int16_t x)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BOLD_FONT
|
||||
ACTIVE_EXPOS_TYPE activeExpos;
|
||||
#endif
|
||||
|
||||
void applyExpos(int16_t *anas)
|
||||
{
|
||||
@@ -363,7 +365,10 @@ void applyExpos(int16_t *anas)
|
||||
|
||||
uint8_t phase = s_perout_flight_phase + 1;
|
||||
int8_t cur_chn = -1;
|
||||
|
||||
#ifdef BOLD_FONT
|
||||
activeExpos = 0;
|
||||
#endif
|
||||
|
||||
for (uint8_t i=0; i<MAX_EXPOS; i++) {
|
||||
ExpoData &ed = g_model.expoData[i];
|
||||
@@ -393,7 +398,9 @@ void applyExpos(int16_t *anas)
|
||||
}
|
||||
}
|
||||
if (getSwitch(ed.swtch, 1)) {
|
||||
#ifdef BOLD_FONT
|
||||
activeExpos |= ((ACTIVE_EXPOS_TYPE)1 << i);
|
||||
#endif
|
||||
int16_t v = anas2[ed.chn];
|
||||
if((v<0 && ed.mode&1) || (v>=0 && ed.mode&2)) {
|
||||
cur_chn = ed.chn;
|
||||
@@ -1908,7 +1915,9 @@ void perOut(uint8_t tick10ms)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef BOLD_FONT
|
||||
activeMixes |= ((ACTIVE_MIXES_TYPE)1 << i);
|
||||
#endif
|
||||
|
||||
//========== OFFSET ===============
|
||||
if (apply_offset && md->sOffset) v += calc100toRESX(md->sOffset);
|
||||
@@ -1971,8 +1980,10 @@ void perOut(uint8_t tick10ms)
|
||||
switch(md->mltpx){
|
||||
case MLTPX_REP:
|
||||
*ptr = dv;
|
||||
#ifdef BOLD_FONT
|
||||
for (uint8_t m=i-1; m>=0 && mixaddress(m)->destCh == md->destCh; m--)
|
||||
activeMixes &= ~((ACTIVE_MIXES_TYPE)1 << m);
|
||||
#endif
|
||||
break;
|
||||
case MLTPX_MUL:
|
||||
dv /= 100;
|
||||
@@ -1999,11 +2010,15 @@ char userDataDisplayBuf[TELEM_SCREEN_BUFFER_SIZE];
|
||||
#define TIME_TO_WRITE s_eeDirtyMsk
|
||||
#endif
|
||||
|
||||
#ifdef BOLD_FONT
|
||||
ACTIVE_MIXES_TYPE activeMixes;
|
||||
#endif
|
||||
int32_t sum_chans512[NUM_CHNOUT] = {0};
|
||||
inline void doMixerCalculations(uint16_t tmr10ms, uint8_t tick10ms)
|
||||
{
|
||||
#ifdef BOLD_FONT
|
||||
activeMixes = 0;
|
||||
#endif
|
||||
|
||||
if (g_eeGeneral.filterInput == 1) {
|
||||
getADC_filt() ;
|
||||
|
||||
+6
-2
@@ -796,10 +796,9 @@ extern void moveTrimsToOffsets();
|
||||
#define ACTIVE_MIXES_TYPE uint32_t
|
||||
#endif
|
||||
|
||||
#ifdef BOLD_FONT
|
||||
extern ACTIVE_EXPOS_TYPE activeExpos;
|
||||
extern ACTIVE_MIXES_TYPE activeMixes;
|
||||
extern uint16_t activeFunctions;
|
||||
|
||||
inline bool isExpoActive(uint8_t expo)
|
||||
{
|
||||
return activeExpos & ((ACTIVE_EXPOS_TYPE)1 << expo);
|
||||
@@ -809,7 +808,12 @@ inline bool isMixActive(uint8_t mix)
|
||||
{
|
||||
return activeMixes & ((ACTIVE_MIXES_TYPE)1 << mix);
|
||||
}
|
||||
#else
|
||||
#define isExpoActive(x) false
|
||||
#define isMixActive(x) false
|
||||
#endif
|
||||
|
||||
extern uint16_t activeFunctions;
|
||||
inline bool isFunctionActive(uint8_t func)
|
||||
{
|
||||
return activeFunctions & (1 << (func-FUNC_TRAINER));
|
||||
|
||||
Reference in New Issue
Block a user