Issue 121 fixed
This commit is contained in:
@@ -282,8 +282,6 @@ void menuMainView(uint8_t event)
|
|||||||
case e_outputValues:
|
case e_outputValues:
|
||||||
x0 = (i%4*9+3)*FW/2;
|
x0 = (i%4*9+3)*FW/2;
|
||||||
y0 = i/4*FH+40;
|
y0 = i/4*FH+40;
|
||||||
// *1000/1024 = x - x/32 + x/128
|
|
||||||
#define GPERC(x) (x - x/32 + x/128)
|
|
||||||
#if defined (DECIMALS_DISPLAYED)
|
#if defined (DECIMALS_DISPLAYED)
|
||||||
lcd_outdezAtt( x0+4*FW , y0, GPERC(val), PREC1);
|
lcd_outdezAtt( x0+4*FW , y0, GPERC(val), PREC1);
|
||||||
#else
|
#else
|
||||||
|
|||||||
+1
-1
@@ -2131,7 +2131,7 @@ void menuProcLimits(uint8_t _event)
|
|||||||
lcd_outdezAtt(12*FW, 0, PPM_CENTER+limitaddress(sub)->ppmCenter+g_chans512[sub]/2, 0);
|
lcd_outdezAtt(12*FW, 0, PPM_CENTER+limitaddress(sub)->ppmCenter+g_chans512[sub]/2, 0);
|
||||||
lcd_puts(12*FW, 0, STR_US);
|
lcd_puts(12*FW, 0, STR_US);
|
||||||
#else
|
#else
|
||||||
lcd_outdezAtt(12*FW, 0, (g_chans512[sub] * 25) / 256, 0);
|
lcd_outdezAtt(12*FW, 0, GPERC(g_chans512[sub]), PREC1);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -2378,9 +2378,13 @@ inline void doMixerCalculations(tmr10ms_t tmr10ms, uint8_t tick10ms)
|
|||||||
uint8_t ch = g_model.thrTraceSrc-NUM_POTS-1;
|
uint8_t ch = g_model.thrTraceSrc-NUM_POTS-1;
|
||||||
val = g_chans512[ch];
|
val = g_chans512[ch];
|
||||||
if (g_model.limitData[ch].revert)
|
if (g_model.limitData[ch].revert)
|
||||||
val = -val + calc100toRESX(g_model.limitData[ch].max + 100) - RESX;
|
val = -val + calc100toRESX(g_model.limitData[ch].max + 100);
|
||||||
else
|
else
|
||||||
val = val - calc100toRESX(g_model.limitData[ch].min - 100) - RESX;
|
val = val - calc100toRESX(g_model.limitData[ch].min - 100);
|
||||||
|
if (g_model.limitData[ch].symetrical)
|
||||||
|
val -= calc1000toRESX(g_model.limitData[ch].offset);
|
||||||
|
val = val * 20 / (20+(g_model.limitData[ch].max-g_model.limitData[ch].min)/10);
|
||||||
|
val -= RESX;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val = calibratedStick[g_model.thrTraceSrc+NUM_STICKS-1];
|
val = calibratedStick[g_model.thrTraceSrc+NUM_STICKS-1];
|
||||||
|
|||||||
@@ -835,6 +835,9 @@ inline int16_t calc100toRESX(int8_t x)
|
|||||||
extern int16_t calc1000toRESX(int16_t x);
|
extern int16_t calc1000toRESX(int16_t x);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// *1000/1024 = x - x/32 + x/128
|
||||||
|
#define GPERC(x) (x - x/32 + x/128)
|
||||||
|
|
||||||
#if defined(PCBARM)
|
#if defined(PCBARM)
|
||||||
// This doesn't need protection on this processor
|
// This doesn't need protection on this processor
|
||||||
#define tmr10ms_t uint32_t
|
#define tmr10ms_t uint32_t
|
||||||
|
|||||||
Reference in New Issue
Block a user