Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 855 → Rev 856

/trunk/MobileMenu.c
86,15 → 86,18
#define ML_SLIDER 0x0002
#define ML_WHEEL 0x0004
#define ML_EDIT 0x0008
#define ML_WHEEL_RELATIV 0x0010
 
 
MobileLabel_t MobileLabel[MOBILE_MAX_MENU] =
{
//{ 123456789012345678901 Min Max Default Decimals 1234567890123456
{ "Status " , 0, 1000, 200, 0, " ", {"SAT ","CAMERA","MAGNET"," "," "},0,0}, // 0
{ "Second Menu " , -100, 100, 50, 1, "Slider + Send ", {"-10 ","+10 ","-1 ","+1 ","Store "},2,ML_SEND | ML_SLIDER}, // 1
{ "Third Menu " , 10, 40, 20, 2, "Wheel ", {" "," "," "," ","Take "},1,ML_WHEEL}, // 2
{ "All Characters " , 0, 256, 20, 3, "Edit + Send ", {" "," "," "," "," "},3,ML_EDIT |ML_SEND} // 3
//{ 123456789012345678901 Min Max Default Decimals 1234567890123456 Keys Layout, LayoutOptions
{ "Status " , 0, 1000, 200, 0, " ", {"SAT ","Time ","Magnet","Camera","Logs "},0, 0}, // 0
{ "Load Waypoint List " , 1, 99, 1, 0, "Select List ", {"Fixed "," ","Relati"," "," "},1, ML_EDIT }, // 1
{ "Load single Position " , 1, 99, 1, 0, "Load from Index:", {" "," "," "," ","Load "},1, ML_EDIT}, // 2
{ "Store single Position" , 1, 99, 1, 0, "Store on Index: ", {" "," "," "," ","Store "},1, ML_EDIT} // 3
 
// { "All Characters " , 0, 256, 20, 3, "Slider + Send ", {" "," "," "," "," "},3, ML_SEND | ML_SLIDER} // 4
};
 
 
200,6 → 203,8
if(Keys & KEY1) show = 0;
if(Keys & KEY2) show = 1;
if(Keys & KEY3) show = 2;
if(Keys & KEY4) show = 3;
if(Keys & KEY5) show = 4;
switch(show)
{
case 0:
206,40 → 211,102
Mobile_printfxy(0,3,"S:%2d %2im/s HM:%3dm %c",NaviData.SatsInUse,NaviData.GroundSpeed/100,NaviData.HomePositionDeviation.Distance_dm/10,NC_GPS_ModeCharacter);
break;
case 1:
Mobile_printfxy(0,3," %04i/%02i/%02i %02i:%02i:%02i", SystemTime.Year,SystemTime.Month, SystemTime.Day, SystemTime.Hour, SystemTime.Min, SystemTime.Sec);
break;
case 2:
Mobile_printfxy(0,3,"MAG:%3u%% incl:%2d`(%2i)",EarthMagneticField/5,EarthMagneticInclination,EarthMagneticInclinationTheoretic);
break;
case 3:
if(TrigLogging.CountExternal) Mobile_printfxy(0,3,"HotShoe:%4u ",TrigLogging.CountExternal-1)
else Mobile_printfxy(0,3,"No HotShoe");
break;
case 2:
Mobile_printfxy(0,3,"MAG:%3u%% incl:%2d`(%2i)",EarthMagneticField,EarthMagneticInclination,EarthMagneticInclinationTheoretic);
case 4:
if(SDCardInfo.Valid == 1)
Mobile_printfxy(0,3,"Logs: GPX:%3u TRG:%3u",Logged_GPX_Counter,Logged_TRIG_Counter)
else
Mobile_printfxy(0,3,"no card in slot ");
break;
}
 
Mobile_printfxy_BLINK(0,4,"%s",NaviData_HoTT_Text.HoTT_DisplayText);
if(ErrorCode) Mobile_printfxy_BLINK(0,4,"%s",NaviData_HoTT_Text.HoTT_DisplayText)
else Mobile_printfxy(0,4,"%s",NaviData_HoTT_Text.HoTT_DisplayText);
 
}
break;
case 1:
Mobile_printfxy(0,0,"Testpage %i ",item);
Mobile_printfxy(0,1," KEY: 0x%02x ",Keys);
Mobile_printfxy(0,2," Load: %5i ",tmp2);
Mobile_printfxy(0,3," Temp: %5i ",tmp);
{
static u8 index = 0, fixed = 0;
if(Keys & KEY1)
{
index = Value;
if(index > ToFC_MaxWpListIndex) index = ToFC_MaxWpListIndex;
FromFC_LoadWP_List = index;
fixed = 1;
}
if(Keys & KEY3)
{
if(GPSData.SatFix == SATFIX_3D)
{
index = Value;
if(index > ToFC_MaxWpListIndex) index = ToFC_MaxWpListIndex;
FromFC_LoadWP_List = index | 0x80;
fixed = 2;
}
else fixed = 3;
}
 
if(Keys & KEY5) tmp2 = tmp;
if(Keys & KEY4) tmp++;
if(Keys & KEY3) tmp--;
if(Keys & KEY2) tmp += 10;
if(Keys & KEY1) tmp -= 10;
if(Keys & COPY) tmp2 = Value;
Mobile.ReturnValue = tmp2;
if(!fixed) Mobile_printfxy(0,0,"Load relative or fix")
else Mobile_printfxy(0,0,"Name: %s ", WPL_Store.Name);
 
// 12345678901234567890
Mobile_printfxy(0,1,"Points Index ");
Mobile_printfxy(0,2," %3d %3d ", PointList_GetCount(), index);
if(fixed == 1) Mobile_printfxy(0,3," Fixed positions");
if(fixed == 2) Mobile_printfxy(0,3," Relative positions");
if(fixed == 3) { Mobile_printfxy(0,3," Error: No Satfix!"); if(GPSData.SatFix == SATFIX_3D) fixed = 0;};
Mobile_printfxy(0,4," LOAD List: %3i",Value);
Mobile.ReturnValue = index;
}
break;
case 2:
Mobile_printfxy(0,0,"Testpage %i ",item);
Mobile_printfxy(0,1,"CNT: %5u ",tmp3++);
Mobile_printfxy(0,2,"KEY: %02x ",Keys);
Mobile_printfxy(0,4,"VALUE: %5i ",Value);
if(Keys & COPY) tmp3 = Value;
Mobile.ReturnValue = tmp3;
{
static u8 index = 0;
if(Keys & KEY5)
{
index = Value;
if(index > ToFC_MaxWpListIndex) index = ToFC_MaxWpListIndex;
FromFC_Load_SinglePoint = index;
}
Mobile_printfxy(0,0,"Load Point" );
Mobile_printfxy(0,1,"Name: %s", WPL_Store.Name);
// 12345678901234567890
Mobile_printfxy(0,3,"Number: %3d ", Value);
if(index != Value) Mobile_printfxy(15,3,"(LOAD)");
Mobile.ReturnValue = index;
}
break;
case 3:
{
static u8 index = 1;
Mobile_printfxy(0,0,"Save Point" );
Mobile_printfxy(0,1,"Alt: %3dm", NaviData.Altimeter_5cm/20);
// 12345678901234567890
Mobile_printfxy(0,2,"Dir: %3d ", CompassSetpointCorrected/10);
if(GPSData.SatFix == SATFIX_3D)
{
Mobile_printfxy(0,4,"Number: %3d (Save)", Value);
if(Keys & KEY5)
{
index = Value;
if(index > ToFC_MaxWpListIndex) index = ToFC_MaxWpListIndex;
FromFC_Save_SinglePoint = index;
}
}
else Mobile_printfxy(5,4,"No Satfix !");
Mobile.ReturnValue = index;
}
break;
case 4:
{
static u16 offset = 20, tmp;
// Mobile_printfxy(0,0,"Testpage %i %c",item,33);
/trunk/main.h
14,7 → 14,7
 
#define VERSION_MAJOR 2
#define VERSION_MINOR 19
#define VERSION_PATCH 7
#define VERSION_PATCH 8
// 0 = A
// 1 = B
// 2 = C
/trunk/spi_slave.h
386,4 → 386,8
extern paramset_t EE_Parameter;
 
#endif //_SPI_SLAVE_H
 
 
 
 
/trunk/uart1.c
1499,12 → 1499,10
MobileDataRequest.Event = 0;
//++++ has the data changed ? +++++
crc = CRC16((unsigned char*)(&Mobile), sizeof(Mobile_t));
DebugOut.Analog[16] = crc;
if(crc != lastcrc || UART1_Request_MobileMenu == 1)
{
MKProtocol_CreateSerialFrame(&UART1_tx_buffer, 'N', NC_ADDRESS, 2, &cmd ,1, &Mobile, sizeof(Mobile_t));
lastcrc = crc;
DebugOut.Analog[17]++;
}
//+++++++++++++++++++++++++++++++++
if(++UART1_Request_MobileMenu >= 16) UART1_Request_MobileMenu = 0;