Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 503 → Rev 504

/trunk/main.c
103,6 → 103,7
volatile u32 SPIWatchDog = 15000; // stop Navigation if this goes to zero
volatile u32 SD_WatchDog = 15000; // stop Logging if this goes to zero
u32 CountGpsProcessedIn5Sec = 0,CountNewGpsDataIn5Sec = 0, FreqGpsProcessedIn5Sec = 0, FreqNewGpsDataIn5Sec = 0;
u8 NewWPL_Name = 0;
 
s8 ErrorMSG[25];
 
614,9 → 615,9
GPS_pWaypoint = PointList_WPBegin(); // updates POI index
BeepTime = 150;
}
FromFC_LoadWP_List = 0;
}
}
FromFC_LoadWP_List = 0;
}
// ++++++++++++++++++++++++++++++++++++++++++++++
 
// ---------------- Logging ---------------------------------------
/trunk/main.h
14,7 → 14,7
 
#define VERSION_MAJOR 2
#define VERSION_MINOR 3
#define VERSION_PATCH 6
#define VERSION_PATCH 7
// 0 = A
// 1 = B
// 2 = C
35,7 → 35,7
// 17 = R
// 18 = S
 
#define VERSION_SERIAL_MAJOR 11
#define VERSION_SERIAL_MAJOR 12
#define VERSION_SERIAL_MINOR 0
 
#ifndef FOLLOW_ME
139,6 → 139,7
extern u8 ClearFCStatusFlags;
void Interrupt_Init(void);
extern s16 GeoMagDec;
extern u8 NewWPL_Name;
 
typedef struct
{
/trunk/menu.c
74,7 → 74,7
 
 
u8 MenuItem = 0;
u8 MaxMenuItem = 24;
u8 MaxMenuItem = 25;
 
void Menu_Putchar(char c)
{
487,7 → 487,7
 
case 24:
{
static u8 index = 1, ret = 0;
static u8 index = 1;
if(Keys & KEY3) // next step
{
if(index < ToFC_MaxWpListIndex) index++;
501,6 → 501,22
LCD_printfxy(0,3," %3d %3d LOAD", PointList_GetCount(), index);
}
break;
case 25:
{
static u8 index = 1;
if(Keys & KEY3) // next step
{
if(index < ToFC_MaxWpListIndex) index++;
else index = 1;
}
if(Keys & KEY4) FromFC_LoadWP_List = index | 0x80;
LCD_printfxy(0,0,"Load WPL (Relativ)" );
LCD_printfxy(0,1,"Name: %s", WPL_Store.Name);
// 12345678901234567890
LCD_printfxy(0,2,"Points Index ");
LCD_printfxy(0,3," %3d %3d LOAD", PointList_GetCount(), index);
}
break;
 
default:
//MaxMenuItem = MenuItem - 1;
/trunk/spi_slave.c
448,6 → 448,7
}
break;
case SPI_NCCMD_HOTT_INFO:
if(NewWPL_Name) hott_index = 100;
switch(hott_index++)
{
case 0:
542,6 → 543,23
ToFlightCtrl.Param.Byte[2] = i2 % 256;
hott_index = 0;
break;
 
case 100:
ToFlightCtrl.Param.Byte[11] = HOTT_WPL_NAME;
ToFlightCtrl.Param.Byte[0] = 0; // index
ToFlightCtrl.Param.Byte[2] = WPL_Store.Name[0];
ToFlightCtrl.Param.Byte[3] = WPL_Store.Name[1];
ToFlightCtrl.Param.Byte[4] = WPL_Store.Name[2];
ToFlightCtrl.Param.Byte[5] = WPL_Store.Name[3];
ToFlightCtrl.Param.Byte[6] = WPL_Store.Name[4];
ToFlightCtrl.Param.Byte[7] = WPL_Store.Name[5];
ToFlightCtrl.Param.Byte[8] = WPL_Store.Name[6];
ToFlightCtrl.Param.Byte[9] = WPL_Store.Name[7];
ToFlightCtrl.Param.Byte[10]= WPL_Store.Name[8];
ToFlightCtrl.Param.Byte[1] = 9; // how many
NewWPL_Name = 0;
hott_index = 0;
break;
default:
ToFlightCtrl.Param.Byte[0] = 255;
hott_index = 0;
/trunk/spi_slave.h
127,6 → 127,7
#define HOTT_GENERAL_PACKET_ID 0x8D
#define JETI_GPS_PACKET_ID1 0x01
#define JETI_GPS_PACKET_ID2 0x02
#define HOTT_WPL_NAME 0x03
 
typedef struct
{
/trunk/ubx.c
340,6 → 340,16
//++++++++
//GPSData.Position.Longitude =1683362691L; // Neuseeland
//GPSData.Position.Latitude = -465945926L; // Neuseeland
//++++++++
//GPSData.Position.Longitude =-740443840L; // Liberty Staue davor
//GPSData.Position.Latitude = 406888880L; // Liberty Staue
 
//GPSData.Position.Longitude =-740451660L; // Liberty Staue daneben
//GPSData.Position.Latitude = 406891880L; // Liberty Staue
 
//GPSData.Position.Longitude =-740446540L; // Liberty Staue direkt
//GPSData.Position.Latitude = 406891590L; // Liberty Staue 1
 
}
 
 
/trunk/waypoints.c
61,6 → 61,7
#include "waypoints.h"
#include "uart1.h"
#include "fat16.h"
#include "main.h"
 
 
WPL_Store_t WPL_Store;
112,6 → 113,7
PointList[i].CamAngle = 0;
PointList[i].Name[0] = 0;
}
ClearWLP_Name();
return TRUE;
}
 
405,7 → 407,7
{
u8 i, u8_1;
s32 i32_1, i32_2;
 
NewWPL_Name = 1;
for (i = 0; i < PointCount; i++)
{
sprintf(wpline, "[Point%d]\r\n",PointList[i].Index);
682,7 → 684,9
len--;
}
if(len > 11) value[11] = 0;
else for(;len < 11; len++) value[len] = ' ';
memcpy(pWPL_Store->Name, value, 12);
NewWPL_Name = 1;
}
else
{
708,6 → 712,12
return(retval);
}
 
void ClearWLP_Name(void)
{
unsigned char i;
for(i=0; i<sizeof(WPL_Store.Name);i++) WPL_Store.Name[i] = 0;
NewWPL_Name = 1;
}
// move actual point list to ref pos., the point in the list marked by index gets the RefPos afterwards
u8 PointList_Move(u8 RefIndex, GPS_Pos_t* pRefPos, u16 RotationAngle)
{
/trunk/waypoints.h
70,6 → 70,6
u8 PointList_ReadFromFile(WPL_Store_t * pWPL_Store);
// move actual point list to ref pos., the point in the list marked by RefIndex get the RefPos afterwards
u8 PointList_Move(u8 RefIndex, GPS_Pos_t* pRefPos, u16 RotationAngle);
extern void ClearWLP_Name(void);
 
 
#endif // _WAYPOINTS_H