From 8a2e035dc972d1f9b102dfa4c52813bb76fdbabd Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 10 Dec 2011 19:10:42 +0000 Subject: [PATCH] Last lines of SETUP 1/10 were buggy --- src/model_menus.cpp | 10 +++++----- src/simpgmspace.cpp | 5 +++-- src/simpgmspace.h | 5 +++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/model_menus.cpp b/src/model_menus.cpp index a31c719ac..866351da3 100644 --- a/src/model_menus.cpp +++ b/src/model_menus.cpp @@ -484,14 +484,14 @@ void menuProcModel(uint8_t event) lcd_putsnAtt(PARAM_OFS, y, PSTR(PROT_STR)+PROT_STR_LEN*g_model.protocol,PROT_STR_LEN, (sub==subN && m_posHorz==0 ? (s_editMode>0 ? BLINK : INVERS):0)); if(!g_model.protocol) { - lcd_putsnAtt(PARAM_OFS+4*FW, y, PSTR("4CH 6CH 8CH 10CH12CH14CH16CH")+4*(g_model.ppmNCH+2),4,(sub==subN && m_posHorz==1 ? ((s_editMode>0) ? BLINK : INVERS):0)); + lcd_putsnAtt(PARAM_OFS+4*FW, y, PSTR("4CH 6CH 8CH 10CH12CH14CH16CH")+4*(g_model.ppmNCH+2), 4, ((sub==subN && m_posHorz==1) ? ((s_editMode>0) ? BLINK : INVERS) : 0)); lcd_putsAtt(PARAM_OFS+11*FW, y, PSTR("u"),0); - lcd_outdezAtt(PARAM_OFS+11*FW, y, (g_model.ppmDelay*50)+300, (sub==subN && m_posHorz==2 ? ((s_editMode>0) ? BLINK : INVERS):0)); + lcd_outdezAtt(PARAM_OFS+11*FW, y, (g_model.ppmDelay*50)+300, ((sub==subN && m_posHorz==2) ? ((s_editMode>0) ? BLINK : INVERS) : 0)); } else if (sub==subN) { m_posHorz = 0; } - if (sub==subN && (s_editMode>0 || p1valdiff || !g_model.protocol)) { + if (sub==subN && (s_editMode>0 || p1valdiff || g_model.protocol) ) { switch (m_posHorz) { case 0: CHECK_INCDEC_MODELVAR(event,g_model.protocol,0,PROT_MAX); @@ -511,8 +511,8 @@ void menuProcModel(uint8_t event) if (!g_model.protocol) { lcd_puts_P(0, y, PSTR("PPM frame")); lcd_puts_P(PARAM_OFS+3*FW, y, PSTR("ms")); - lcd_outdezAtt(PARAM_OFS, y, (int16_t)g_model.ppmFrameLength*5 + 225, ((sub==subN && m_posHorz==0) ? INVERS:0) | PREC1|LEFT); - lcd_putsnAtt(PARAM_OFS+6*FW, y, PSTR("POSNEG")+3*g_model.pulsePol,3,(sub==subN && m_posHorz==1 ? ((s_editMode>0) ? BLINK : INVERS):0)); + lcd_outdezAtt(PARAM_OFS, y, (int16_t)g_model.ppmFrameLength*5 + 225, ((sub==subN && m_posHorz==0) ? (s_editMode>0 ? BLINK : INVERS) : 0) | PREC1|LEFT); + lcd_putsnAtt(PARAM_OFS+6*FW, y, PSTR("POSNEG")+3*g_model.pulsePol, 3, (sub==subN && m_posHorz==1) ? INVERS : 0); if(sub==subN && (s_editMode>0 || p1valdiff)) { switch (m_posHorz) { case 0: diff --git a/src/simpgmspace.cpp b/src/simpgmspace.cpp index 09a5a505b..6241e8a86 100644 --- a/src/simpgmspace.cpp +++ b/src/simpgmspace.cpp @@ -27,8 +27,9 @@ #include "gruvin9x.h" #include "menus.h" -volatile unsigned char pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinj=0xff, pinl=0; -unsigned char portb, dummyport; +volatile uint8_t pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinj=0xff, pinl=0; +uint8_t portb, dummyport; +uint16_t dummyport16; const char *eepromFile; extern uint16_t eeprom_pointer; diff --git a/src/simpgmspace.h b/src/simpgmspace.h index 814226df5..79a82e9d8 100644 --- a/src/simpgmspace.h +++ b/src/simpgmspace.h @@ -89,7 +89,7 @@ extern sem_t eeprom_write_sem; #define RXCIE0 dummyport #define OCR0A dummyport -#define OCR1B dummyport +#define OCR1B dummyport16 #define TCCR1A dummyport #define COM1B0 dummyport @@ -129,7 +129,8 @@ extern sem_t eeprom_write_sem; #define INP_P_KEY_DWN 0 extern volatile unsigned char pinb,pinc,pind,pine,ping,pinj,pinl; -extern unsigned char portb,dummyport; +extern uint8_t portb, dummyport; +extern uint16_t dummyport16; extern uint8_t main_thread_running; void StartMainThread(bool tests=true);