Rev 1598 | Rev 1638 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1598 | Rev 1622 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | // + porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed |
5 | // + porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed |
6 | // + see the File "License.txt" for further Informations |
6 | // + see the File "License.txt" for further Informations |
7 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
7 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
Line 8... | Line 8... | ||
8 | 8 | ||
- | 9 | #include "main.h" |
|
9 | #include "main.h" |
10 | #include "eeprom.h" |
10 | volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az, UBat = 100; |
11 | volatile int Aktuell_Nick,Aktuell_Roll,Aktuell_Gier,Aktuell_ax, Aktuell_ay,Aktuell_az, UBat = 100; |
11 | volatile int AdWertNickFilter = 0, AdWertRollFilter = 0, AdWertGierFilter = 0; |
12 | volatile int AdWertNickFilter = 0, AdWertRollFilter = 0, AdWertGierFilter = 0; |
12 | volatile int HiResNick = 2500, HiResRoll = 2500; |
13 | volatile int HiResNick = 2500, HiResRoll = 2500; |
13 | volatile int AdWertNick = 0, AdWertRoll = 0, AdWertGier = 0; |
14 | volatile int AdWertNick = 0, AdWertRoll = 0, AdWertGier = 0; |
Line 36... | Line 37... | ||
36 | #define DESIRED_H_ADC 800 |
37 | #define DESIRED_H_ADC 800 |
Line 37... | Line 38... | ||
37 | 38 | ||
38 | void SucheLuftruckOffset(void) |
39 | void SucheLuftruckOffset(void) |
39 | { |
40 | { |
40 | unsigned int off; |
41 | unsigned int off; |
41 | off = eeprom_read_byte((unsigned char*)(EEPROM_ADR_LAST_OFFSET)); |
42 | off = GetParamByte(PID_PRESSURE_OFFSET); |
42 | if(off > 20) off -= 10; |
43 | if(off > 20) off -= 10; |
43 | OCR0A = off; |
44 | OCR0A = off; |
44 | ExpandBaro = 0; |
45 | ExpandBaro = 0; |
45 | Delay_ms_Mess(100); |
46 | Delay_ms_Mess(100); |
Line 49... | Line 50... | ||
49 | OCR0A = off; |
50 | OCR0A = off; |
50 | Delay_ms_Mess(50); |
51 | Delay_ms_Mess(50); |
51 | printf("."); |
52 | printf("."); |
52 | if(MessLuftdruck < DESIRED_H_ADC) break; |
53 | if(MessLuftdruck < DESIRED_H_ADC) break; |
53 | } |
54 | } |
54 | eeprom_write_byte((unsigned char*)(EEPROM_ADR_LAST_OFFSET), off); |
55 | SetParamByte(PID_PRESSURE_OFFSET, off); |
55 | DruckOffsetSetting = off; |
56 | DruckOffsetSetting = off; |
56 | Delay_ms_Mess(300); |
57 | Delay_ms_Mess(300); |
57 | } |
58 | } |
Line 58... | Line 59... | ||
58 | 59 |