Optrex LCD support

This commit is contained in:
bsongis
2012-04-07 07:35:23 +00:00
parent 5d5bfec63d
commit 54c1ed1997
5 changed files with 25 additions and 4 deletions
+4
View File
@@ -58,6 +58,10 @@ bool audioQueue::freeslots(uint8_t slots)
// it is called every 10ms
void audioQueue::heartbeat()
{
#if defined(SIMU)
return;
#endif
#if defined(PCBARM)
if (toneTimeLeft) {
+19 -1
View File
@@ -73,6 +73,9 @@ const MenuFuncP_PROGMEM menuTabDiag[] PROGMEM = {
enum menuProcSetupItems {
ITEM_SETUP_BASE=18,
#ifdef PCBARM
ITEM_SETUP_OPTREX,
#endif
#ifdef AUDIO
ITEM_SETUP_SPEAKER,
#endif
@@ -115,9 +118,14 @@ void menuProcSetup(uint8_t event)
#define FRSKY_ZEROS 0, 0, 0,
#else
#define FRSKY_ZEROS
#endif
#ifdef PCBARM
#define OPTREX_ZEROS 0,
#else
#define OPTREX_ZEROS
#endif
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, 0, 0, AUDIO_ZEROS HAPTIC_ZEROS 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, SPLASH_ZEROS 0, 0, 0, 0, FRSKY_ZEROS 0, (uint8_t)-1, 1});
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, 0, 0, AUDIO_ZEROS HAPTIC_ZEROS OPTREX_ZEROS 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, SPLASH_ZEROS 0, 0, 0, 0, FRSKY_ZEROS 0, (uint8_t)-1, 1});
int8_t sub = m_posVert;
uint8_t y = 1*FH;
@@ -171,6 +179,16 @@ void menuProcSetup(uint8_t event)
}subN++;
#endif
// TODO port onoffMenuItem here to save flash
#if defined(PCBARM)
if(s_pgOfs<subN) {
lcd_putsLeft( y, PSTR("Optrex Display"));
menu_lcd_onoff( PARAM_OFS, y, g_eeGeneral.optrexDisplay, sub==subN ) ;
if (sub==subN) CHECK_INCDEC_GENVAR(event, g_eeGeneral.optrexDisplay, 0, 1);
if((y+=FH)>7*FH) return;
}subN++;
#endif
if(s_pgOfs<subN) {
lcd_putsLeft( y, STR_CONTRAST);
lcd_outdezAtt(PARAM_OFS,y,g_eeGeneral.contrast,(sub==subN ? INVERS : 0)|LEFT);
+1 -1
View File
@@ -791,7 +791,7 @@ void refreshDisplay()
pioptr->PIO_OER = 0x0C00B0FFL; // Set bits 27,26,15,13,12,7-0 output
#endif
for (y = 0; y < 8; y++) {
lcdSendCtl(/*TODO g_eeGeneral.optrexDisplay ? 0 : */0x04);
lcdSendCtl(g_eeGeneral.optrexDisplay ? 0 : 0x04);
lcdSendCtl(0x10); //column addr 0
lcdSendCtl(y | 0xB0); //page addr y
+1 -1
View File
@@ -111,7 +111,7 @@ PACK(typedef struct t_EEGeneral {
uint8_t disableAlarmWarning:1;
uint8_t stickMode:2;
int8_t timezone:5;
uint8_t spare2:1;
uint8_t optrexDisplay:1;
uint8_t inactivityTimer;
uint8_t throttleReversed:1;
uint8_t minuteBeep:1;
-1
View File
@@ -254,7 +254,6 @@ extern uint32_t Master_frequency;
#define NVIC_DisableIRQ(x)
#define __disable_irq()
#define __enable_irq()
#define AUDIO_HEARTBEAT()
#endif
extern volatile unsigned char pinb,pinc,pind,pine,ping,pinh,pinj,pinl;