📄 osd_fac.c
字号:
break;
}
}
void MFac9300Proc(void)
{
switch(ucOsdEventMsg)
{
case _OE_ADJ_INC: MFac9300ValAdj(_INC); break;
case _OE_ADJ_DEC: MFac9300ValAdj(_DEC); break;
case _OE_MENU_NEXT: MFac9300MenuAdj(_NEXT); break;
case _OE_MENU_PREV: MFac9300MenuAdj(_PREV); break;
// case _OE_ENTER_SUBMENU: MFactoryEnterSub(); break;
case _OE_RETURN_UPMENU: MFac9300ReturnMenu(); break;
}
}
void MFacGainReturnMenu()
{
OSDLine(ROW(2),COL(16+(ucOsdState-_MI_FAC_GAIN_R)*6),LENGTH(6),_MENU_NORMAL_COLOR,BYTE_COLOR);
ucOsdState=_MI_FAC_GAIN;
SETCOLOR_FACMAINMENU_SELLINE(2, _MENU_SECECT_COLOR);
}
void MFacGainMenuAdj(BYTE ucMode)
{
// ucMode : _NEXT or _Prev
BYTE ucNewItem;
if(ucMode==_INC)
{
if(ucOsdState>_MI_FAC_GAIN_R-1 && ucOsdState<_MI_FAC_GAIN_B)
ucNewItem=ucOsdState+1;
else
ucNewItem=_MI_FAC_GAIN;
}
else
{
if(ucOsdState>_MI_FAC_GAIN_R && ucOsdState<_MI_FAC_GAIN_B+1)
ucNewItem=ucOsdState-1;
else
ucNewItem=_MI_FAC_GAIN;
}
// 1. Clear Current Menu
OSDLine(ROW(2),COL(16+(ucOsdState-_MI_FAC_GAIN_R)*6),LENGTH(6),_MENU_NORMAL_COLOR,BYTE_COLOR);
// 2. Change ucOsdState
ucOsdState = ucNewItem;
// 3. Draw New Item
if(ucOsdState>_MI_FAC_GAIN_R-1 && ucOsdState<_MI_FAC_GAIN_B+1)
OSDLine(ROW(2),COL(16+(ucOsdState-_MI_FAC_GAIN_R)*6),LENGTH(6),_MENU_SECECT_COLOR,BYTE_COLOR);
else
SETCOLOR_FACMAINMENU_SELLINE(2,_MENU_SECECT_COLOR);
}
void MFacGainValAdj(BYTE ucMode)
{
BYTE y;
// ucMode : _INC or _DEC
SET_KEYREPEATENABLE();
switch(ucOsdState)
{
case _MI_FAC_GAIN_R :
y= ValueInRangeChange(0, 255,stAdcData.AdcGain[_RED], _NON_LOOP | ucMode);
stAdcData.AdcGain[_RED]=y;
ucOsdEventMsg = _SAVE_EE_ADCDATA_MSG;
CAdjustAdcGain();
CFacShowNumber(18,2,y);
break;
case _MI_FAC_GAIN_G :
y= ValueInRangeChange(0, 255,stAdcData.AdcGain[_GREEN], _NON_LOOP | ucMode);
stAdcData.AdcGain[_GREEN]=y;
ucOsdEventMsg = _SAVE_EE_ADCDATA_MSG;
CAdjustAdcGain();
CFacShowNumber(25,2,y);
break;
case _MI_FAC_GAIN_B:
y= ValueInRangeChange(0, 255,stAdcData.AdcGain[_BLUE], _NON_LOOP | ucMode);
stAdcData.AdcGain[_BLUE]=y;
ucOsdEventMsg = _SAVE_EE_ADCDATA_MSG;
CAdjustAdcGain();
CFacShowNumber(31,2,y);
break;
}
}
void MFacGainProc(void)
{
switch(ucOsdEventMsg)
{
case _OE_ADJ_INC: MFacGainValAdj(_INC); break;
case _OE_ADJ_DEC: MFacGainValAdj(_DEC); break;
case _OE_MENU_NEXT: MFacGainMenuAdj(_NEXT); break;
case _OE_MENU_PREV: MFacGainMenuAdj(_PREV); break;
// case _OE_ENTER_SUBMENU: MFactoryEnterSub(); break;
case _OE_RETURN_UPMENU: MFacGainReturnMenu(); break;
}
}
void MFacOffsetReturnMenu()
{
OSDLine(ROW(3),COL(16+(ucOsdState-_MI_FAC_OFFSET_R)*6),LENGTH(6),_MENU_NORMAL_COLOR,BYTE_COLOR);
ucOsdState=_MI_FAC_OFFSET;
SETCOLOR_FACMAINMENU_SELLINE(3, _MENU_SECECT_COLOR);
}
void MFacOffsetMenuAdj(BYTE ucMode)
{
// ucMode : _NEXT or _Prev
BYTE ucNewItem;
if(ucMode==_INC)
{
if(ucOsdState>_MI_FAC_OFFSET_R-1 && ucOsdState<_MI_FAC_OFFSET_B)
ucNewItem=ucOsdState+1;
else
ucNewItem=_MI_FAC_OFFSET;
}
else
{
if(ucOsdState>_MI_FAC_OFFSET_R && ucOsdState<_MI_FAC_OFFSET_B+1)
ucNewItem=ucOsdState-1;
else
ucNewItem=_MI_FAC_OFFSET;
}
// 1. Clear Current Menu
OSDLine(ROW(3),COL(16+(ucOsdState-_MI_FAC_OFFSET_R)*6),LENGTH(6),_MENU_NORMAL_COLOR,BYTE_COLOR);
// 2. Change ucOsdState
ucOsdState = ucNewItem;
// 3. Draw New Item
if(ucOsdState>_MI_FAC_OFFSET_R-1 && ucOsdState<_MI_FAC_OFFSET_B+1)
OSDLine(ROW(3),COL(16+(ucOsdState-_MI_FAC_OFFSET_R)*6),LENGTH(6),_MENU_SECECT_COLOR,BYTE_COLOR);
else
SETCOLOR_FACMAINMENU_SELLINE(3,_MENU_SECECT_COLOR);
}
void MFacOffsetValAdj(BYTE ucMode)
{
BYTE y;
// ucMode : _INC or _DEC
SET_KEYREPEATENABLE();
switch(ucOsdState)
{
case _MI_FAC_OFFSET_R :
y= ValueInRangeChange(0, 255,stAdcData.AdcOffset[_RED], _NON_LOOP | ucMode);
stAdcData.AdcOffset[_RED]=y;
ucOsdEventMsg = _SAVE_EE_ADCDATA_MSG;
CAdjustAdcOffset();
CFacShowNumber(18,3,y);
break;
case _MI_FAC_OFFSET_G :
y= ValueInRangeChange(0, 255,stAdcData.AdcOffset[_GREEN], _NON_LOOP | ucMode);
stAdcData.AdcOffset[_GREEN]=y;
ucOsdEventMsg = _SAVE_EE_ADCDATA_MSG;
CAdjustAdcOffset();
CFacShowNumber(25,3,y);
break;
case _MI_FAC_OFFSET_B:
y= ValueInRangeChange(0, 255,stAdcData.AdcOffset[_BLUE], _NON_LOOP | ucMode);
stAdcData.AdcOffset[_BLUE]=y;
ucOsdEventMsg = _SAVE_EE_ADCDATA_MSG;
CAdjustAdcOffset();
CFacShowNumber(31,3,y);
break;
}
}
void MFacOffsetProc(void)
{
switch(ucOsdEventMsg)
{
case _OE_ADJ_INC: MFacOffsetValAdj(_INC); break;
case _OE_ADJ_DEC: MFacOffsetValAdj(_DEC); break;
case _OE_MENU_NEXT: MFacOffsetMenuAdj(_NEXT); break;
case _OE_MENU_PREV: MFacOffsetMenuAdj(_PREV); break;
// case _OE_ENTER_SUBMENU: MFactoryEnterSub(); break;
case _OE_RETURN_UPMENU: MFacOffsetReturnMenu(); break;
}
}
void MFac6500ReturnMenu()
{
OSDLine(ROW(5),COL(16+(ucOsdState-_MI_FAC_6500_R)*6),LENGTH(6),_MENU_NORMAL_COLOR,BYTE_COLOR);
ucOsdState=_MI_FAC_6500;
SETCOLOR_FACMAINMENU_SELLINE(5, _MENU_SECECT_COLOR);
}
void MFac6500MenuAdj(BYTE ucMode)
{
// ucMode : _NEXT or _Prev
BYTE ucNewItem;
if(ucMode==_INC)
{
if(ucOsdState>_MI_FAC_6500_R-1 && ucOsdState<_MI_FAC_6500_B)
ucNewItem=ucOsdState+1;
else
ucNewItem=_MI_FAC_6500;
}
else
{
if(ucOsdState>_MI_FAC_6500_R && ucOsdState<_MI_FAC_6500_B+1)
ucNewItem=ucOsdState-1;
else
ucNewItem=_MI_FAC_6500;
}
// 1. Clear Current Menu
OSDLine(ROW(5),COL(16+(ucOsdState-_MI_FAC_6500_R)*6),LENGTH(6),_MENU_NORMAL_COLOR,BYTE_COLOR);
// 2. Change ucOsdState
ucOsdState = ucNewItem;
// 3. Draw New Item
if(ucOsdState>_MI_FAC_6500_R-1 && ucOsdState<_MI_FAC_6500_B+1)
OSDLine(ROW(5),COL(16+(ucOsdState-_MI_FAC_6500_R)*6),LENGTH(6),_MENU_SECECT_COLOR,BYTE_COLOR);
else
SETCOLOR_FACMAINMENU_SELLINE(5,_MENU_SECECT_COLOR);
}
void MFac6500ValAdj(BYTE ucMode)
{
BYTE y;
SET_COLOR_TEMP_TYPE(_CT_6500);
CEepromLoadColorTempData();
// ucMode : _INC or _DEC
SET_KEYREPEATENABLE();
switch(ucOsdState)
{
case _MI_FAC_6500_R :
y= ValueInRangeChange(0, 255,stColorTempData.ColorTemp[3 + _RED], _NON_LOOP | ucMode);
stColorTempData.ColorTemp[3 + _RED]=y;
ucOsdEventMsg = _SAVE_EE_COLORPROC1_MSG;
CFacShowNumber(18,5,y);
CAdjustContrast();
break;
case _MI_FAC_6500_G :
y= ValueInRangeChange(0, 255,stColorTempData.ColorTemp[3 + _GREEN], _NON_LOOP | ucMode);
stColorTempData.ColorTemp[3 + _GREEN]=y;
ucOsdEventMsg = _SAVE_EE_COLORPROC1_MSG;
CAdjustContrast();
CFacShowNumber(25,5,y);
break;
case _MI_FAC_6500_B:
y= ValueInRangeChange(0, 255,stColorTempData.ColorTemp[3 + _BLUE], _NON_LOOP | ucMode);
stColorTempData.ColorTemp[3 + _BLUE]=y;
ucOsdEventMsg = _SAVE_EE_COLORPROC1_MSG;
CAdjustContrast();
CFacShowNumber(31,5,y);
break;
}
}
void MFac6500Proc(void)
{
switch(ucOsdEventMsg)
{
case _OE_ADJ_INC: MFac6500ValAdj(_INC); break;
case _OE_ADJ_DEC: MFac6500ValAdj(_DEC); break;
case _OE_MENU_NEXT: MFac6500MenuAdj(_NEXT); break;
case _OE_MENU_PREV: MFac6500MenuAdj(_PREV); break;
// case _OE_ENTER_SUBMENU: MFactoryEnterSub(); break;
case _OE_RETURN_UPMENU: MFac6500ReturnMenu(); break;
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -