mirror of
https://github.com/opentx/opentx.git
synced 2025-07-19 22:35:12 +03:00
Chars [ and ] use now one less pixel in weight
This commit is contained in:
parent
6b3c4c8cfe
commit
d6977a130b
2 changed files with 10 additions and 17 deletions
Binary file not shown.
Before Width: | Height: | Size: 638 B After Width: | Height: | Size: 685 B |
|
@ -335,7 +335,7 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
|
||||||
{
|
{
|
||||||
xcoord_t orig_x = x;
|
xcoord_t orig_x = x;
|
||||||
bool setx = false;
|
bool setx = false;
|
||||||
while(len--) {
|
while (len--) {
|
||||||
unsigned char c;
|
unsigned char c;
|
||||||
switch (mode & (BSS+ZCHAR)) {
|
switch (mode & (BSS+ZCHAR)) {
|
||||||
case BSS:
|
case BSS:
|
||||||
|
@ -355,7 +355,9 @@ void lcd_putsnAtt(xcoord_t x, uint8_t y, const pm_char * s, uint8_t len, LcdFlag
|
||||||
x = c;
|
x = c;
|
||||||
setx = false;
|
setx = false;
|
||||||
}
|
}
|
||||||
else if (!c || x>LCD_W-6) break;
|
else if (!c) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
else if (c >= 0x20) {
|
else if (c >= 0x20) {
|
||||||
lcd_putcAtt(x, y, c, mode);
|
lcd_putcAtt(x, y, c, mode);
|
||||||
x = lcdNextPos;
|
x = lcdNextPos;
|
||||||
|
@ -421,19 +423,18 @@ void lcd_putsiAtt(xcoord_t x, uint8_t y,const pm_char * s,uint8_t idx, LcdFlags
|
||||||
{
|
{
|
||||||
uint8_t length;
|
uint8_t length;
|
||||||
length = pgm_read_byte(s++);
|
length = pgm_read_byte(s++);
|
||||||
lcd_putsnAtt(x,y,s+length*idx,length,flags & ~(BSS|ZCHAR));
|
lcd_putsnAtt(x, y, s+length*idx, length, flags & ~(BSS|ZCHAR));
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_outhex4(xcoord_t x, uint8_t y, uint16_t val)
|
void lcd_outhex4(xcoord_t x, uint8_t y, uint16_t val)
|
||||||
{
|
{
|
||||||
x+=FWNUM*4+1;
|
x += FWNUM*4+1;
|
||||||
for(int i=0; i<4; i++)
|
for(int i=0; i<4; i++) {
|
||||||
{
|
x -= FWNUM;
|
||||||
x-=FWNUM;
|
|
||||||
char c = val & 0xf;
|
char c = val & 0xf;
|
||||||
c = c>9 ? c+'A'-10 : c+'0';
|
c = c>9 ? c+'A'-10 : c+'0';
|
||||||
lcd_putcAtt(x,y,c,c>='A'?CONDENSED:0);
|
lcd_putcAtt(x, y, c, c>='A' ? CONDENSED : 0);
|
||||||
val>>=4;
|
val >>= 4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1163,15 +1164,7 @@ void putsTrimMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags at
|
||||||
#if ROTARY_ENCODERS > 0
|
#if ROTARY_ENCODERS > 0
|
||||||
void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att)
|
void putsRotaryEncoderMode(xcoord_t x, uint8_t y, uint8_t phase, uint8_t idx, LcdFlags att)
|
||||||
{
|
{
|
||||||
#if ROTARY_ENCODERS > 2
|
|
||||||
int16_t v;
|
|
||||||
if(idx < (NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA))
|
|
||||||
v = phaseAddress(phase)->rotaryEncoders[idx];
|
|
||||||
else
|
|
||||||
v = g_model.rotaryEncodersExtra[phase][idx - (NUM_ROTARY_ENCODERS - NUM_ROTARY_ENCODERS_EXTRA)];
|
|
||||||
#else
|
|
||||||
int16_t v = phaseAddress(phase)->rotaryEncoders[idx];
|
int16_t v = phaseAddress(phase)->rotaryEncoders[idx];
|
||||||
#endif
|
|
||||||
|
|
||||||
if (v > ROTARY_ENCODER_MAX) {
|
if (v > ROTARY_ENCODER_MAX) {
|
||||||
uint8_t p = v - ROTARY_ENCODER_MAX - 1;
|
uint8_t p = v - ROTARY_ENCODER_MAX - 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue