Subversion Repositories MK3Mag

Rev

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

Rev 33 Rev 34
Line 343... Line 343...
343
                                Calibration.MagY.Offset = (Ymin + Ymax) / 2;
343
                                Calibration.MagY.Offset = (Ymin + Ymax) / 2;
344
                                Calibration.MagZ.Range = Zmax - Zmin;
344
                                Calibration.MagZ.Range = Zmax - Zmin;
345
                                Calibration.MagZ.Offset = (Zmin + Zmax) / 2;
345
                                Calibration.MagZ.Offset = (Zmin + Zmax) / 2;
346
                                if((Calibration.MagX.Range > 150) && (Calibration.MagY.Range > 150) && (Calibration.MagZ.Range > 150))
346
                                if((Calibration.MagX.Range > 150) && (Calibration.MagY.Range > 150) && (Calibration.MagZ.Range > 150))
347
                                {
347
                                {
348
                                        // indicate write process by setting the led
348
                                        // indicate write process by setting the led off for 2 seconds
349
                                        LED_GRN_ON;
349
                                        LED_GRN_OFF;
350
                                        eeprom_write_block(&Calibration, &eeCalibration, sizeof(Calibration));
350
                                        eeprom_write_block(&Calibration, &eeCalibration, sizeof(Calibration));
351
                                        Led_Timer = SetDelay(2000);
351
                                        Led_Timer = SetDelay(2000);
352
                                        // reset  blinkcode
352
                                        // reset  blinkcode
353
                                        blinkcount = 0;
353
                                        blinkcount = 0;
354
                                }
354
                                }