Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2038 → Rev 2039

/C-OSD/trunk/characters.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_fcmode_jopl.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/mk-data-structs.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
81,16 → 81,17
/*
* NaviCtrl OSD Structs
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V0.24b/uart1.h
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.04a/uart1.h
*/
typedef struct {
u16 Distance; // distance to target in dm
s16 Bearing; // course to target in deg
} __attribute__((packed)) GPS_PosDev_t;
#define NAVIDATA_VERSION 5
 
typedef struct {
u8 Version; // version of the data structure
GPS_Pos_t CurrentPosition; // see ubx.h for details
GPS_Pos_t CurrentPosition; // see gpspos.h for details
GPS_Pos_t TargetPosition;
GPS_PosDev_t TargetPositionDeviation;
GPS_Pos_t HomePosition;
103,12 → 104,12
u16 FlyingTime; // in seconds
u8 UBat; // Battery Voltage in 0.1 Volts
u16 GroundSpeed; // speed over ground in cm/s (2D)
s16 Heading; // current flight direction in ° as angle to north
s16 CompassHeading; // current compass value in °
s8 AngleNick; // current Nick angle in 1°
s8 AngleRoll; // current Rick angle in 1°
s16 Heading; // current flight direction in ° as angle to north
s16 CompassHeading; // current compass value in °
s8 AngleNick; // current Nick angle in 1°
s8 AngleRoll; // current Rick angle in 1°
u8 RC_Quality; // RC_Quality
u8 FCFlags; // Flags from FC
u8 FCStatusFlags; // Flags from FC
u8 NCFlags; // Flags from NC
u8 Errorcode; // 0 --> okay
u8 OperatingRadius; // current operation radius around the Home Position in m
121,13 → 122,13
u16 UsedCapacity; // used capacity in mAh
} __attribute__((packed)) NaviData_t;
 
#define NC_FLAG_FREE 0x01
#define NC_FLAG_PH 0x02
#define NC_FLAG_CH 0x04
#define NC_FLAG_RANGE_LIMIT 0x08
#define NC_FLAG_NOSERIALLINK 0x10
#define NC_FLAG_TARGET_REACHED 0x20
#define NC_FLAG_MANUAL_CONTROL 0x40
#define NC_FLAG_FREE 0x01
#define NC_FLAG_PH 0x02
#define NC_FLAG_CH 0x04
#define NC_FLAG_RANGE_LIMIT 0x08
#define NC_FLAG_NOSERIALLINK 0x10
#define NC_FLAG_TARGET_REACHED 0x20
#define NC_FLAG_MANUAL_CONTROL 0x40
#define NC_FLAG_GPS_OK 0x80
 
/*
166,8 → 167,11
/*
* MikroKopter config struct
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V0.90j/eeprom.h
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.04a/eeprom.h
*/
 
#define EEPARAM_REVISION 98 // is count up, if paramater stucture has changed (compatibility)
 
typedef struct {
unsigned char Revision;
unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3
174,7 → 178,7
unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv
unsigned char Hoehe_MinGas; // Wert : 0-100
unsigned char Luftdruck_D; // Wert : 0-250
unsigned char MaxHoehe; // Wert : 0-32
unsigned char HoeheChannel; // Wert : 0-32
unsigned char Hoehe_P; // Wert : 0-32
unsigned char Hoehe_Verstaerkung; // Wert : 0-50
unsigned char Hoehe_ACC_Wirkung; // Wert : 0-250
244,7 → 248,7
unsigned char WARN_J17_Bitmask; // for the J17 Output
//---NaviCtrl---------------------------------------------
unsigned char NaviOut1Parameter; // for the J16 Output
unsigned char NaviGpsModeControl; // Parameters for the Naviboard
unsigned char NaviGpsModeChannel; // Parameters for the Naviboard
unsigned char NaviGpsGain;
unsigned char NaviGpsP;
unsigned char NaviGpsI;
252,7 → 256,7
unsigned char NaviGpsPLimit;
unsigned char NaviGpsILimit;
unsigned char NaviGpsDLimit;
unsigned char NaviGpsACC;
unsigned char NaviGpsA;
unsigned char NaviGpsMinSat;
unsigned char NaviStickThreshold;
unsigned char NaviWindCorrection;
264,7 → 268,7
unsigned char ExternalControl; // for serial Control
//---CareFree---------------------------------------------
unsigned char OrientationAngle; // Where is the front-direction?
unsigned char CareFreeModeControl; // switch for CareFree
unsigned char CareFreeChannel; // switch for CareFree
unsigned char MotorSafetySwitch;
unsigned char MotorSmooth;
unsigned char ComingHomeAltitude;
273,8 → 277,11
unsigned char FailsafeChannel; // if the value of this channel is > 100, the MK reports "RC-Lost"
unsigned char ServoFilterNick;
unsigned char ServoFilterRoll;
unsigned char StartLandChannel;
unsigned char LandingSpeed;
unsigned char StartLandChannel;
unsigned char LandingSpeed;
unsigned char CompassOffset;
unsigned char AutoLandingVoltage; // in 0,1V 0 -> disabled
unsigned char ComingHomeVoltage; // in 0,1V 0 -> disabled
//------------------------------------------------
unsigned char BitConfig; // (war Loop-Cfg) Bitcodiert: 0x01=oben, 0x02=unten, 0x04=links, 0x08=rechts / wird getrennt behandelt
unsigned char ServoCompInvert; // // 0x01 = Nick, 0x02 = Roll, 0x04 = relative moving // WICHTIG!!! am Ende lassen
282,7 → 289,7
unsigned char GlobalConfig3; // bitcodiert
char Name[12];
unsigned char crc; // must be the last byte!
} paramset_t;
} paramset_t; // 127 bytes
 
typedef struct {
u8 SettingsIndex;
/C-OSD/trunk/README.TXT
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_fcmode_jopl.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/spi.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/ppm.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/spi.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/max7456_software_spi.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/ppm.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/default/dist.sh
1,6 → 1,6
#!/bin/sh
#/****************************************************************************
# * Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
# * Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
# * admiralcascade@gmail.com *
# * Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
# * *
/C-OSD/trunk/default/Makefile
1,5 → 1,5
#/****************************************************************************
# * Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
# * Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
# * admiralcascade@gmail.com *
# * Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
# * *
/C-OSD/trunk/default/dist.bat
1,6 → 1,6
@echo off
:: /****************************************************************************
:: * Copyright (C) 2010-2013 by Claas Anders "CaScAdE" Rathje *
:: * Copyright (C) 2010-2014 by Claas Anders "CaScAdE" Rathje *
:: * admiralcascade@gmail.com *
:: * Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
:: * *
20,7 → 20,7
:: ****************************************************************************/
 
set OSDBUILDDATE=%DATE:~-4,4%%DATE:~-7,2%%DATE:~0,2%-%TIME:~0,2%%TIME:~3,2%
::set OSDBUILDDATE=20130824-1115
set OSDBUILDDATE=20140313-2230
echo "Building: %OSDBUILDDATE%"
 
:: date /T
/C-OSD/trunk/max7456_software_spi.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/c-osd.aws
1,0 → 0,0
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="240 96 1704 545" LineCol="380 0"/><File00001 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="262 118 1740 559" LineCol="310 0"/><File00002 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="284 140 1762 581" LineCol="42 0"/><File00003 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="306 162 1784 603" LineCol="247 0"/><File00004 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="328 184 1806 625" LineCol="245 0"/><File00005 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="350 206 1828 647" LineCol="32 0"/><File00006 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="372 228 1850 669" LineCol="0 0"/><File00007 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="394 250 1872 691" LineCol="53 0"/><File00008 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="416 272 1894 713" LineCol="211 0"/><File00009 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="438 294 1916 735" LineCol="0 0"/><File00010 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="240 96 1718 537" LineCol="235 0"/><File00011 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="262 118 1740 559" LineCol="69 0"/><File00012 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="284 140 1762 581" LineCol="133 0"/><File00013 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="306 162 1784 603" LineCol="0 0"/><File00014 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="328 184 1806 625" LineCol="0 0"/><File00015 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="350 206 1828 647" LineCol="28 0"/><File00016 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="372 228 1850 669" LineCol="0 0"/><File00017 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="394 250 1872 691" LineCol="0 0"/><File00018 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="416 272 1894 713" LineCol="44 0"/><File00019 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="438 294 1916 735" LineCol="24 0"/><File00020 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="240 96 1718 537" LineCol="139 0"/><File00021 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="262 118 1740 559" LineCol="25 0"/><File00022 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="284 140 1762 581" LineCol="25 0"/><File00023 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="306 162 1784 603" LineCol="0 0"/><File00024 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="328 184 1806 625" LineCol="0 0"/><File00025 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_jopl.c" Position="350 206 1828 647" LineCol="161 0"/><File00026 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\default\Makefile" Position="372 228 1850 669" LineCol="0 0"/><File00027 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.c" Position="394 250 1872 691" LineCol="85 0"/><File00028 Name="H:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.h" Position="416 272 1894 713" LineCol="3 0"/><File00029 Name="c:\WinAVR\avr\include\math.h" Position="438 294 1916 735" LineCol="116 0"/></Files></AVRWorkspace>
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="240 96 1704 545" LineCol="35 0"/><File00001 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="262 118 1740 559" LineCol="76 0"/><File00002 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="284 140 1762 581" LineCol="42 0"/><File00003 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="306 162 1784 603" LineCol="209 0"/><File00004 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="328 184 1806 625" LineCol="146 0"/><File00005 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="350 206 1828 647" LineCol="51 0"/><File00006 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="372 228 1850 669" LineCol="0 0"/><File00007 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="394 250 1872 691" LineCol="53 0"/><File00008 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="416 272 1894 713" LineCol="211 0"/><File00009 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="438 294 1916 735" LineCol="0 0"/><File00010 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="240 96 1718 537" LineCol="95 0"/><File00011 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="262 118 1740 559" LineCol="69 0"/><File00012 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="284 140 1762 581" LineCol="134 0"/><File00013 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="306 162 1784 603" LineCol="0 0"/><File00014 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="328 184 1806 625" LineCol="0 0"/><File00015 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="350 206 1828 647" LineCol="28 0"/><File00016 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="372 228 1850 669" LineCol="0 0"/><File00017 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="394 250 1872 691" LineCol="0 0"/><File00018 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="416 272 1894 713" LineCol="44 0"/><File00019 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="438 294 1916 735" LineCol="24 0"/><File00020 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="240 96 1718 537" LineCol="19 0"/><File00021 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="262 118 1740 559" LineCol="25 0"/><File00022 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="284 140 1762 581" LineCol="25 0"/><File00023 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="306 162 1784 603" LineCol="0 0"/><File00024 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="328 184 1806 625" LineCol="0 0"/><File00025 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_jopl.c" Position="350 206 1828 647" LineCol="161 0"/><File00026 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\default\Makefile" Position="372 228 1850 669" LineCol="0 0"/><File00027 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.c" Position="394 250 1872 691" LineCol="85 0"/><File00028 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.h" Position="416 272 1894 713" LineCol="3 0"/><File00029 Name="c:\WinAVR\avr\include\math.h" Position="438 294 1916 735" LineCol="116 0"/></Files></AVRWorkspace>
/C-OSD/trunk/usart0.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/usart1.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
132,21 → 132,21
#else
(c == 'V' || c == 'O' || c == 'Q' || c == 'C')) { // version, OSD, settings, 3D-Data
#endif
usart_rx_ok = 1;
rxd_buffer[ptr_rxd_buffer++] = c2;
crc = c2;
rxd_buffer[ptr_rxd_buffer++] = c1;
crc += c1;
rxd_buffer[ptr_rxd_buffer++] = c;
crc += c;
c2 = 0;
c1 = 0;
LED1_ON
LED2_OFF
} else {
usart_rx_ok = 1;
rxd_buffer[ptr_rxd_buffer++] = c2;
crc = c2;
rxd_buffer[ptr_rxd_buffer++] = c1;
crc += c1;
rxd_buffer[ptr_rxd_buffer++] = c;
crc += c;
c2 = 0;
c1 = 0;
LED1_ON
LED2_OFF
} else {
c2 = c1;
c1 = c;
}
}
} else if (ptr_rxd_buffer < RXD_BUFFER_LEN) { // collect incomming bytes
if (c != '\r') { // no termination character
rxd_buffer[ptr_rxd_buffer++] = c; // copy byte to rxd buffer
225,12 → 225,14
usart1_puts_pgm(message);
usart1_DisableTXD();
static uint8_t wait = 0;
wait = 0;
while (rxd_buffer_locked == 0 && wait < 150) {
wait = 0;
 
// wait for complete answer
while (rxd_buffer_locked == 0 && wait < 200) {
wait++;
_delay_ms(50);
_delay_ms(10);
}
_delay_ms(100);
_delay_ms(150);
}
Decode64();
}
/C-OSD/trunk/osd_ncmode_minimal.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
63,7 → 63,7
 
 
// center
if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running
if (naviData.FCStatusFlags & FCFLAG_MOTOR_RUN) { // should be engines running
if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle
clear();
// update flags to paint display again if needed
120,7 → 120,7
}
 
// remember statistics (only when engines running)
if (naviData.FCFlags & FCFLAG_MOTOR_RUN) {
if (naviData.FCStatusFlags & FCFLAG_MOTOR_RUN) {
if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) {
if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000;
} else {
142,7 → 142,7
// remember last values
last_RC_Quality = naviData.RC_Quality;
last_UBat = naviData.UBat;
old_MKFlags = naviData.FCFlags;
old_MKFlags = naviData.FCStatusFlags;
old_NCFlags = naviData.NCFlags;
seconds_since_last_data = 0;
 
/C-OSD/trunk/usart0.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/CHANGE.LOG
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
17,6 → 17,8
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
20140313-2230
*adapted structs to reflect FC/NC software V2.04a
 
20130824-1115
*fixed FC-only mode
/C-OSD/trunk/main.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
454,6 → 454,7
if (s1_pressed()) {
config_menu();
}
 
// reqest data untill there has been some answer
if (!(COSD_FLAGS_RUNTIME & COSD_DATARECEIVED) ||
// or while not in passive mode
/C-OSD/trunk/usart1.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
27,7 → 27,7
 
#define baud 57600
 
#define RXD_BUFFER_LEN 180
#define RXD_BUFFER_LEN 220
#define TXD_BUFFER_LEN 20 // not so much needed
 
#define REQUEST_OSD_DATA "#bo?]==EG\r"
/C-OSD/trunk/osd_ncmode_minimal.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/main.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/buttons.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/buttons.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/config.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_fcmode_default.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_helpers.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/config.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_fcmode_default.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_helpers.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_ncmode_default.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
70,7 → 70,7
 
// draw big speed-meter only if configure AND not flying OR stats off and not flying
if ((COSD_FLAGS_CONFIG & COSD_FLAG_BIGSPEED)
&& ((naviData.FCFlags & FCFLAG_MOTOR_RUN)
&& ((naviData.FCStatusFlags & FCFLAG_MOTOR_RUN)
|| !((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)))) {
 
draw_big_variometer(2, 8, (uint16_t)((uint32_t)naviData.GroundSpeed / (uint32_t)125));
152,7 → 152,7
 
// show coords only when configure AND stats are off OR stats are on and motors are off
if ((COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_COORDS)
&& ((naviData.FCFlags & FCFLAG_MOTOR_RUN)
&& ((naviData.FCStatusFlags & FCFLAG_MOTOR_RUN)
|| !((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)))) {
uint8_t gps_start_line = bottom_line - 2;
if ((COSD_FLAGS_RUNTIME & COSD_FLAG_STROMREC) && COSD_FLAGS_MODES & COSD_FLAG_STROMVOLT) {
163,7 → 163,7
}
 
// center
if (naviData.FCFlags & FCFLAG_MOTOR_RUN) { // should be engines running
if (naviData.FCStatusFlags & FCFLAG_MOTOR_RUN) { // should be engines running
if (!(old_MKFlags & FCFLAG_MOTOR_RUN)) { // motors just started, clear middle
clear();
// remember current heigth for offsets
283,7 → 283,7
 
// after all, draw scope WHEN configured AND flying OR Stats are off
if ((COSD_FLAGS_CONFIG & COSD_FLAG_SHOW_SCOPE)
&& ((naviData.FCFlags & FCFLAG_MOTOR_RUN)
&& ((naviData.FCStatusFlags & FCFLAG_MOTOR_RUN)
|| !((COSD_FLAGS_RUNTIME & COSD_WASFLYING) && (COSD_FLAGS_MODES & COSD_FLAG_STATS)))) {
draw_scope();
}
293,7 → 293,7
//write_number_s(16, 5, setsReceived++);
 
// remember statistics (only when engines running)
if (naviData.FCFlags & FCFLAG_MOTOR_RUN) {
if (naviData.FCStatusFlags & FCFLAG_MOTOR_RUN) {
if (COSD_FLAGS_CONFIG & COSD_FLAG_GPSHEIGHT) {
if (naviData.CurrentPosition.Altitude / 1000 - altimeter_offset > max_Altimeter) max_Altimeter = naviData.CurrentPosition.Altitude / 1000;
} else {
315,7 → 315,7
// remember last values
last_RC_Quality = naviData.RC_Quality;
last_UBat = naviData.UBat;
old_MKFlags = naviData.FCFlags;
old_MKFlags = naviData.FCStatusFlags;
old_NCFlags = naviData.NCFlags;
seconds_since_last_data = 0;
 
/C-OSD/trunk/characters.c
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *
/C-OSD/trunk/osd_ncmode_default.h
1,5 → 1,5
/****************************************************************************
* Copyright (C) 2009-2013 by Claas Anders "CaScAdE" Rathje *
* Copyright (C) 2009-2014 by Claas Anders "CaScAdE" Rathje *
* admiralcascade@gmail.com *
* Project-URL: http://www.mylifesucks.de/oss/c-osd/ *
* *