[X9D] Grey bar rounded on main view
[X9D] Column headers
This commit is contained in:
+11
-1
@@ -646,10 +646,20 @@ void lcd_rect(xcoord_t x, uint8_t y, xcoord_t w, uint8_t h, uint8_t pat, LcdFlag
|
|||||||
|
|
||||||
void lcd_filled_rect(xcoord_t x, int8_t y, xcoord_t w, uint8_t h, uint8_t pat, LcdFlags att)
|
void lcd_filled_rect(xcoord_t x, int8_t y, xcoord_t w, uint8_t h, uint8_t pat, LcdFlags att)
|
||||||
{
|
{
|
||||||
|
#if defined(CPUM64)
|
||||||
for (int8_t i=y; i<y+h; i++) {
|
for (int8_t i=y; i<y+h; i++) {
|
||||||
if (i>=0 && i<LCD_H) lcd_hlineStip(x, i, w, pat, att);
|
lcd_hlineStip(x, i, w, pat, att);
|
||||||
pat = (pat >> 1) + ((pat & 1) << 7);
|
pat = (pat >> 1) + ((pat & 1) << 7);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
for (int8_t i=y; i<y+h; i++) {
|
||||||
|
if ((att&ROUND) && (i==y || i==y+h-1))
|
||||||
|
lcd_hlineStip(x+1, i, w-2, pat, att);
|
||||||
|
else
|
||||||
|
lcd_hlineStip(x, i, w, pat, att);
|
||||||
|
pat = (pat >> 1) + ((pat & 1) << 7);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_invert_line(int8_t y)
|
void lcd_invert_line(int8_t y)
|
||||||
|
|||||||
+1
-1
@@ -288,7 +288,7 @@ void displayTopBar()
|
|||||||
lcd_outdezNAtt(BAR_TIME_X+3*FWNUM-1, BAR_Y+1, t.tm_min, LEADING0, 2);
|
lcd_outdezNAtt(BAR_TIME_X+3*FWNUM-1, BAR_Y+1, t.tm_min, LEADING0, 2);
|
||||||
|
|
||||||
/* The background */
|
/* The background */
|
||||||
lcd_filled_rect(BAR_X, BAR_Y, BAR_W, BAR_H, SOLID, FILL_WHITE|GREY_DEFAULT);
|
lcd_filled_rect(BAR_X, BAR_Y, BAR_W, BAR_H, SOLID, FILL_WHITE|GREY_DEFAULT|ROUND);
|
||||||
|
|
||||||
/* The inside of the Batt gauge */
|
/* The inside of the Batt gauge */
|
||||||
uint8_t count = 10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin);
|
uint8_t count = 10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin);
|
||||||
|
|||||||
@@ -51,6 +51,10 @@
|
|||||||
typedef void (*MenuFuncP)(uint8_t event);
|
typedef void (*MenuFuncP)(uint8_t event);
|
||||||
|
|
||||||
void displayScreenIndex(uint8_t index, uint8_t count, uint8_t attr);
|
void displayScreenIndex(uint8_t index, uint8_t count, uint8_t attr);
|
||||||
|
inline void displayColumnHeader(const char **headers, uint8_t index)
|
||||||
|
{
|
||||||
|
lcd_putsAtt(17*FW, 0, headers[index], 0);
|
||||||
|
}
|
||||||
|
|
||||||
#if LCD_W >= 212
|
#if LCD_W >= 212
|
||||||
#if defined(TRANSLATIONS_FR)
|
#if defined(TRANSLATIONS_FR)
|
||||||
|
|||||||
+25
-2
@@ -58,6 +58,12 @@ enum EnumTabModel {
|
|||||||
IF_TEMPLATES(e_Templates)
|
IF_TEMPLATES(e_Templates)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if LCD_W >= 212
|
||||||
|
const char * STR_PHASES_HEADERS[] = { " Name ", " Switch ", " Trims ", " Fade In ", " Fade Out " };
|
||||||
|
const char * STR_LIMITS_HEADERS[] = { " Name ", " Offset ", " Min ", " Max ", " Direction ", " PPM Center ", " Symetrical " };
|
||||||
|
const char * STR_CSW_HEADERS[] = { " Function ", " V1 ", " V2 ", " AND Switch ", " Duration ", " Delay " };
|
||||||
|
#endif
|
||||||
|
|
||||||
void menuModelSelect(uint8_t event);
|
void menuModelSelect(uint8_t event);
|
||||||
void menuModelSetup(uint8_t event);
|
void menuModelSetup(uint8_t event);
|
||||||
void menuModelHeli(uint8_t event);
|
void menuModelHeli(uint8_t event);
|
||||||
@@ -1287,6 +1293,13 @@ void menuModelPhasesAll(uint8_t event)
|
|||||||
|
|
||||||
int8_t sub = m_posVert - 1;
|
int8_t sub = m_posVert - 1;
|
||||||
|
|
||||||
|
horzpos_t posHorz = m_posHorz;
|
||||||
|
if (sub==0 && posHorz > 0) { posHorz += 2; }
|
||||||
|
|
||||||
|
if (sub<MAX_PHASES && posHorz>=0) {
|
||||||
|
displayColumnHeader(STR_PHASES_HEADERS, posHorz);
|
||||||
|
}
|
||||||
|
|
||||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||||
uint8_t y = 1 + (i+1)*FH;
|
uint8_t y = 1 + (i+1)*FH;
|
||||||
uint8_t k = i+s_pgOfs;
|
uint8_t k = i+s_pgOfs;
|
||||||
@@ -1307,8 +1320,6 @@ void menuModelPhasesAll(uint8_t event)
|
|||||||
putsFlightPhase(0, y, k+1, (getFlightPhase()==k ? BOLD : 0) | ((sub==k && m_posHorz<0) ? INVERS : 0));
|
putsFlightPhase(0, y, k+1, (getFlightPhase()==k ? BOLD : 0) | ((sub==k && m_posHorz<0) ? INVERS : 0));
|
||||||
|
|
||||||
for (uint8_t j=0; j<ITEM_PHASES_COUNT; j++) {
|
for (uint8_t j=0; j<ITEM_PHASES_COUNT; j++) {
|
||||||
horzpos_t posHorz = m_posHorz;
|
|
||||||
if (i==0 && posHorz > 0) { posHorz += 2; }
|
|
||||||
uint8_t attr = ((sub==k && posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
uint8_t attr = ((sub==k && posHorz==j) ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
|
||||||
uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ;
|
uint8_t active = (attr && (s_editMode>0 || p1valdiff)) ;
|
||||||
switch(j)
|
switch(j)
|
||||||
@@ -2727,6 +2738,12 @@ void menuModelLimits(uint8_t event)
|
|||||||
MENU(STR_MENULIMITS, menuTabModel, e_Limits, 1+NUM_CHNOUT+1, {0, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, 0});
|
MENU(STR_MENULIMITS, menuTabModel, e_Limits, 1+NUM_CHNOUT+1, {0, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, ITEM_LIMITS_MAXROW, 0});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if LCD_W >= 212
|
||||||
|
if (sub<NUM_CHNOUT && m_posHorz>=0) {
|
||||||
|
displayColumnHeader(STR_LIMITS_HEADERS, m_posHorz);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (s_warning_result) {
|
if (s_warning_result) {
|
||||||
LimitData *ld = limitaddress(sub);
|
LimitData *ld = limitaddress(sub);
|
||||||
ld->revert = !ld->revert;
|
ld->revert = !ld->revert;
|
||||||
@@ -3202,6 +3219,12 @@ void menuModelCustomSwitches(uint8_t event)
|
|||||||
uint8_t k = 0;
|
uint8_t k = 0;
|
||||||
int8_t sub = m_posVert - 1;
|
int8_t sub = m_posVert - 1;
|
||||||
|
|
||||||
|
#if LCD_W >= 212
|
||||||
|
if (m_posHorz>=0) {
|
||||||
|
displayColumnHeader(STR_CSW_HEADERS, m_posHorz);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
for (uint8_t i=0; i<LCD_LINES-1; i++) {
|
||||||
y = 1 + (i+1)*FH;
|
y = 1 + (i+1)*FH;
|
||||||
k = i+s_pgOfs;
|
k = i+s_pgOfs;
|
||||||
|
|||||||
+2
-3
@@ -488,13 +488,12 @@ enum ResetFunctionParam {
|
|||||||
PACK(typedef struct t_CustomFnData { // Function Switches data
|
PACK(typedef struct t_CustomFnData { // Function Switches data
|
||||||
int8_t swtch;
|
int8_t swtch;
|
||||||
uint8_t func;
|
uint8_t func;
|
||||||
union {
|
PACK(union {
|
||||||
char name[LEN_CFN_NAME];
|
char name[LEN_CFN_NAME];
|
||||||
struct {
|
struct {
|
||||||
uint32_t val;
|
uint32_t val;
|
||||||
uint16_t spare;
|
|
||||||
} composite;
|
} composite;
|
||||||
} param;
|
}) param;
|
||||||
uint8_t mode:2;
|
uint8_t mode:2;
|
||||||
uint8_t active:6;
|
uint8_t active:6;
|
||||||
}) CustomFnData;
|
}) CustomFnData;
|
||||||
|
|||||||
+1
-1
@@ -80,7 +80,7 @@ extern uint16_t sessionTimer;
|
|||||||
|
|
||||||
uint8_t usbPlugged(void);
|
uint8_t usbPlugged(void);
|
||||||
#define BOOTLOADER_REQUEST() (0)
|
#define BOOTLOADER_REQUEST() (0)
|
||||||
#define usbBootloader() (0)
|
#define usbBootloader()
|
||||||
|
|
||||||
#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/)
|
#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user