Subversion Repositories chibiosIgnition

Rev

Rev 19 | Rev 21 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19 Rev 20
Line 218... Line 218...
218
{
218
{
219
 
219
 
220
        // read the dial
220
        // read the dial
221
        adcSample();
221
        adcSample();
222
    int smp =  getAdc(0) ;
222
    int smp =  getAdc(0) ;
223
    avgSmp += (smp-avgSmp)/4;
223
    avgSmp += (smp-avgSmp)/20;
224
        adv = avgSmp * 1200 / 4096 - 300;
224
        adv = avgSmp * 1200 / 4096 - 300;
225
 
225
 
-
 
226
        setAdvance(adv);
-
 
227
 
226
 
228
 
227
        /* initialise the display */
229
        /* initialise the display */
228
        chMtxLock(&mutexDisplay);
230
        chMtxLock(&mutexDisplay);
229
        clearDisplay();
231
        clearDisplay();
230
 
232