Exemplo n.º 1
0
void win_otaset_turn_frntend(void)
{
	UINT8 back_saved;
	S_NODE s_node;
	T_NODE t_node;
	
	win_otaset_get_FreqSymbPid_display();

	cur_tuner_idx = OTA_TUNER_IDX;

#ifdef _BUILD_OTA_E_
	MEMCPY(&s_node, &m_ota_cfg.s_node, sizeof(s_node));
#else
	get_tuner_sat(OTA_TUNER_IDX, ota_satpos, &s_node);

	MEMCPY(&m_ota_cfg.s_node, &s_node, sizeof(s_node));
	t_node.frq = ota_freq;
	t_node.sym = ota_symb;
	t_node.pol = ota_pol;
	MEMCPY(&m_ota_cfg.t_node, &t_node, sizeof(t_node));
#endif	

#ifndef NEW_DEMO_FRAME
	struct xpond_antenna_info	xai;
	
	sat2antenna_ext(&s_node, &xai.antenna,OTA_TUNER_IDX);
	xai.xpond.frq = ota_freq;
	xai.xpond.sym = ota_symb;
	xai.xpond.pol = ota_pol;
	UIChChgSetAntennaXpond(&xai);
#else
	struct ft_antenna antenna;
	union ft_xpond xponder;
	struct nim_device *nim = NULL;

#ifdef SUPPORT_SELECT_SAME_SAT	
	cur_tuner_idx =s_node.reserve_1; //s_node.tuner1_valid ? 0 : 1;
#else
	cur_tuner_idx = s_node.tuner1_valid ? 0 : 1;
#endif

	MEMSET(&antenna, 0, sizeof(struct ft_antenna));
	MEMSET(&xponder, 0, sizeof(union ft_xpond));
	sat2antenna(&s_node, &antenna);	
	xponder.s_info.type = FRONTEND_TYPE_S;
	xponder.s_info.frq = ota_freq;
	xponder.s_info.sym = ota_symb;
	xponder.s_info.pol = ota_pol;
#ifdef SUPPORT_SELECT_SAME_SAT
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, ((s_node.reserve_1 == 0)? 0 : ((s_node.reserve_1 == 1) ? 1 : 0)));
#else
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, (s_node.tuner1_valid ? 0 : (s_node.tuner2_valid ? 1 : 0)));
#endif

	frontend_tuning(nim, &antenna, &xponder, 1);
    if(0 == cur_tuner_idx) //TUNER1 <--> TSI_TS_A <--> DMX0
    {
        tsi_dmx_src_select(TSI_DMX_0,TSI_TS_A);
        tsi_select(TSI_TS_A,TSI_SPI_0);
    }
    else//TUNER2 <--> TSI_TS_B <--> DMX0
    {
        tsi_dmx_src_select(TSI_DMX_0,TSI_TS_B);
        tsi_select(TSI_TS_B, TSI_SPI_1);
    }
#endif
	
	wincom_dish_move_popup_open(ota_presat_id,s_node.sat_id,cur_tuner_idx,&back_saved);
	ota_presat_id = s_node.sat_id;
Exemplo n.º 2
0
static PRESULT tplst_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	UINT8 back_saved;
	S_NODE s_node;
    	POBJECT_HEAD submenu;

	switch(event)
	{
	case EVN_PRE_OPEN:
		if(sys_data_get_cur_satidx() == (UINT16)(~0))
			cur_tp_sat_idx = win_load_default_satidx();
		else
			cur_tp_sat_idx = sys_data_get_cur_satidx();

		tp_list_pos = 0xffff;
        tp_list_top = 0;

		win_tplist_load_sat(FALSE);
	       pre_tp_sat_idx= cur_tp_sat_idx;
		wincom_close_help();
		wincom_open_subtitle(pObj,RS_TP_LIST,0);
		break;
	case EVN_POST_OPEN:
		//win_signal_open(pObj);
		//win_signal_open_tplist(pObj);
        win_signal_open_ex(pObj,pObj->frame.uLeft+30,pObj->frame.uTop + LIST_ITEMCNT*(ITEM_H + ITEM_GAP) + LST_SAT_H +25);
          wincom_open_commen_help(pObj);
		wincom_open_help(pObj,tplist_helpinfo , HELP_CNT);
		win_tplist_tuner_frontend();
		win_signal_refresh();
		//win_signal_update();
		get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node);
		if(!tpscan_return)
			wincom_dish_move_popup_open(0xFFFF,s_node.sat_id,cur_tuner_idx,&back_saved);
		break;
	case EVN_PRE_CLOSE:
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
		if(win_tplist_check_change())
			update_data();

		api_stop_timer(&tpturn_timer_id);
		win_signal_close();
		wincom_close_help();
		sys_data_check_channel_groups();
		sys_data_set_cur_satidx((UINT16)cur_tp_sat_idx);
		#ifdef MULTIFEED_SUPPORT
	        multifeed_del_invalid_info();
		#endif
  		wincom_close_subtitle();
		OSD_ClearScreen();
		win_open_submenu_title(submenu,sub_menu_desc->title_id, 0);  //guop
      
		break;
	case EVN_MSG_GOT:
		win_tplist_message_proc(param1,param2);
		break;
	default:
		break;
	}


	return ret;
}
Exemplo n.º 3
0
static PRESULT motorset_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	
	UINT32 sel;
	UINT16* Uni_str;
	UINT8 bID;

	COM_POP_LIST_TYPE_T list_type;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;
	S_NODE s_node;
	UINT16 cur_idx;
	UINT8 back_saved;
	

	bID = OSD_GetObjID(pObj);

	switch(event)
	{
	case EVN_REQUEST_STRING:
		sel = param1;
		Uni_str= (UINT16*)param2;
		if(bID == SAT_ID)
			get_tuner_sat_name(antset_cur_tuner,sel,Uni_str);
		else //TP_ID
		{
			get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node);
			get_tp_name(s_node.sat_id,sel,Uni_str);
		}
		break;
	case EVN_POST_CHANGE:
		sel = param1;

SAT_TP_CHANGED:
		/* Need to turn SAT/TP here*/
		if(bID == SAT_ID)
		{
			win_motorset_load_sat(SAT_IDX,TRUE);
			win_motorset_set_frontend();
			get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node);			
			wincom_dish_move_popup_open(0xFFFF,s_node.sat_id,antset_cur_tuner,&back_saved);			
		}
		else
		{
			win_motorset_turn_tp();
		}
		
		break;
	case EVN_UNKNOWN_ACTION:
		unact = (VACTION)(param1>>16);
		if(unact == VACT_ENTER)
		{
			param.selecttype = POP_LIST_SINGLESELECT;

			OSD_SetRect2(&rect,&pObj->frame);	
			rect.uLeft -= 40;
			rect.uWidth += 40;

			if(bID == SAT_ID)
			{
				list_type = POP_LIST_TYPE_SAT;
				list_type = POP_LIST_TYPE_SAT;
				rect.uHeight = 300;
				param.id = antset_cur_tuner;
				param.cur = SAT_IDX;				
			}
			else// if(bID == TP_ID)
			{
				list_type = POP_LIST_TYPE_TP;
				list_type = POP_LIST_TYPE_TP;
				rect.uHeight = 300;
				get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node);
				param.id = s_node.sat_id;
				param.cur = TP_IDX;
			}
			
			cur_idx = win_com_open_sub_list(list_type,&rect,&param);
			if(cur_idx == LIST_INVALID_SEL_IDX || cur_idx == param.cur)
				break;
			
			if(bID == SAT_ID)
				SAT_IDX = cur_idx;
			else
				TP_IDX = cur_idx;
			OSD_TrackObject(pObj, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);
			
			sel = cur_idx;
			
			goto SAT_TP_CHANGED;
		}
		
		break;
	}


	return ret;
}
Exemplo n.º 4
0
static void win_tplist_tuner_frontend(void)
{
	S_NODE s_node;
	T_NODE t_node;
#ifdef NEW_DEMO_FRAME
	struct ft_antenna antenna;
	union ft_xpond	xpond_info;
	struct nim_device *nim = NULL;
#else
	struct cc_antenna_info antenna;
	struct cc_xpond_info	xpond_info;
#endif

	OBJLIST* ol;
	UINT32 tp_idx;
    UINT16 pre_sat_id,cur_sat_id;
	UINT8 back_saved;
    BOOL old_get_key;

    nim_io_control(g_nim_dev, NIM_DRIVER_STOP_CHANSCAN, 0);
    ap_set_key_notify_proc(win_tplist_key_notify_proc);
    old_get_key = ap_enable_key_task_get_key(TRUE);

    win_signal_set_level_quality(0, 0, 0);
    win_signal_update();
	OSD_UpdateVscr(OSD_GetTaskVscr(osal_task_get_current_id()));

	ol = &tplst_olist;

	tp_idx = OSD_GetObjListCurPoint(ol);
	
	get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx,&s_node);
	get_tp_at(s_node.sat_id,tp_idx,&t_node);

#ifdef SUPPORT_TWO_TUNER
#ifdef SUPPORT_SELECT_SAME_SAT
	cur_tuner_idx = s_node.reserve_1; //antset_cur_tuner;//s_node.tuner1_valid? 0 : 1;
#else
	cur_tuner_idx = s_node.tuner1_valid? 0 : 1;
#endif
#endif

#ifndef NEW_DEMO_FRAME
	struct cc_antenna_info antenna;
	struct cc_xpond_info	xpond_info;

	sat2antenna_ext(&s_node, &antenna,cur_tuner_idx);
	xpond_info.frq = t_node.frq;
	xpond_info.sym = t_node.sym;
	xpond_info.pol = t_node.pol;

	set_antenna(&antenna);
	set_xpond(&xpond_info);
#else
	MEMSET(&antenna, 0, sizeof(struct ft_antenna));
	MEMSET(&xpond_info, 0, sizeof(union ft_xpond));
	sat2antenna(&s_node, &antenna);	
	xpond_info.s_info.type = FRONTEND_TYPE_S;
	xpond_info.s_info.frq = t_node.frq;
	xpond_info.s_info.sym = t_node.sym;
	xpond_info.s_info.pol = t_node.pol;
	xpond_info.s_info.tp_id = t_node.tp_id;
#ifdef SUPPORT_SELECT_SAME_SAT
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, ((s_node.reserve_1 == 0)? 0 : ((s_node.reserve_1 == 1) ? 1 : 0)));
#else
	nim = (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, (s_node.tuner1_valid ? 0 : (s_node.tuner2_valid ? 1 : 0)));
#endif
	
	frontend_tuning(nim, &antenna, &xpond_info, 1);
	
#endif
    
    if(pre_tp_sat_idx != cur_tp_sat_idx)
    {
		get_tuner_sat(TUNER_EITHER, pre_tp_sat_idx, &s_node);			
		pre_sat_id = s_node.sat_id;

		get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node);			
		cur_sat_id = s_node.sat_id;
    
		wincom_dish_move_popup_open(/*pre_sat_id*/0xFFFF,cur_sat_id,cur_tuner_idx,&back_saved);
        pre_tp_sat_idx = cur_tp_sat_idx;
    }

    ap_enable_key_task_get_key(old_get_key);
    ap_set_key_notify_proc(NULL);
    nim_io_control(g_nim_dev, NIM_DRIVER_STOP_CHANSCAN, 0);
}
Exemplo n.º 5
0
static PRESULT motorset_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	S_NODE s_node;
	UINT8 back_saved;
	UINT16 title_strid;
	POBJECT_HEAD sat_item = (POBJECT_HEAD)&motorset_item1;
	POBJECT_HEAD tp_item = (POBJECT_HEAD)&motorset_item2;
	
	SYSTEM_DATA* sys_data;
	sys_data = sys_data_get();

	get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node);

	switch(event)
	{
	case EVN_PRE_OPEN:
		tone_voice_init = 0;
		diskmotor_move_state = 0;
		diskmove_timer_id = OSAL_INVALID_ID;

		SAT_CNT = get_tuner_sat_cnt(antset_cur_tuner);
		SAT_IDX = 0;

		win_motorset_load_sat(SAT_IDX,FALSE);
		if(sys_data->tuner_lnb_type[antset_cur_tuner] != LNB_MOTOR)
			return PROC_LEAVE;
		if(sys_data->tuner_lnb_antenna[antset_cur_tuner].motor_type == LNB_MOTOR_DISEQC12)
		{
			title_strid = RS_MOTOR_SETTING;
			sat_item->bUpID 	= RECACULATE_ID;
			tp_item->bDownID 	= POS_ID;
			tp_item->pNext 		= (POBJECT_HEAD)&motorset_item3;			
		}
		else
		{
			title_strid = RS_MOTOR_SETTING;
			sat_item->bUpID 	= POS_ID;
			tp_item->bDownID 	= SAT_ID;
			tp_item->pNext 	= NULL;			
			
		}
		OSD_SetContainerFocus(&g_win_motorset, SAT_ID);
		
		
		wincom_open_title(pObj,title_strid,0);

		break;
	case EVN_POST_OPEN:
		win_motorset_set_frontend();
		//win_signal_open(pObj);
		win_signal_open_ex(pObj,pObj->frame.uLeft + 4,pObj->frame.uTop+pObj->frame.uHeight - 140);
		win_signal_refresh();
		//win_signal_update();		
		get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node);			
		wincom_dish_move_popup_open(0xFFFF,s_node.sat_id,antset_cur_tuner,&back_saved);		
		break;
	case EVN_PRE_CLOSE:
		/* Make OSD not flickering */
		*((UINT32*)param2) &= ~C_CLOSE_CLRBACK_FLG;	
		break;
	case EVN_POST_CLOSE:
		win_signal_close();
#ifdef ANTENNA_INSTALL_BEEP	
		if(sys_data->install_beep)
		{
		#if(defined(DVBT_BEE_TONE) && ANTENNA_INSTALL_BEEP == 1)
			api_audio_stop_tonevoice();
		#elif (defined(AUDIO_SPECIAL_EFFECT) && ANTENNA_INSTALL_BEEP == 2)
			api_audio_beep_stop();
		#endif
		}
#endif		
		break;		
	case EVN_POST_DRAW:
		if(tp_item->pNext != NULL)
			win_motorset_draw_info(diskmotor_move_state);
		break;
	case EVN_MSG_GOT:
		ret = win_motorset_message_proc(param1,param2);
		break;
		
	}

	return ret;
}