Rev 1793 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1793 | Rev 1799 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | int Display_Timer, Debug_Timer,Kompass_Timer,Timer3D; |
75 | int Display_Timer, Debug_Timer,Kompass_Timer,Timer3D; |
76 | unsigned int DebugDataIntervall = 0, Intervall3D = 0, Display_Interval = 0; |
76 | unsigned int DebugDataIntervall = 0, Intervall3D = 0, Display_Interval = 0; |
77 | unsigned int AboTimeOut = 0; |
77 | unsigned int AboTimeOut = 0; |
78 | unsigned volatile char JetiUpdateModeActive = 0; |
78 | unsigned volatile char JetiUpdateModeActive = 0; |
Line 79... | Line 79... | ||
79 | 79 | ||
80 | const unsigned char ANALOG_TEXT[32][16] PROGMEM = |
80 | const unsigned char ANALOG_TEXT[32][13] PROGMEM = |
81 | { |
81 | { |
82 | //1234567890123456 |
82 | //1234567890123456 |
83 | "AngleNick ", //0 |
83 | "AngleNick ", //0 |
84 | "AngleRoll ", |
84 | "AngleRoll ", |
85 | "AccNick ", |
85 | "AccNick ", |
86 | "AccRoll ", |
86 | "AccRoll ", |
87 | "YawGyro ", |
87 | "YawGyro ", |
88 | "Height Value ", //5 |
88 | "Height Value ", //5 |
89 | "AccZ ", |
89 | "AccZ ", |
90 | "Gas ", |
90 | "Gas ", |
91 | "Compass Value ", |
91 | "Compass Value", |
92 | "Voltage [0.1V] ", |
92 | "Voltage[0.1V]", |
93 | "Receiver Level ", //10 |
93 | "ReceiverLevel", //10 |
94 | "Gyro Compass ", |
94 | "Gyro Compass ", |
95 | "Motor 1 ", |
95 | "Motor 1 ", |
96 | "Motor 2 ", |
96 | "Motor 2 ", |
97 | "Motor 3 ", |
97 | "Motor 3 ", |
98 | "Motor 4 ", //15 |
98 | "Motor 4 ", //15 |
99 | "16 ", |
99 | "Motor 5 ", |
100 | "17 ", |
100 | "Motor 6 ", |
101 | "18 ", |
101 | "18 ", |
102 | "19 ", |
102 | "WoutCalcState", |
103 | "Servo ", //20 |
103 | "Servo ", //20 |
104 | "Hovergas ", |
104 | "Hovergas ", |
105 | "Current [0.1A] ", |
105 | "Current[0.1A]", |
106 | "Capacity [mAh] ", |
106 | "Capacity[mAh]", |
107 | "24 ", |
107 | "Motor 7 ", |
108 | "25 ", //25 |
108 | "Motor 8 ", //25 |
109 | "26 ", |
109 | "Motor 9 ", |
110 | "27 ", |
110 | "Motor 10 ", |
111 | "I2C-Error ", |
111 | "I2C-Error ", |
112 | "BL Limit ", |
112 | "BL Limit ", |
113 | "GPS_Nick ", //30 |
113 | "GPS_Nick ", //30 |
114 | "GPS_Roll " |
114 | "GPS_Roll " |
Line 115... | Line 115... | ||
115 | }; |
115 | }; |
116 | 116 | ||
Line 168... | Line 168... | ||
168 | NeuerDatensatzEmpfangen = 1; |
168 | NeuerDatensatzEmpfangen = 1; |
169 | AnzahlEmpfangsBytes = buf_ptr + 1; |
169 | AnzahlEmpfangsBytes = buf_ptr + 1; |
170 | RxdBuffer[buf_ptr] = '\r'; |
170 | RxdBuffer[buf_ptr] = '\r'; |
171 | if(RxdBuffer[2] == 'R') |
171 | if(RxdBuffer[2] == 'R') |
172 | { |
172 | { |
- | 173 | ||
- | 174 | #ifdef NODISPLAY // MartinW main.h |
|
- | 175 | #warning : "### no MKTool Display ###" |
|
173 | LcdClear(); |
176 | LcdClear(); |
- | 177 | #endif |
|
- | 178 | ||
174 | wdt_enable(WDTO_250MS); // Reset-Commando |
179 | wdt_enable(WDTO_250MS); // Reset-Commando |
175 | ServoActive = 0; |
180 | ServoActive = 0; |
176 | } |
181 | } |
Line 177... | Line 182... | ||
177 | 182 | ||
Line 568... | Line 573... | ||
568 | if(DebugDataIntervall > 0) DebugDataAnforderung = 1; |
573 | if(DebugDataIntervall > 0) DebugDataAnforderung = 1; |
569 | AboTimeOut = SetDelay(ABO_TIMEOUT); |
574 | AboTimeOut = SetDelay(ABO_TIMEOUT); |
570 | break; |
575 | break; |
Line 571... | Line 576... | ||
571 | 576 | ||
- | 577 | case 'h':// x-1 Displayzeilen |
|
- | 578 | ||
- | 579 | #ifdef NODISPLAY // only include functions if DEBUG is defined in main.h |
|
- | 580 | #warning : "### no MKTool Display ###" |
|
- | 581 | ||
572 | case 'h':// x-1 Displayzeilen |
582 | |
573 | PcZugriff = 255; |
583 | PcZugriff = 255; |
574 | if((pRxData[0] & 0x80) == 0x00) // old format |
584 | if((pRxData[0] & 0x80) == 0x00) // old format |
575 | { |
585 | { |
576 | DisplayLine = 2; |
586 | DisplayLine = 2; |
Line 589... | Line 599... | ||
589 | case 'l':// x-1 Displayzeilen |
599 | case 'l':// x-1 Displayzeilen |
590 | PcZugriff = 255; |
600 | PcZugriff = 255; |
591 | MenuePunkt = pRxData[0]; |
601 | MenuePunkt = pRxData[0]; |
592 | DebugDisplayAnforderung1 = 1; |
602 | DebugDisplayAnforderung1 = 1; |
593 | break; |
603 | break; |
- | 604 | ||
- | 605 | #endif |
|
- | 606 | ||
594 | case 'v': // Version-Anforderung und Ausbaustufe |
607 | case 'v': // Version-Anforderung und Ausbaustufe |
595 | GetVersionAnforderung = 1; |
608 | GetVersionAnforderung = 1; |
596 | break; |
609 | break; |
Line 597... | Line 610... | ||
597 | 610 | ||
Line 664... | Line 677... | ||
664 | { |
677 | { |
665 | Display_Interval = 0; |
678 | Display_Interval = 0; |
666 | DebugDataIntervall = 0; |
679 | DebugDataIntervall = 0; |
667 | Intervall3D = 0; |
680 | Intervall3D = 0; |
668 | } |
681 | } |
- | 682 | ||
- | 683 | #ifdef NODISPLAY //main.h |
|
- | 684 | #warning : "### no MKTool Display ###" |
|
Line 669... | Line 685... | ||
669 | 685 | ||
670 | if(((Display_Interval>0 && CheckDelay(Display_Timer)) || DebugDisplayAnforderung) && UebertragungAbgeschlossen) |
686 | if(((Display_Interval>0 && CheckDelay(Display_Timer)) || DebugDisplayAnforderung) && UebertragungAbgeschlossen) |
671 | { |
687 | { |
672 | if(DisplayLine > 3)// new format |
688 | if(DisplayLine > 3)// new format |
Line 687... | Line 703... | ||
687 | { |
703 | { |
688 | Menu(); |
704 | Menu(); |
689 | SendOutData('L', FC_ADDRESS, 3, &MenuePunkt, sizeof(MenuePunkt), &MaxMenue, sizeof(MaxMenue), DisplayBuff, sizeof(DisplayBuff)); |
705 | SendOutData('L', FC_ADDRESS, 3, &MenuePunkt, sizeof(MenuePunkt), &MaxMenue, sizeof(MaxMenue), DisplayBuff, sizeof(DisplayBuff)); |
690 | DebugDisplayAnforderung1 = 0; |
706 | DebugDisplayAnforderung1 = 0; |
691 | } |
707 | } |
- | 708 | ||
- | 709 | #endif |
|
- | 710 | ||
692 | if(GetVersionAnforderung && UebertragungAbgeschlossen) |
711 | if(GetVersionAnforderung && UebertragungAbgeschlossen) |
693 | { |
712 | { |
694 | SendOutData('V', FC_ADDRESS, 1, (unsigned char *) &VersionInfo, sizeof(VersionInfo)); |
713 | SendOutData('V', FC_ADDRESS, 1, (unsigned char *) &VersionInfo, sizeof(VersionInfo)); |
695 | GetVersionAnforderung = 0; |
714 | GetVersionAnforderung = 0; |
696 | Debug_OK("Version gesendet"); |
715 | Debug_OK("Version gesendet"); |
Line 729... | Line 748... | ||
729 | SendOutData('C', FC_ADDRESS, 1, (unsigned char *) &Data3D,sizeof(Data3D)); |
748 | SendOutData('C', FC_ADDRESS, 1, (unsigned char *) &Data3D,sizeof(Data3D)); |
730 | Timer3D = SetDelay(Intervall3D); |
749 | Timer3D = SetDelay(Intervall3D); |
731 | } |
750 | } |
732 | if(DebugTextAnforderung != 255) // Texte für die Analogdaten |
751 | if(DebugTextAnforderung != 255) // Texte für die Analogdaten |
733 | { |
752 | { |
734 | unsigned char label[16]; // local sram buffer |
753 | /// old: unsigned char label[16]; // local sram buffer |
- | 754 | unsigned char label[16]=" "; // local sram buffer ///MartinW; for MKTool, needs 32 bytes |
|
- | 755 | ||
- | 756 | ||
735 | memcpy_P(label, ANALOG_TEXT[DebugTextAnforderung], 16); // read lable from flash to sra |
757 | memcpy_P(label, ANALOG_TEXT[DebugTextAnforderung], 13); // read lable from flash to sra |
736 | SendOutData('A', FC_ADDRESS, 2, (unsigned char *)&DebugTextAnforderung, sizeof(DebugTextAnforderung),label, 16); |
758 | SendOutData('A', FC_ADDRESS, 2, (unsigned char *)&DebugTextAnforderung, sizeof(DebugTextAnforderung),label, 16); |
737 | DebugTextAnforderung = 255; |
759 | DebugTextAnforderung = 255; |
738 | } |
760 | } |
739 | if(ConfirmFrame && UebertragungAbgeschlossen) // Datensatz bestätigen |
761 | if(ConfirmFrame && UebertragungAbgeschlossen) // Datensatz bestätigen |
740 | { |
762 | { |