More AVR removal

This commit is contained in:
Bertrand Songis
2018-08-05 12:39:05 +02:00
parent f3bfde242b
commit ea76998beb
67 changed files with 1321 additions and 1486 deletions
+1 -1
View File
@@ -318,7 +318,7 @@ void BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_t l
int width = getTextWidth(s, len, flags);
int height = getFontHeight(flags);
uint32_t fontindex = FONTINDEX(flags);
const pm_uchar * font = fontsTable[fontindex];
const unsigned char * font = fontsTable[fontindex];
const uint16_t * fontspecs = fontspecsTable[fontindex];
BitmapBuffer * fontcache = NULL;
+7 -7
View File
@@ -26,7 +26,7 @@ const uint16_t font_tinsize_specs[] = {
#include "font_tinsize.specs"
};
const pm_uchar font_tinsize[] = {
const unsigned char font_tinsize[] = {
#include "font_tinsize.lbm"
};
@@ -34,7 +34,7 @@ const uint16_t font_smlsize_specs[] = {
#include "font_smlsize.specs"
};
const pm_uchar font_smlsize[] = {
const unsigned char font_smlsize[] = {
#include "font_smlsize.lbm"
};
#endif
@@ -43,7 +43,7 @@ const uint16_t font_stdsize_specs[] = {
#include "font_stdsize.specs"
};
const pm_uchar font_stdsize[] = {
const unsigned char font_stdsize[] = {
#include "font_stdsize.lbm"
};
@@ -52,7 +52,7 @@ const uint16_t font_midsize_specs[] = {
#include "font_midsize.specs"
};
const pm_uchar font_midsize[] = {
const unsigned char font_midsize[] = {
#include "font_midsize.lbm"
};
@@ -60,7 +60,7 @@ const uint16_t font_dblsize_specs[] = {
#include "font_dblsize.specs"
};
const pm_uchar font_dblsize[] = {
const unsigned char font_dblsize[] = {
#include "font_dblsize.lbm"
};
@@ -68,7 +68,7 @@ const uint16_t font_xxlsize_specs[] = {
#include "font_xxlsize.specs"
};
const pm_uchar font_xxlsize[] = {
const unsigned char font_xxlsize[] = {
#include "font_xxlsize.lbm"
};
@@ -76,7 +76,7 @@ const uint16_t font_stdsizebold_specs[] = {
#include "font_stdsizebold.specs"
};
const pm_uchar font_stdsizebold[] = {
const unsigned char font_stdsizebold[] = {
#include "font_stdsizebold.lbm"
};
#endif
+3 -3
View File
@@ -102,7 +102,7 @@ void lcdPutFontPattern(coord_t x, coord_t y, const uint8_t * font, const uint16_
void lcdDrawChar(coord_t x, coord_t y, char c, LcdFlags flags)
{
uint32_t fontindex = FONTINDEX(flags);
const pm_uchar * font = fontsTable[fontindex];
const unsigned char * font = fontsTable[fontindex];
const uint16_t * fontspecs = fontspecsTable[fontindex];
lcdPutFontPattern(x, y, font, fontspecs, getMappedChar(c), flags);
}
@@ -142,10 +142,10 @@ int getTextWidth(const char * s, int len, LcdFlags flags)
return result;
}
void lcdDrawTextAtIndex(coord_t x, coord_t y, const pm_char * s, uint8_t idx, LcdFlags flags)
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char * s, uint8_t idx, LcdFlags flags)
{
uint8_t length;
length = pgm_read_byte(s++);
length = *(s++);
lcdDrawSizedText(x, y, s+length*idx, length, flags & ~ZCHAR);
}
+2 -2
View File
@@ -120,7 +120,7 @@ extern coord_t lcdNextPos;
void lcdDrawChar(coord_t x, coord_t y, char c, LcdFlags flags=0);
void lcdDrawTextAtIndex(coord_t x, coord_t y, const pm_char * s, uint8_t idx, LcdFlags flags=0);
void lcdDrawTextAtIndex(coord_t x, coord_t y, const char * s, uint8_t idx, LcdFlags flags=0);
inline void lcdClear()
{
@@ -132,7 +132,7 @@ inline void lcdDrawText(coord_t x, coord_t y, const char * s, LcdFlags attr=0)
lcd->drawText(x, y, s, attr);
}
inline void lcdDrawSizedText(coord_t x, coord_t y, const pm_char * s, uint8_t len, LcdFlags attr=0)
inline void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len, LcdFlags attr=0)
{
lcd->drawSizedText(x, y, s, len, attr);
}
+2 -2
View File
@@ -428,8 +428,8 @@ extern uint8_t s_curveChan;
#define WARNING_TYPE_INPUT 3
#define WARNING_TYPE_INFO 4
extern const pm_char * warningText;
extern const pm_char * warningInfoText;
extern const char * warningText;
extern const char * warningInfoText;
extern uint8_t warningInfoLength;
extern uint8_t warningResult;
extern uint8_t warningType;
-1
View File
@@ -139,7 +139,6 @@ bool menuModelLimits(event_t event)
for (uint8_t j=0; j<ITEM_LIMITS_COUNT; j++) {
uint8_t attr = ((sub==k && menuHorizontalPosition==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
uint8_t active = (attr && s_editMode>0) ;
if (active) STICK_SCROLL_DISABLE();
switch(j)
{
case ITEM_LIMITS_CH_NAME:
+3 -3
View File
@@ -154,8 +154,8 @@ bool menuRadioSetup(event_t event)
{
int16_t year = TM_YEAR_BASE + t.tm_year;
int8_t dlim = (((((year%4==0) && (year%100!=0)) || (year%400==0)) && (t.tm_mon==1)) ? 1 : 0);
static const pm_uint8_t dmon[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
dlim += pgm_read_byte(&dmon[t.tm_mon]);
static const uint8_t dmon[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
dlim += dmon[t.tm_mon];
lcdDrawNumber(lcdNextPos+3, y, t.tm_mday, flags|rowattr|LEADING0, 2);
if (rowattr && s_editMode>0) t.tm_mday = checkIncDec(event, t.tm_mday, 1, dlim, 0);
break;
@@ -473,7 +473,7 @@ bool menuRadioSetup(event_t event)
s[0] = '1'+reusableBuffer.generalSettings.stickMode;
lcdDrawText(RADIO_SETUP_2ND_COLUMN, y, s, attr);
for (uint8_t i=0; i<4; i++) {
drawSource(RADIO_SETUP_2ND_COLUMN + 40 + 50*i, y, MIXSRC_Rud + pgm_read_byte(modn12x3 + 4*reusableBuffer.generalSettings.stickMode + i));
drawSource(RADIO_SETUP_2ND_COLUMN + 40 + 50*i, y, MIXSRC_Rud + *(modn12x3 + 4*reusableBuffer.generalSettings.stickMode + i));
}
if (attr && s_editMode>0) {
CHECK_INCDEC_GENVAR(event, reusableBuffer.generalSettings.stickMode, 0, 3);
+1 -1
View File
@@ -162,7 +162,7 @@ void drawComboOutputBar(coord_t x, coord_t y, coord_t w, coord_t h, uint8_t chan
lcdDrawNumber(x + limPos, y + h, chanVal, SMLSIZE | TEXT_COLOR, 0, NULL, "%");
}
coord_t drawChannelsMonitorLegend(coord_t x, const pm_char * s, int color)
coord_t drawChannelsMonitorLegend(coord_t x, const char * s, int color)
{
lcdDrawSolidFilledRect(x, MENU_FOOTER_TOP + 2, LEG_COLORBOX + 2, LEG_COLORBOX + 2, BARGRAPH_BGCOLOR);
lcdDrawSolidFilledRect(x + 1, MENU_FOOTER_TOP + 3, LEG_COLORBOX, LEG_COLORBOX, color);