Rev 26 | Rev 28 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 26 | Rev 27 | ||
|---|---|---|---|
| Line 396... | Line 396... | ||
| 396 | { |
396 | { |
| 397 | // Using ADC_Samples[3] as the MAP input |
397 | // Using ADC_Samples[3] as the MAP input |
| 398 | float reading = FILT_Samples[3] * ADC_Scale; |
398 | float reading = FILT_Samples[3] * ADC_Scale; |
| 399 | reading = reading * 2.016; // real voltage |
399 | reading = reading * 2.016; // real voltage |
| 400 | // values computed from slope / intercept of map.ods |
400 | // values computed from slope / intercept of map.ods |
| 401 | reading = (reading) * 56.23 + 743.2; // do not assume 0.5 volt offset : reading from 0 to 4.5 instead of 0.5 to 4.5 |
401 | //reading = (reading) * 56.23 + 743.2; // do not assume 0.5 volt offset : reading from 0 to 4.5 instead of 0.5 to 4.5 |
| - | 402 | // using a pressure gauge. |
|
| - | 403 | reading = (reading) * 150 + 326; |
|
| - | 404 | ||
| 402 | plx_sendword(PLX_MAP); |
405 | plx_sendword(PLX_MAP); |
| 403 | PutCharSerial(&uc1, instance); |
406 | PutCharSerial(&uc1, instance); |
| 404 | plx_sendword((uint16_t) reading); |
407 | plx_sendword((uint16_t) reading); |
| 405 | 408 | ||
| 406 | } |
409 | } |