Rev 1854 | Rev 1866 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1854 | Rev 1864 | ||
---|---|---|---|
Line 49... | Line 49... | ||
49 | // + POSSIBILITY OF SUCH DAMAGE. |
49 | // + POSSIBILITY OF SUCH DAMAGE. |
50 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
50 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
51 | #include <avr/io.h> |
51 | #include <avr/io.h> |
52 | #include <avr/interrupt.h> |
52 | #include <avr/interrupt.h> |
53 | #include <avr/pgmspace.h> |
53 | #include <avr/pgmspace.h> |
54 | #include "analog.h" |
- | |
Line -... | Line 54... | ||
- | 54 | ||
- | 55 | #include "analog.h" |
|
55 | 56 | #include "attitude.h" |
|
Line 56... | Line 57... | ||
56 | #include "sensors.h" |
57 | #include "sensors.h" |
57 | 58 | ||
Line 444... | Line 445... | ||
444 | 445 | ||
445 | case 17: |
446 | case 17: |
446 | // Battery. The measured value is: (V * 1k/11k)/3v * 1024 = 31.03 counts per volt (max. measurable is 33v). |
447 | // Battery. The measured value is: (V * 1k/11k)/3v * 1024 = 31.03 counts per volt (max. measurable is 33v). |
447 | // This is divided by 3 --> 10.34 counts per volt. |
448 | // This is divided by 3 --> 10.34 counts per volt. |
448 | UBat = (3 * UBat + sensorInputs[AD_UBAT] / 3) / 4; |
449 | UBat = (3 * UBat + sensorInputs[AD_UBAT] / 3) / 4; |
449 | DebugOut.Analog[11] = UBat; |
450 | DebugOut.Analog[11] = HIRES_GYRO_INTEGRATION_FACTOR;//UBat; |
450 | analogDataReady = 1; // mark |
451 | analogDataReady = 1; // mark |
451 | ADCycleCount++; |
452 | ADCycleCount++; |
452 | // Stop the sampling. Cycle is over. |
453 | // Stop the sampling. Cycle is over. |
453 | state = 0; |
454 | state = 0; |