
package com.tcl.factory.view;

import android.util.Log;
import android.view.KeyEvent;

import com.tcl.factory.bsp.TV;
import com.tcl.factory.bsp.TVDefine;

 

public class ParamSettingSSC extends SubMenu{
	public static  String MenuInfos_ParamSettingSSC[][]={
		{"SSC MIU","OFF"},
		{"DDR Modulation","KHz"},
		{"DDR Percentage","%"},
		{"SSC LVDS","OFF"},
		{"LVDS Modulation","KHz"},
		{"LVDS Percentage","%"},
		{"PanelSwing",""},
		
		{"SSC FRC ENABLE","OFF"},
		{"SSC FRC SPAN",""},
		{"SSC FRC STEP",""},
		{"SSC OSD ENABLE","OFF"},
		{"SSC OSD SPAN",""},
		{"SSC OSD STEP",""},
	};

 	public ParamSettingSSC()
	{
		super.menuInfos=MenuInfos_ParamSettingSSC;
		super.menuLabel = "Main\\Param Setting\\SSC";
		super.setTAG();
		updateMenuInfos();	
	}
 	
	public void KeyEvent(int keyCode,int pos){
		super.enterSubMenu(pos);
		switch(keyCode)
		{
		case KeyEvent.KEYCODE_DPAD_LEFT:
		case KeyEvent.KEYCODE_DPAD_RIGHT:
		{
			Log.i("eeeff", "keycode = " + keyCode + " pos = " + pos);
			switch(pos)
			{
				case 0: super.StatusHandler(TVDefine.MemorySSC);break;
				case 1: super.ValueHandler(TVDefine.MemorySpan, keyCode);break;
				case 2: super.ValueHandler(TVDefine.MemoryStep, keyCode);break;
				case 3: super.StatusHandler(TVDefine.LVDSSSC);break;
				case 4: super.ValueHandler(TVDefine.LVDSSpan, keyCode);break;
				case 5: super.ValueHandler(TVDefine.LVDSStep, keyCode);break;
				case 6: super.ValueHandler(TVDefine.PanelSwing, keyCode);break;
				
				case 7: super.StatusHandler(TVDefine.SSC_FRC_ENABLE);break;
				case 8: super.ValueHandler(TVDefine.SSC_FRC_SPAN, keyCode);break;
				case 9: super.ValueHandler(TVDefine.SSC_FRC_STEP, keyCode);break;
				case 10: super.StatusHandler(TVDefine.SSC_OSD_ENABLE);break;
				case 11: super.ValueHandler(TVDefine.SSC_OSD_SPAN, keyCode);break;
				case 12: super.ValueHandler(TVDefine.SSC_OSD_STEP, keyCode);break;
			}
		}
		break;
		default:
			break;
		}
	}
	
	/* (non-Javadoc)
	 * Factory
	 */
	@Override
	public void updateMenuInfos() {
		super.updateStatusInfo(TVDefine.MemorySSC, 0);
	   	menuInfos[1][1] = ""+TV.readV(TVDefine.MemorySpan)+"KHz";
	   	menuInfos[2][1] = ""+TV.readV(TVDefine.MemoryStep)+"%";
	   	super.updateStatusInfo(TVDefine.LVDSSSC, 3);
	   	menuInfos[4][1] = ""+TV.readV(TVDefine.LVDSSpan)+"KHz";
	   	menuInfos[5][1] = ""+TV.readV(TVDefine.LVDSStep)+"%";
	   	
	   	menuInfos[6][1] = ""+TV.readV(TVDefine.PanelSwing);
	   	
	   	super.updateStatusInfo(TVDefine.SSC_FRC_ENABLE, 7);
	   	menuInfos[8][1] = ""+TV.readV(TVDefine.SSC_FRC_SPAN)+"KHz";
	   	menuInfos[9][1] = ""+TV.readV(TVDefine.SSC_FRC_STEP)+"%";
	   	super.updateStatusInfo(TVDefine.SSC_OSD_ENABLE, 10);
	   	menuInfos[11][1] = ""+TV.readV(TVDefine.SSC_OSD_SPAN)+"KHz";
	   	menuInfos[12][1] = ""+TV.readV(TVDefine.SSC_OSD_STEP)+"%";
	}
}