Fix simu compilation errors

Issue 82 first try with #define FRANCK in main_views.cpp
This commit is contained in:
bsongis
2012-08-20 20:44:43 +00:00
parent 511f5b8338
commit ae5d7c8952
5 changed files with 22 additions and 11 deletions
+9 -2
View File
@@ -266,11 +266,13 @@ void menuMainView(uint8_t event)
for (uint8_t i=0; i<8; i++) {
uint8_t x0,y0;
#if defined(PCBARM)
int16_t val = g_chans512[8*(g_eeGeneral.view / ALTERNATE_VIEW) + i];
uint8_t chan = 8*(g_eeGeneral.view / ALTERNATE_VIEW) + i;
#else
int16_t val = g_chans512[(g_eeGeneral.view & ALTERNATE_VIEW) ? 8+i : i];
uint8_t chan = (g_eeGeneral.view & ALTERNATE_VIEW) ? 8+i : i;
#endif
int16_t val = g_chans512[chan];
switch(view_base)
{
case e_outputValues:
@@ -290,7 +292,12 @@ void menuMainView(uint8_t event)
x0 = i<4 ? 128/4+2 : 128*3/4-2;
y0 = 38+(i%4)*5;
#ifdef FRANCK
uint16_t lim = calc100toRESX(val > 0 ? 100+g_model.limitData[chan].max : +100-g_model.limitData[chan].min);
int8_t len = (abs(val) * WBAR2 + lim/2) / lim;
#else
int8_t len = (abs(val) * WBAR2 + 512) / 1024;
#endif
if(len>WBAR2) len = WBAR2; // prevent bars from going over the end - comment for debugging
lcd_hlineStip(x0-WBAR2, y0, WBAR2*2+1, DOTTED);
lcd_vline(x0,y0-2,5);