Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 725 → Rev 726

/branches/V0.68d Code Redesign killagreg/mm3.c
67,7 → 67,7
/*********************************************/
/* Initialize Interface to MM3 Compass */
/*********************************************/
void MM3_init(void)
void MM3_Init(void)
{
uint8_t sreg = SREG;
 
114,7 → 114,7
/*********************************************/
/* Get Data from MM3 */
/*********************************************/
void MM3_timer0() // called every 102.4 ms by timer 0 ISR
void MM3_Update() // called every 102.4 ms by timer 0 ISR
{
switch (MM3.STATE)
{
202,7 → 202,7
/*********************************************/
/* Calibrate Compass */
/*********************************************/
void MM3_calibrate(void)
void MM3_Calibrate(void)
{
int16_t x_min = 0, x_max = 0, y_min = 0, y_max = 0, z_min = 0, z_max = 0;
uint8_t measurement = 50, beeper = 0;
263,7 → 263,7
/*********************************************/
/* Calculate north direction (heading) */
/*********************************************/
int16_t MM3_heading(void)
int16_t MM3_Heading(void)
{
int32_t sin_pitch, cos_pitch, sin_roll, cos_roll, sin_yaw, cos_yaw;
int32_t Hx, Hy, Hz, Hx_corr, Hy_corr;