Subversion Repositories NaviCtrl

Compare Revisions

Ignore whitespace Rev 723 → Rev 724

/trunk/menu.c
73,6 → 73,7
#include "analog.h"
#include "canbus.h"
#include "triggerlog.h"
#include "CamCtrl.h"
 
u8 DispPtr = 0;
s8 DisplayBuff[DISPLAYBUFFSIZE];
79,7 → 80,7
 
 
u8 MenuItem = 0;
u8 MaxMenuItem = 29;
u8 MaxMenuItem = 30;
 
void Menu_Putchar(char c)
{
633,19 → 634,64
LCD_printfxy(0,2,"Hardware V%d ", UART_VersionInfo.HWMajor/10);
LCD_printfxy(0,3,"(V3 required)");
}
break;
case 30:
LCD_printfxy(0,0,"CamCtrl");
if(!(FromCamCtrl.CamStatus & CAM_STATE_I2C_OK))
{
LCD_printfxy(0,2,"Not connected");
if(CamCtrlTimeout < 10) LCD_printfxy(13,3,"(conn)"); // connect manually
if(Keys & KEY4) CamCtrlTimeout = 65000;
}
else
{
switch(FromCamCtrl.Type)
{
case TYPE_LANC: LCD_printfxy(8,0,"LANC"); break;
case TYPE_IR: LCD_printfxy(8,0,"IR"); break;
case TYPE_MULTI: LCD_printfxy(8,0,"MULTI"); break;
}
LCD_printfxy(0,0,"CamCtrl");
LCD_printfxy(0,1,"State:");
if(FromCamCtrl.CamStatus & CAM_STATE_RDY) LCD_printfxy(6,1,"RDY ") else LCD_printfxy(6,1,"--- ");
if(FromCamCtrl.CamStatus & CAM_STATE_REC_ACTIVE) LCD_printfxy(10,1,"REC ") else LCD_printfxy(10,1," ");
if(FromCamCtrl.CamStatus & CAM_STATE_PHOTO_MODE) LCD_printfxy(14,1,"PHOTO") else LCD_printfxy(14,1," ");
 
// LCD_printfxy(0,0,"PPM Input");
/*
LCD_printfxy(0,0,"%4i %4i %4i %4i",PPM_In[1],PPM_In[2],PPM_In[3],PPM_In[4]);
LCD_printfxy(0,1,"%4i %4i %4i %4i",PPM_In[5],PPM_In[6],PPM_In[7],PPM_In[8]);
LCD_printfxy(0,2,"%4i %4i %4i %4i",PPM_In[9],PPM_In[10],PPM_In[11],PPM_In[12]);
LCD_printfxy(0,3,"%4i %4i %4i %4i",PPM_In[13],PPM_In[14],PPM_In[15],PPM_In[16]);
LCD_printfxy(0,0,"%4i %4i %4i %4i",PPM_In[17],PPM_In[18],PPM_In[19],PPM_In[20]);
LCD_printfxy(0,1,"%4i %4i %4i %4i",PPM_In[21],PPM_In[22],PPM_In[23],PPM_In[24]);
LCD_printfxy(0,2,"%4i %4i %4i %4i",PPM_In[25],PPM_In[26],PPM_In[27],PPM_In[28]);
LCD_printfxy(0,3,"%4i %4i %4i %4i",PPM_In[29],PPM_In[30],PPM_In[31],PPM_In[32]);
*/
if(FromCamCtrl.CamStatus & CAM_STATE_CAM_DISCONN) LCD_printfxy(0,2,"Disconn.")
else
{
if(FromCamCtrl.CamStatus & CAM_STATE_OFF) LCD_printfxy(0,2,"OFF ") else LCD_printfxy(0,2,"ON ");
}
LCD_printfxy(10,2,"Pics:%3d ",FromCamCtrl.PhotoCount);
//LCD_printfxy(5,2,"x%2x ",FromCamCtrl.CamStatus);
if(FromCamCtrl.PPM1Okay) LCD_printfxy(0,3,"Zoom:%3i",FromCamCtrl.PPM1Data);
if(!FromCamCtrl.PPM2Okay) // there is PPM Input connected to the CamCtrl
{
LCD_printfxy(14,3,"(TRIG)");
if(EE_Parameter.CamCtrlModeChannel == 0)
{
LCD_printfxy(9,3,"(REC)"); // Control only possible if no switch is assigned
}
else LCD_printfxy(0,3,"CH:%3i",127+PPM_In[EE_Parameter.CamCtrlModeChannel]);
 
if(Keys & KEY3)
{
ToCamCtrl.CamCommand &= ~(CAM_CMD_REC_OFF|CAM_CMD_REC_ON);
if(FromCamCtrl.CamStatus & CAM_STATE_REC_ACTIVE) ToCamCtrl.CamCommand |= CAM_CMD_REC_OFF;
else ToCamCtrl.CamCommand |= CAM_CMD_REC_ON;
}
if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_SHUTTER;
//if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_RESET_CAM;
//if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_SWITCH_ON;
//if(Keys & KEY4) ToCamCtrl.CamCommand |= CAM_CMD_SWITCH_OFF;
}
else
{
if(FromCamCtrl.PPM2Okay) LCD_printfxy(10,3,"PPM:%3i",FromCamCtrl.PPM2Data);
}
}
break;
 
default:
//MaxMenuItem = MenuItem - 1;
MenuItem = 0;