Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 2216 → Rev 2217

/C-OSD/trunk/README.TXT
33,7 → 33,7
 
Instructions:
Connect the "To FC" port from EPi-OSD to the Debug port of the NaviCtrl.
You will need at least NaviCtrl 2.06a soft to fully enjoy the software.
You will need at least NaviCtrl 2.12a soft to fully enjoy the software.
 
S1 enters a menu where you can cycle through using S2 and toggle/accept choice with S1
 
49,6 → 49,9
FAQ:
http://www.mylifesucks.de/oss/c-osd/#FAQ
 
How to build the software from source:
http://youtu.be/BgOAicjeNC8
How to flash the software (the MK-user way):
Requirements:
- Windows PC with a real SerialPort
/C-OSD/trunk/CHANGE.LOG
18,6 → 18,9
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
****************************************************************************/
 
20151026-0630
*adapted structs to reflect FC/NC software V2.12a
20150427-2145
*adapted structs to reflect FC/NC software V2.10a/b
/C-OSD/trunk/mk-data-structs.h
46,7 → 46,7
/*
* FC Debug Struct
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V0.88e/uart.h
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.12a/uart.h
*/
typedef struct {
unsigned char Status[2];
54,18 → 54,21
} __attribute__((packed)) str_DebugOut;
 
typedef struct {
unsigned char SWMajor;
unsigned char SWMinor;
unsigned char ProtoMajor;
unsigned char ProtoMinor;
unsigned char SWPatch;
unsigned char HardwareError[5];
unsigned char SWMajor;
unsigned char SWMinor;
unsigned char ProtoMajor;
unsigned char LabelTextCRC;
unsigned char SWPatch;
unsigned char HardwareError[2];
unsigned char HWMajor;
unsigned char BL_Firmware;
unsigned char Flags;
} __attribute__((packed)) str_VersionInfo;
 
/*
* NaviCtrl GPS Structs
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V0.20c/ubx.h
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/gpspos.h
*/
typedef struct {
s32 Longitude; // in 1E-7 deg
77,11 → 80,12
#define INVALID 0x00
#define NEWDATA 0x01
#define PROCESSED 0x02
#define SIMULATION 0x03
 
/*
* NaviCtrl OSD Structs
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.06a/uart1.h
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/uart1.h
*/
typedef struct {
u16 Distance; // distance to target in dm
113,7 → 117,7
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
u8 WP_OperatingRadius; // current WP operation radius around the Home Position in m
s16 TopSpeed; // velocity in vertical direction in cm/s
u8 TargetHoldTime; // time in s to stay at the given target, counts down to 0 if target has been reached
u8 FCStatusFlags2; // StatusFlags2 (since version 5 added)
123,6 → 127,12
u16 UsedCapacity; // used capacity in mAh
} __attribute__((packed)) NaviData_t;
 
/*
* NaviCtrl & FCFlags Flags
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.12a/main.h
*/
// .NCFlags
#define NC_FLAG_FREE 0x01
#define NC_FLAG_PH 0x02
#define NC_FLAG_CH 0x04
132,11 → 142,7
#define NC_FLAG_MANUAL_CONTROL 0x40
#define NC_FLAG_GPS_OK 0x80
 
/*
* MikroKopter Flags
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V0.80d/fc.h
*/
// FC.StatusFlags
#define FCFLAG_MOTOR_RUN 0x01
#define FCFLAG_FLY 0x02
#define FCFLAG_CALIBRATE 0x04
146,34 → 152,49
#define FCFLAG_VARIO_TRIM_UP 0x40
#define FCFLAG_VARIO_TRIM_DOWN 0x80
 
// FC STATUS FLAGS2
// FC.StatusFlags2
#define FC_STATUS2_CAREFREE 0x01
#define FC_STATUS2_ALTITUDE_CONTROL 0x02
#define FC_STATUS2_RC_FAILSAVE_ACTIVE 0x04
#define FC_STATUS2_OUT1_ACTIVE 0x08
#define FC_STATUS2_OUT2_ACTIVE 0x10
#define FC_STATUS2_WAIT_FOR_TAKEOFF 0x20 // Motor Running, but still on the ground
 
#define DEFEKT_G_NICK 0x01
#define DEFEKT_G_ROLL 0x02
#define DEFEKT_G_GIER 0x04
#define DEFEKT_A_NICK 0x08
#define DEFEKT_A_ROLL 0x10
#define DEFEKT_A_Z 0x20
#define DEFEKT_PRESSURE 0x40
#define DEFEKT_CAREFREE_ERR 0x80
 
#define DEFEKT_I2C 0x01
#define DEFEKT_BL_MISSING 0x02
#define DEFEKT_SPI_RX_ERR 0x04
#define DEFEKT_PPM_ERR 0x08
#define DEFEKT_MIXER_ERR 0x10
// FC.StatusFlags3
#define FC_STATUS3_REDUNDANCE_AKTIVE 0x01
#define FC_STATUS3_BOAT 0x02
#define FC_STATUS3_REDUNDANCE_ERROR 0x04
#define FC_STATUS3_REDUNDANCE_TEST 0x08
 
// FC ERRORS FLAGS
#define FC_ERROR0_GYRO_NICK 0x01
#define FC_ERROR0_GYRO_ROLL 0x02
#define FC_ERROR0_GYRO_YAW 0x04
#define FC_ERROR0_ACC_NICK 0x08
#define FC_ERROR0_ACC_ROLL 0x10
#define FC_ERROR0_ACC_TOP 0x20
#define FC_ERROR0_PRESSURE 0x40
#define FC_ERROR0_CAREFREE 0x80
 
#define FC_ERROR1_I2C 0x01
#define FC_ERROR1_BL_MISSING 0x02
#define FC_ERROR1_SPI_RX 0x04
#define FC_ERROR1_PPM 0x08
#define FC_ERROR1_MIXER 0x10
#define FC_ERROR1_RES1 0x20
#define FC_ERROR1_RES2 0x40
#define FC_ERROR1_RES3 0x80
 
/*
* MikroKopter config struct
* portions taken and adapted from
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.10a/eeprom.h
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.12a/eeprom.h
*/
 
#define EEPARAM_REVISION 105 // is count up, if paramater stucture has changed (compatibility)
#define EEPARAM_REVISION 106 // is count up, if paramater stucture has changed (compatibility)
#define EEMIXER_REVISION 1 // is count up, if mixer stucture has changed (compatibility)
 
 
typedef struct
{
unsigned char Revision;
294,6 → 315,8
unsigned char AutoPhotoAtitudes;
unsigned char SingleWpSpeed;
unsigned char LandingPulse;
unsigned char SingleWpControlChannel;
unsigned char MenuKeyChannel;
//------------------------------------------------
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
/C-OSD/trunk/default/flash-usbasp.bat
20,7 → 20,7
:: ****************************************************************************/
 
:: set FIRMWAREFILE to current version
set FIRMWAREFILE=C-OSD-20150427-2145-pal.hex
set FIRMWAREFILE=C-OSD-20151026-0630-pal.hex
 
:: Read fuses as test
avrdude -c usbasp -p m162 -n -v
/C-OSD/trunk/default/dist.bat
20,7 → 20,7
:: ****************************************************************************/
 
set OSDBUILDDATE=%DATE:~-4,4%%DATE:~-7,2%%DATE:~0,2%-%TIME:~0,2%%TIME:~3,2%
set OSDBUILDDATE=20150427-2145
set OSDBUILDDATE=20151026-0630
echo "Building: %OSDBUILDDATE%"
 
:: date /T
/C-OSD/trunk/default/dist.sh
20,7 → 20,7
# ****************************************************************************/
 
DATE=`date +%Y%m%d-%H%M`
#DATE="20090604-1350"
#DATE="20151026-0630"
REVISION=`svn info .. | awk '$1 == "Revision:" {print $2}'`
 
# build pal hex