Last lines of SETUP 1/10 were buggy

This commit is contained in:
bsongis
2011-12-10 19:10:42 +00:00
parent 835d8dc0f4
commit 8a2e035dc9
3 changed files with 11 additions and 9 deletions
+5 -5
View File
@@ -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, 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)); (sub==subN && m_posHorz==0 ? (s_editMode>0 ? BLINK : INVERS):0));
if(!g_model.protocol) { 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_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) { else if (sub==subN) {
m_posHorz = 0; 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) { switch (m_posHorz) {
case 0: case 0:
CHECK_INCDEC_MODELVAR(event,g_model.protocol,0,PROT_MAX); CHECK_INCDEC_MODELVAR(event,g_model.protocol,0,PROT_MAX);
@@ -511,8 +511,8 @@ void menuProcModel(uint8_t event)
if (!g_model.protocol) { if (!g_model.protocol) {
lcd_puts_P(0, y, PSTR("PPM frame")); lcd_puts_P(0, y, PSTR("PPM frame"));
lcd_puts_P(PARAM_OFS+3*FW, y, PSTR("ms")); 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_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 ? ((s_editMode>0) ? BLINK : INVERS):0)); 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)) { if(sub==subN && (s_editMode>0 || p1valdiff)) {
switch (m_posHorz) { switch (m_posHorz) {
case 0: case 0:
+3 -2
View File
@@ -27,8 +27,9 @@
#include "gruvin9x.h" #include "gruvin9x.h"
#include "menus.h" #include "menus.h"
volatile unsigned char pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinj=0xff, pinl=0; volatile uint8_t pinb=0, pinc=0xff, pind, pine=0xff, ping=0xff, pinj=0xff, pinl=0;
unsigned char portb, dummyport; uint8_t portb, dummyport;
uint16_t dummyport16;
const char *eepromFile; const char *eepromFile;
extern uint16_t eeprom_pointer; extern uint16_t eeprom_pointer;
+3 -2
View File
@@ -89,7 +89,7 @@ extern sem_t eeprom_write_sem;
#define RXCIE0 dummyport #define RXCIE0 dummyport
#define OCR0A dummyport #define OCR0A dummyport
#define OCR1B dummyport #define OCR1B dummyport16
#define TCCR1A dummyport #define TCCR1A dummyport
#define COM1B0 dummyport #define COM1B0 dummyport
@@ -129,7 +129,8 @@ extern sem_t eeprom_write_sem;
#define INP_P_KEY_DWN 0 #define INP_P_KEY_DWN 0
extern volatile unsigned char pinb,pinc,pind,pine,ping,pinj,pinl; 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; extern uint8_t main_thread_running;
void StartMainThread(bool tests=true); void StartMainThread(bool tests=true);