Rev 1963 | Rev 1965 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1963 | Rev 1964 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | #include <avr/pgmspace.h> |
54 | #include <avr/pgmspace.h> |
Line 55... | Line 55... | ||
55 | 55 | ||
56 | #include "analog.h" |
56 | #include "analog.h" |
57 | #include "attitude.h" |
57 | #include "attitude.h" |
- | 58 | #include "sensors.h" |
|
Line 58... | Line 59... | ||
58 | #include "sensors.h" |
59 | #include "printf_P.h" |
59 | 60 | ||
Line 60... | Line 61... | ||
60 | // for Delay functions |
61 | // for Delay functions |
Line 468... | Line 469... | ||
468 | analog_updateBatteryVoltage(); |
469 | analog_updateBatteryVoltage(); |
469 | } |
470 | } |
Line 470... | Line 471... | ||
470 | 471 | ||
471 | void analog_setNeutral() { |
472 | void analog_setNeutral() { |
- | 473 | if (gyroOffset_readFromEEProm()) { |
|
472 | if (gyroOffset_readFromEEProm()) { |
474 | printf("gyro offsets invalid, you must recalibrate."); |
473 | gyroOffset.offsets[PITCH] = gyroOffset.offsets[ROLL] = 512 * GYRO_SUMMATION_FACTOR_PITCHROLL; |
475 | gyroOffset.offsets[PITCH] = gyroOffset.offsets[ROLL] = 512 * GYRO_SUMMATION_FACTOR_PITCHROLL; |
474 | gyroOffset.offsets[YAW] = 512 * GYRO_SUMMATION_FACTOR_YAW; |
476 | gyroOffset.offsets[YAW] = 512 * GYRO_SUMMATION_FACTOR_YAW; |
- | 477 | } |
|
- | 478 | ||
- | 479 | debugOut.analog[6] = gyroOffset.offsets[PITCH]; |
|
Line 475... | Line 480... | ||
475 | } |
480 | debugOut.analog[7] = gyroOffset.offsets[ROLL]; |
- | 481 | ||
476 | 482 | if (accOffset_readFromEEProm()) { |
|
477 | if (accOffset_readFromEEProm()) { |
483 | printf("acc. meter offsets invalid, you must recalibrate."); |
478 | accOffset.offsets[PITCH] = accOffset.offsets[ROLL] = 512 * ACC_SUMMATION_FACTOR_PITCHROLL; |
484 | accOffset.offsets[PITCH] = accOffset.offsets[ROLL] = 512 * ACC_SUMMATION_FACTOR_PITCHROLL; |
Line 479... | Line 485... | ||
479 | accOffset.offsets[Z] = 512 * ACC_SUMMATION_FACTOR_Z; |
485 | accOffset.offsets[Z] = 512 * ACC_SUMMATION_FACTOR_Z; |