/C-OSD/trunk/CHANGE.LOG |
---|
18,6 → 18,11 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
****************************************************************************/ |
20140415-2130 |
*adapted structs to reflect FC/NC software V2.06a |
*added version check for FC/NC software |
(OSD will hang at init in case version do not match) |
20140317-1730 |
*fixed battery-voltage >254 crash |
/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.04a soft to fully enjoy the software. |
You will need at least NaviCtrl 2.06a soft to fully enjoy the software. |
S1 enters a menu where you can cycle through using S2 and toggle/accept choice with S1 |
/C-OSD/trunk/c-osd.aws |
---|
1,0 → 0,0 |
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="238 94 1702 543" LineCol="30 23" State="Maximized"/><File00001 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="260 116 1738 557" LineCol="76 0" State="Maximized"/><File00002 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="282 138 1760 579" LineCol="42 0" State="Maximized"/><File00003 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="304 160 1782 601" LineCol="209 0" State="Maximized"/><File00004 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="326 182 1804 623" LineCol="146 0" State="Maximized"/><File00005 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="348 204 1826 645" LineCol="51 0" State="Maximized"/><File00006 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="370 226 1848 667" LineCol="0 0" State="Maximized"/><File00007 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="392 248 1870 689" LineCol="110 26" State="Maximized"/><File00008 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="414 270 1892 711" LineCol="211 0" State="Maximized"/><File00009 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="436 292 1914 733" LineCol="0 0" State="Maximized"/><File00010 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="234 71 1922 741" LineCol="251 62" State="Maximized"/><File00011 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="260 116 1738 557" LineCol="69 0" State="Maximized"/><File00012 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="282 138 1760 579" LineCol="134 0" State="Maximized"/><File00013 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="304 160 1782 601" LineCol="0 0" State="Maximized"/><File00014 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="326 182 1804 623" LineCol="0 0" State="Maximized"/><File00015 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="348 204 1826 645" LineCol="28 0" State="Maximized"/><File00016 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="370 226 1848 667" LineCol="0 0" State="Maximized"/><File00017 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="392 248 1870 689" LineCol="0 0" State="Maximized"/><File00018 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="414 270 1892 711" LineCol="44 0" State="Maximized"/><File00019 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="436 292 1914 733" LineCol="24 0" State="Maximized"/><File00020 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="238 94 1716 535" LineCol="19 0" State="Maximized"/><File00021 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="260 116 1738 557" LineCol="25 0" State="Maximized"/><File00022 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="282 138 1760 579" LineCol="25 0" State="Maximized"/><File00023 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="304 160 1782 601" LineCol="0 0" State="Maximized"/><File00024 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="326 182 1804 623" LineCol="0 0" State="Maximized"/><File00025 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_jopl.c" Position="348 204 1826 645" LineCol="161 0" State="Maximized"/><File00026 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\default\Makefile" Position="370 226 1848 667" LineCol="0 0" State="Maximized"/><File00027 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.c" Position="392 248 1870 689" LineCol="85 0" State="Maximized"/><File00028 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.h" Position="414 270 1892 711" LineCol="3 0" State="Maximized"/><File00029 Name="c:\WinAVR\avr\include\math.h" Position="436 292 1914 733" LineCol="116 0" State="Maximized"/></Files></AVRWorkspace> |
<AVRWorkspace><IOSettings><CurrentRegisters/></IOSettings><part name="ATMEGA162"/><Files><File00000 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\main.c" Position="361 208 1392 573" LineCol="30 0"/><File00001 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\mk-data-structs.h" Position="383 230 1428 587" LineCol="305 0"/><File00002 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.h" Position="405 252 1450 609" LineCol="42 0"/><File00003 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\max7456_software_spi.c" Position="427 274 1472 631" LineCol="209 0"/><File00004 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.c" Position="449 296 1494 653" LineCol="146 0"/><File00005 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart1.h" Position="471 318 1516 675" LineCol="51 0"/><File00006 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.c" Position="493 340 1538 697" LineCol="0 0"/><File00007 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\main.h" Position="515 362 1560 719" LineCol="110 0"/><File00008 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.c" Position="361 208 1406 565" LineCol="211 0"/><File00009 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_helpers.h" Position="383 230 1428 587" LineCol="0 0"/><File00010 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.c" Position="405 252 1450 609" LineCol="251 0"/><File00011 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.c" Position="427 274 1472 631" LineCol="69 0"/><File00012 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\config.c" Position="449 296 1494 653" LineCol="148 0"/><File00013 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\config.h" Position="471 318 1516 675" LineCol="0 0"/><File00014 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.c" Position="493 340 1538 697" LineCol="0 0"/><File00015 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\spi.h" Position="515 362 1560 719" LineCol="28 0"/><File00016 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.c" Position="361 208 1406 565" LineCol="0 0"/><File00017 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\buttons.h" Position="383 230 1428 587" LineCol="0 0"/><File00018 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.c" Position="405 252 1450 609" LineCol="44 0"/><File00019 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\ppm.h" Position="427 274 1472 631" LineCol="24 0"/><File00020 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.c" Position="449 296 1494 653" LineCol="19 0"/><File00021 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_default.h" Position="471 318 1516 675" LineCol="25 0"/><File00022 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_ncmode_minimal.h" Position="493 340 1538 697" LineCol="25 0"/><File00023 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_default.h" Position="515 362 1560 719" LineCol="0 0"/><File00024 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\characters.h" Position="361 208 1406 565" LineCol="0 0"/><File00025 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\osd_fcmode_jopl.c" Position="383 230 1428 587" LineCol="161 0"/><File00026 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\default\Makefile" Position="405 252 1450 609" LineCol="0 0"/><File00027 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.c" Position="427 274 1472 631" LineCol="85 0"/><File00028 Name="I:\Eigene Dateien\C-Projects\C-OSD\trunk\usart0.h" Position="449 296 1494 653" LineCol="3 0"/><File00029 Name="c:\WinAVR\avr\include\math.h" Position="471 318 1516 675" LineCol="116 0"/></Files></AVRWorkspace> |
/C-OSD/trunk/config.c |
---|
135,6 → 135,26 |
#ifndef NOFCOMMUNICATION |
usart1_request_blocking('Q', PSTR(REQUEST_CURRENT_SETTING)); |
memcpy((char*)(&setting), (char*)pRxData, sizeof(paramset_serial)); |
if (setting.param.Revision != EEPARAM_REVISION) { |
write_ascii_string_pgm(3, 11, PSTR("WRONG SETTINGS REVISION")); |
write_ascii_string_pgm(3, 12, PSTR("OSD: FC:")); |
write_ndigit_number_u(8, 12, EEPARAM_REVISION, 3, 1); |
write_ndigit_number_u(15, 12, setting.param.Revision, 3, 1); |
while (1) {}; |
} |
#if FCONLY |
#else |
if (naviData.Version != NAVIDATA_VERSION) { |
write_ascii_string_pgm(3, 11, PSTR("WRONG NAVIDATA VERSION")); |
write_ascii_string_pgm(3, 12, PSTR("OSD: FC:")); |
write_ndigit_number_u(8, 12, NAVIDATA_VERSION, 3, 1); |
write_ndigit_number_u(15, 12, naviData.Version, 3, 1); |
while (1) {}; |
} |
#endif |
//setting = *((paramset_serial*)pRxData); |
#else |
// manual stuff? |
/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=20140317-1730 |
set OSDBUILDDATE=20140415-2130 |
echo "Building: %OSDBUILDDATE%" |
:: date /T |
/C-OSD/trunk/default/flash-usbasp.bat |
---|
20,7 → 20,7 |
:: ****************************************************************************/ |
:: set FIRMWAREFILE to current version |
set FIRMWAREFILE=C-OSD-20140317-1730-pal.hex |
set FIRMWAREFILE=C-OSD-20140415-2130-pal.hex |
:: Read fuses as test |
avrdude -c usbasp -p m162 -n -v |
/C-OSD/trunk/mk-data-structs.h |
---|
81,12 → 81,13 |
/* |
* NaviCtrl OSD Structs |
* portions taken and adapted from |
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.04a/uart1.h |
* http://svn.mikrokopter.de/filedetails.php?repname=NaviCtrl&path=/tags/V2.06a/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 { |
167,12 → 168,14 |
/* |
* MikroKopter config struct |
* portions taken and adapted from |
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.04a/eeprom.h |
* http://svn.mikrokopter.de/filedetails.php?repname=FlightCtrl&path=/tags/V2.06a/eeprom.h |
*/ |
#define EEPARAM_REVISION 98 // is count up, if paramater stucture has changed (compatibility) |
#define EEPARAM_REVISION 102 // is count up, if paramater stucture has changed (compatibility) |
typedef struct { |
typedef struct |
{ |
unsigned char Revision; |
unsigned char Kanalbelegung[12]; // GAS[0], GIER[1],NICK[2], ROLL[3], POTI1, POTI2, POTI3 |
unsigned char GlobalConfig; // 0x01=Höhenregler aktiv,0x02=Kompass aktiv, 0x04=GPS aktiv, 0x08=Heading Hold aktiv |
247,7 → 250,7 |
unsigned char WARN_J16_Bitmask; // for the J16 Output |
unsigned char WARN_J17_Bitmask; // for the J17 Output |
//---NaviCtrl--------------------------------------------- |
unsigned char NaviOut1Parameter; // for the J16 Output |
unsigned char AutoPhotoDistance; // Auto Photo |
unsigned char NaviGpsModeChannel; // Parameters for the Naviboard |
unsigned char NaviGpsGain; |
unsigned char NaviGpsP; |
261,9 → 264,10 |
unsigned char NaviStickThreshold; |
unsigned char NaviWindCorrection; |
unsigned char NaviAccCompensation; // New since 0.86 -> was: SpeedCompensation |
unsigned char NaviOperatingRadius; |
unsigned char NaviMaxFlyingRange; // in 10m |
unsigned char NaviAngleLimitation; |
unsigned char NaviPH_LoginTime; |
unsigned char NaviDescendRange; |
//---Ext.Ctrl--------------------------------------------- |
unsigned char ExternalControl; // for serial Control |
//---CareFree--------------------------------------------- |
277,11 → 281,17 |
unsigned char FailsafeChannel; // if the value of this channel is > 100, the MK reports "RC-Lost" |
unsigned char ServoFilterNick; |
unsigned char ServoFilterRoll; |
unsigned char Servo3OnValue; |
unsigned char Servo3OffValue; |
unsigned char Servo4OnValue; |
unsigned char Servo4OffValue; |
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 AutoPhotoAtitudes; |
unsigned char SingleWpSpeed; |
//------------------------------------------------ |
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 |