mirror of
https://github.com/opentx/opentx.git
synced 2025-07-15 12:25:12 +03:00
New nice screen for Logical Switches
This commit is contained in:
parent
4c3dd8a9b2
commit
bfadb3664b
2 changed files with 17 additions and 27 deletions
|
@ -305,11 +305,6 @@ void displayTopBar()
|
||||||
x -= 12;
|
x -= 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SD ICON, not really needed
|
|
||||||
if (sdMounted()) {
|
|
||||||
LCD_NOTIF_ICON(x, ICON_SD);
|
|
||||||
} */
|
|
||||||
|
|
||||||
/* Audio volume */
|
/* Audio volume */
|
||||||
if (requiredSpeakerVolume == 0)
|
if (requiredSpeakerVolume == 0)
|
||||||
LCD_ICON(BAR_VOLUME_X, BAR_Y, ICON_SPEAKER0);
|
LCD_ICON(BAR_VOLUME_X, BAR_Y, ICON_SPEAKER0);
|
||||||
|
@ -717,26 +712,21 @@ void menuMainView(uint8_t event)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Logical Switches
|
// Logical Switches
|
||||||
uint8_t sw = 0;
|
lcd_puts(TRIM_RH_X - TRIM_LEN/2 + 5, 6*FH-1, "LS 1-32");
|
||||||
for (uint8_t line=0; line<4; line++) {
|
for (uint8_t sw=0; sw<NUM_LOGICAL_SWITCH; sw++) {
|
||||||
uint8_t y = LCD_H/2-7+line*8;
|
div_t qr = div(sw, 10);
|
||||||
lcd_rect(LCD_W/2+7*FW-1, y-1, 6*8+1, 7);
|
uint8_t y = 13 + 11 * qr.quot;
|
||||||
for (uint8_t col=0; col<8; col++) {
|
uint8_t x = TRIM_RH_X - TRIM_LEN + qr.rem*5 + (qr.rem >= 5 ? 3 : 0);
|
||||||
uint8_t x = LCD_W/2+7*FW-1+col*(FW);
|
LogicalSwitchData * cs = cswAddress(sw);
|
||||||
if (col > 0)
|
if (cs->func == LS_FUNC_NONE) {
|
||||||
lcd_vline(x, y, 5);
|
lcd_hline(x, y+6, 4);
|
||||||
if (getSwitch(SWSRC_SW1+sw)) {
|
lcd_hline(x, y+7, 4);
|
||||||
lcd_plot(x+1, y);
|
|
||||||
lcd_plot(x+2, y+1);
|
|
||||||
lcd_plot(x+3, y+2);
|
|
||||||
lcd_plot(x+4, y+3);
|
|
||||||
lcd_plot(x+5, y+4);
|
|
||||||
lcd_plot(x+1, y+4);
|
|
||||||
lcd_plot(x+2, y+3);
|
|
||||||
lcd_plot(x+4, y+1);
|
|
||||||
lcd_plot(x+5, y);
|
|
||||||
}
|
}
|
||||||
sw++;
|
else if (getSwitch(SWSRC_SW1+sw)) {
|
||||||
|
lcd_filled_rect(x, y, 4, 8);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
lcd_rect(x, y, 4, 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,7 +284,7 @@ long Open9xSim::onTimeout(FXObject*,FXSelector,void*)
|
||||||
|
|
||||||
per10ms();
|
per10ms();
|
||||||
refreshDiplay();
|
refreshDiplay();
|
||||||
getApp()->addTimeout(this,2,5);
|
getApp()->addTimeout(this, 2, 10);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue