static void win_satsrch_set_drawselectsats(void) { struct OSDRect rect; UINT16 i,sat_cnt,num; UINT16 col,row; TEXT_FIELD* txt = &satsrch_multisats_name; S_NODE s_node; UINT16 top; UINT16 str[50]; UINT16 nStrLen; if(single_multi_srch_flag == 0) return; MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0])); sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num(); if(num > SELSAT_ROW_CNT *2) num = SELSAT_ROW_CNT *2; txt->pString = display_strs[0]; for(i=0;i<sat_cnt;i++) { get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); sat_ids[i] = s_node.sat_id; } for(i=0;i<SELSAT_ROW_CNT*2;i++) { row = i/2; top = SELSAT_T + row * SELSAT_H+40; if(i%2 == 0) OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6); else OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6); get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); if(i<sat_cnt) { if(s_node.DiSEqC_type !=6) ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name); } else ComAscStr2Uni("", txt->pString); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } if(num == 0) { txt->pString = NULL; top = SELSAT_T + 2 * SELSAT_H+40; OSD_SetRect(&txt->head.frame, SELSAT_L0 + SELSAT_W/2, top, SELSAT_W, SELSAT_H-6); OSD_SetTextFieldContent(txt, STRING_ID , RS_DISPLAY_NO_SATELLITE/*RS_NO_SATELLITE_SELECT*/); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } }
static void win_otaset_load_tp_setting(UINT32 tp_idx, BOOL update) { S_NODE s_node; T_NODE t_node; CONTAINER* tp_item = &wota_con1; POBJECT_HEAD pObj; get_tuner_sat(OTA_TUNER_IDX, SAT_POS,&s_node); get_tp_at(s_node.sat_id,tp_idx,&t_node); ota_freq = t_node.frq; ota_symb = t_node.sym; ota_pol = t_node.pol; win_otaset_load_FreqSymbPid_display(); if(update) { pObj = (POBJECT_HEAD)tp_item; pObj = OSD_GetObjpNext(pObj); while(pObj) { OSD_DrawObject(pObj, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); pObj = OSD_GetObjpNext(pObj); } }
static void win_tplist_set_sat_display(void) { TEXT_FIELD* txt; S_NODE s_node; SYSTEM_DATA* sys_data; sys_data = sys_data_get(); UINT16 name[3*MAX_SERVICE_NAME_LENGTH]; name[0] = 0; txt = &tplst_sat; get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); if(sys_data->antenna_connect_type == ANTENNA_CONNECT_DUAL_DIFF) { if(s_node.tuner1_valid) ComAscStr2Uni("[LNB1] ", name); else ComAscStr2Uni("[LNB2] ", name); ComUniStrCat(name, (UINT16 *)s_node.sat_name); } else { ComAscStr2Uni("[LNB1] ", name); ComUniStrCat(name, (UINT16 *)s_node.sat_name); } OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)name); }
static void win_tplist_set_sat_display(void) { TEXT_FIELD* txt; S_NODE s_node; txt = &tplst_sat; get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); OSD_SetTextFieldContent(txt, STRING_UNICODE, (UINT32)s_node.sat_name); }
static void win_tpsrch_set_search_param(UINT32 fta_only,UINT32 srch_chan,UINT32 nit_flag) { S_NODE s_node; T_NODE t_node; struct as_service_param param; OBJLIST* ol; UINT16 tp_idx; struct vdec_device *vdec; struct vdec_io_get_frm_para vfrm_param; UINT32 addr, len; 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 NEW_DEMO_FRAME MEMSET(¶m, 0, sizeof(struct as_service_param)); param.as_frontend_type = FRONTEND_TYPE_S; param.as_prog_attr = fta_only |srch_chan; param.as_to = 0; param.as_sat_cnt = 1; param.sat_ids[0] = s_node.sat_id; param.as_from = t_node.tp_id; #else param.as_prog_attr = fta_only |srch_chan; param.as_to = 0; param.as_sat_id = s_node.sat_id; param.as_from = t_node.tp_id; #endif param.as_method = nit_flag? AS_METHOD_NIT_TP : AS_METHOD_TP; param.as_p_add_cfg = PROG_ADD_REPLACE_OLD; // set param win_search_set_param(¶m); update_data(); #if 0 vdec = (struct vdec_device *)dev_get_by_id(HLD_DEV_TYPE_DECV, 0); vfrm_param.ufrm_mode = VDEC_UN_DISPLAY; vdec_io_control(vdec, VDEC_IO_GET_FRM, (UINT32)&vfrm_param); addr = vfrm_param.tFrmInfo.uC_Addr; len = (vfrm_param.tFrmInfo.uHeight*vfrm_param.tFrmInfo.uWidth*3)/2; #else addr = __MM_AUTOSCAN_DB_BUFFER_ADDR; addr &= 0x8fffffff; len = __MM_AUTOSCAN_DB_BUFFER_LEN; #endif db_search_init((UINT8 *)addr, len); }
static UINT16 get_sat_idx_in_selected_sats2(UINT16 sat_cnt_selected) { S_NODE s_node; UINT16 sat_id; INT16 ant_set_sat_id=get_ant_set_sat_idx(); UINT16 i,sat_idx; get_tuner_sat(antset_cur_tuner, ant_set_sat_id,&s_node); sat_id=s_node.sat_id; for(i=0;i<sat_cnt_selected;i++) { get_sat_at(i/*sel*/,SET_SELECTED,&s_node); if(s_node.sat_id==sat_id) break; } sat_idx=i; if(sat_idx >= sat_cnt_selected) sat_idx = 0; return sat_idx; #if 0 #ifdef SUPPORT_TWO_TUNER { UINT16 Uni_str[50]; S_NODE s_node; for(i=0;i<sat_cnt;i++) { get_tuner_sat_name(2,i,Uni_str); get_sat_at(i/*sel*/,SET_SELECTED,&s_node); #ifdef SUPPORT_SELECT_SAME_SAT //OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0) ? RS_LNB1 : RS_LNB2)); if(s_node.reserve_1==antset_cur_tuner) break; #else //OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2)); if(((s_node.tuner1_valid)&&(antset_cur_tuner==0)) ||((s_node.tuner2_valid)&&(antset_cur_tuner==1))) break; #endif } } sat_idx=i; #endif #endif }
static UINT16 get_sat_pos(UINT16 sat_id) { UINT32 i, sat_cnt = get_tuner_sat_cnt(0); S_NODE s_node; for (i = 0; i < sat_cnt; i++) { get_tuner_sat(0, i, &s_node); if (s_node.sat_id == sat_id) return i; } #ifdef SUPPORT_TWO_TUNER sat_cnt = get_tuner_sat_cnt(1); for (i = 0; i < sat_cnt; i++) { get_tuner_sat(1, i, &s_node); if (s_node.sat_id == sat_id) return i; } #endif //DBG_NUM(sat_id); ASSERT(0); return 0; }
static void win_otaset_load_sat_setting(UINT32 sat_idx, BOOL update) { MULTISEL* msel; S_NODE s_node; T_NODE t_node; UINT32 val = 0; CONTAINER* sat_item = &wota_con0; POBJECT_HEAD pObj; UINT32 i,tp_num; get_tuner_sat(OTA_TUNER_IDX, sat_idx,&s_node); tp_num = get_tp_num_sat(s_node.sat_id); msel = &wota_num1; OSD_SetMultiselCount(msel, tp_num); OSD_SetMultiselSel(msel, 0);/*First TP*/ if(s_node.sat_orbit == OTA_DATA_SAT_POS)/*If default Sat,set to default TP*/ { for(i=0;i<tp_num;i++) { get_tp_at(s_node.sat_id,i,&t_node); if( t_node.frq >= (OTA_DATA_TP_FREQ - 3) && t_node.frq <= (OTA_DATA_TP_FREQ + 3) && t_node.sym >= (OTA_DATA_TP_SYMB - 500) && t_node.sym <= (OTA_DATA_TP_SYMB + 500) && t_node.pol == OTA_DATA_TP_POL) { OSD_SetMultiselSel(msel,i);/*Default TP pos*/ break; } } } if(TP_NUM > 0) { get_tp_at(s_node.sat_id,TP_POS,&t_node); ota_freq = t_node.frq; ota_symb = t_node.sym; ota_pol = t_node.pol; } else { ota_freq = OTA_DATA_TP_FREQ; ota_symb = OTA_DATA_TP_SYMB; ota_pol = OTA_DATA_TP_POL; } win_otaset_load_FreqSymbPid_display(); if(update) { pObj = (POBJECT_HEAD)sat_item; pObj = OSD_GetObjpNext(pObj); while(pObj) { OSD_DrawObject(pObj, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); pObj = OSD_GetObjpNext(pObj); } }
void win_otaset_load_default_setting(BOOL checkonly) { UINT8 sat_pos; UINT32 sat_num; UINT32 tp_num; UINT32 tp_pos; UINT32 i,j; S_NODE s_node; T_NODE t_node; sat_num = get_tuner_sat_cnt(OTA_TUNER_IDX); // When enter tp list window, the tp view have been switch to VIEW_SINGLE_SAT. // switch it to VIEW_ALL. recreate_tp_view(VIEW_ALL ,0); SAT_NUM = sat_num; SAT_POS = 0; sat_pos = 0xFF; tp_pos = INVALID_POS_NUM; if(!checkonly) { for(i=0;i<sat_num;i++) { get_tuner_sat(OTA_TUNER_IDX, i, &s_node); if(s_node.sat_orbit == OTA_DATA_SAT_POS) { sat_pos = i; tp_num = get_tp_num_sat(s_node.sat_id); for(j=0;j<tp_num;j++) { get_tp_at(s_node.sat_id,j,&t_node); if( t_node.frq >= (OTA_DATA_TP_FREQ - 3) && t_node.frq <= (OTA_DATA_TP_FREQ + 3) && t_node.sym >= (OTA_DATA_TP_SYMB - 500) && t_node.sym <= (OTA_DATA_TP_SYMB + 500) && t_node.pol == OTA_DATA_TP_POL) { tp_pos = j; break; } } break; } } if(sat_pos == 0xFF) sat_pos = 0; } else { sat_pos = ota_satpos; if(sat_pos >= sat_num) sat_pos = 0; tp_pos = TP_POS ; } SAT_POS = sat_pos; ota_satpos = sat_pos; get_tuner_sat(OTA_TUNER_IDX, sat_pos, &s_node); tp_num = get_tp_num_sat(s_node.sat_id); TP_NUM = tp_num; if(tp_pos >= tp_num) tp_pos = 0; TP_POS = tp_pos; if(TP_NUM > 0) { get_tp_at(s_node.sat_id,tp_pos,&t_node); ota_freq = t_node.frq; ota_symb = t_node.sym; ota_pol = t_node.pol; } else { ota_freq = OTA_DATA_TP_FREQ; ota_symb = OTA_DATA_TP_SYMB; ota_pol = OTA_DATA_TP_POL; } ota_pid = OTA_DATA_PID;
static PRESULT otaset_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 bID; UINT32 sel; UINT16 * Uni_str; S_NODE s_node; VACTION unact; COM_POP_LIST_TYPE_T list_type; OSD_RECT rect; COM_POP_LIST_PARAM_T param; UINT16 cur_idx; bID = OSD_GetObjID(pObj); switch(event) { case EVN_REQUEST_STRING: sel = param1; Uni_str= (UINT16*)param2; if(bID == EDIT_TP_SATE_ID) { #ifdef _BUILD_OTA_E_ ComAscStr2Uni("Fixed Sat", Uni_str); #else get_tuner_sat_name(OTA_TUNER_IDX,sel,Uni_str); #endif } else if(bID == EDIT_TP_TPIDX_ID) { get_tuner_sat(cur_tuner_idx,SAT_POS,&s_node); #ifdef _BUILD_OTA_E_ ComAscStr2Uni("Fixed TP", Uni_str); #else get_tp_name(s_node.sat_id,sel,Uni_str); #endif } break; case EVN_POST_CHANGE: sel = param1; if(bID == EDIT_TP_SATE_ID) win_otaset_load_sat_setting(sel,TRUE); else if(bID == EDIT_TP_TPIDX_ID) win_otaset_load_tp_setting(sel,TRUE); win_otaset_turn_frntend(); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact == VACT_POP_UP) { ret = PROC_LOOP; OSD_SetRect2(&rect,&pObj->frame); param.selecttype = POP_LIST_SINGLESELECT; switch(bID) { case EDIT_TP_SATE_ID: rect.uLeft -= 40; rect.uWidth += 40; list_type = POP_LIST_TYPE_SAT; rect.uHeight = 300;//230; param.id = OTA_TUNER_IDX; param.cur = SAT_POS; break; case EDIT_TP_TPIDX_ID: list_type = POP_LIST_TYPE_TP; rect.uHeight = 300;//230; get_tuner_sat(OTA_TUNER_IDX,SAT_POS,&s_node); param.id = s_node.sat_id; param.cur = TP_POS; break; default: list_type = 0xFF; break; } if(list_type == 0xFF) break; cur_idx = win_com_open_sub_list(list_type,&rect,¶m); if(cur_idx == LIST_INVALID_SEL_IDX || cur_idx == param.cur) break; if(bID == EDIT_TP_SATE_ID) { SAT_POS = cur_idx; OSD_TrackObject((POBJECT_HEAD)&wota_con0, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); win_otaset_load_sat_setting((UINT32)cur_idx, TRUE); } else if(bID == EDIT_TP_TPIDX_ID) { TP_POS = cur_idx; OSD_TrackObject((POBJECT_HEAD)&wota_con1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); win_otaset_load_tp_setting((UINT32)cur_idx,TRUE); } win_otaset_turn_frntend(); } } return ret; }
static UINT8 win_satsrch_set_scroll_drawselectsats(UINT8 start_sat_idx) { struct OSDRect rect; UINT16 i,sat_cnt,num; UINT16 col,row; TEXT_FIELD* txt = &satsrch_multisats_name; S_NODE s_node; UINT16 top; UINT16 str[50]; UINT16 nStrLen; UINT8 disp_total_row,adjust_row,start_disp_id; UINT8 next_start_idx=start_sat_idx+2; if(single_multi_srch_flag == 0) return; MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0])); sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num(); if(num > SELSAT_ROW_CNT *2) num = SELSAT_ROW_CNT *2; txt->pString = display_strs[0]; for(i=0; i<sat_cnt; i++) { get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); sat_ids[i] = s_node.sat_id; } if(start_sat_idx>=(sat_cnt+SELSAT_ROW_CNT*2-2)) next_start_idx=0; start_disp_id=0; if(start_sat_idx==0) { disp_total_row=1; adjust_row=5; } else if(start_sat_idx==2) { disp_total_row=2; adjust_row=4; } else if(start_sat_idx==4) { disp_total_row=3; adjust_row=3; } else if(start_sat_idx==6) { disp_total_row=4; adjust_row=2; } else { disp_total_row=SELSAT_ROW_CNT; adjust_row=1; if(start_sat_idx>=(SELSAT_ROW_CNT*2)) start_disp_id=start_sat_idx-(SELSAT_ROW_CNT*2)+2; } /*if(start_sat_idx==0) { struct OSDRect r; r.uLeft=SELSAT_L0;//txt.head.frame.uLeft;//200; r.uTop=SELSAT_T-40;//txt.head.frame.uTop;//300; r.uWidth=SELSAT_W*2+40;//txt.head.frame.uWidth;//100; r.uHeight=SELSAT_H*5-30;//txt.head.frame.uHeight;//45; OSD_DrawFrame(&r,RGB24_RGB1555(173,173,173),NULL); }*/ for(i=/*0*//*start_sat_idx*/start_disp_id; i<(/*SELSAT_ROW_CNT*/disp_total_row*2+start_disp_id); i++) { row = (i-start_disp_id)/2+adjust_row; top = SELSAT_T + row * 30/*SELSAT_H*/-40; if(i%2 == 0) OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6); else OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6); get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); if(i<sat_cnt) { if(s_node.DiSEqC_type !=6) ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name); } else { ComAscStr2Uni("", txt->pString); //next_start_idx=0; } OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); //if(adjust_row && (i%2==1)) // adjust_row-=2; } if(num == 0) { txt->pString = NULL; top = SELSAT_T + 2 * SELSAT_H+40; OSD_SetRect(&txt->head.frame, SELSAT_L0 + SELSAT_W/2, top, SELSAT_W, SELSAT_H-6); OSD_SetTextFieldContent(txt, STRING_ID , RS_DISPLAY_NO_SATELLITE/*RS_NO_SATELLITE_SELECT*/); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } return next_start_idx; }
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(); 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 =win_load_default_satidx(); get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); 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_subtitle(pObj,title_strid,0); wincom_close_help(); 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; }
static PRESULT satsrch_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT32 sel; UINT8 bID; char str[10]; UINT16 * Uni_str; UINT8* pstr; UINT16 cur_idx; COM_POP_LIST_TYPE_T list_type; OSD_RECT rect; COM_POP_LIST_PARAM_T param; UINT16 i,n = 0; S_NODE s_node; UINT32 flag; bID = OSD_GetObjID(pObj); switch(event) { case EVN_PRE_CHANGE: sel = *((UINT32*)param1); break; case EVN_POST_CHANGE: sel = param1; if(bID == MODE_ID) win_satsrch_set_nitactive(TRUE); if(bID == SAT_ID) { get_sat_at(sel,SET_SELECTED,&s_node); #ifdef SUPPORT_TWO_TUNER //guop modify #ifdef SUPPORT_SELECT_SAME_SAT OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0) ? RS_LNB1 : RS_LNB2)); #else OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2)); #endif OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL); #endif } break; case EVN_REQUEST_STRING: sel = param1; Uni_str= (UINT16*)param2; if(bID == SAT_ID) { get_tuner_sat_name(2,sel,Uni_str); sys_data_set_cur_satidx(sel); } break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact == VACT_POP_UP) { OSD_SetRect2(&rect,&pObj->frame); switch(bID) { case SAT_ID: rect.uLeft -= 80; rect.uWidth += 80; list_type = POP_LIST_TYPE_SAT; rect.uHeight = 300; param.id = TUNER_EITHER; param.cur = SATSRCH_SAT_IDX; if(single_multi_srch_flag == 0) param.selecttype = POP_LIST_SINGLESELECT; else { MEMSET(sat_select,0,sizeof(sat_select)); n = get_tuner_sat_cnt(TUNER_EITHER); if(n == 0) { list_type = 0xFF; break; } for(i=0;i<n;i++) { get_tuner_sat(TUNER_EITHER,i,&s_node); if(s_node.selected_flag) sat_select[i] = 1; } #if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY)) param.selecttype = POP_LIST_MULTISELECT; #else param.selecttype = POP_LIST_SINGLESELECT; #endif param.select_array = sat_select; } break; default: list_type = 0xFF; } if(list_type == 0xFF) break; cur_idx = win_com_open_sub_list(list_type,&rect,¶m); if(single_multi_srch_flag == 0) { if(cur_idx == LIST_INVALID_SEL_IDX || cur_idx == param.cur) break; } else { /* Check the select satellite */ #if (defined(SUPPORT_TWO_TUNER) || !defined(SELECT_SAT_ONLY)) for(i=0;i<n;i++) { if(win_comlist_ext_check_item_sel(i)) flag = 1; else flag = 0; get_tuner_sat(TUNER_EITHER,i,&s_node); if(s_node.selected_flag != flag) { s_node.selected_flag = flag; modify_sat(s_node.sat_id, &s_node); } } update_data(TYPE_SAT_NODE); #endif } if(single_multi_srch_flag == 0) SATSRCH_SAT_IDX = cur_idx; get_sat_at(cur_idx,SET_SELECTED,&s_node); #ifdef SUPPORT_SELECT_SAME_SAT OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, ((s_node.reserve_1 == 0) ? RS_LNB1 : RS_LNB2)); #else OSD_SetTextFieldContent(&satsrch_txt6_note , STRING_ID, (s_node.tuner1_valid ? RS_LNB1 : RS_LNB2)); #endif OSD_DrawObject((POBJECT_HEAD)&satsrch_txt6_note, C_UPDATE_ALL); OSD_TrackObject((POBJECT_HEAD)&satsrch_item1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); if(single_multi_srch_flag) { /* TODO : Draw the select satellites name */ win_satsrch_set_drawselectsats(); } } break; } return ret; }
static void win_satsrch_set_search_param(void) { UINT32 search_mode; UINT32 prog_type; S_NODE s_node; struct as_service_param param; struct nim_device *nim; struct vdec_device *vdec; struct vdec_io_get_frm_para vfrm_param; UINT32 addr, len; UINT32 i; //tv/radio/all if(SATSRCH_CHAN_IDX==1) prog_type = P_SEARCH_TV; else if(SATSRCH_CHAN_IDX==2) prog_type = P_SEARCH_RADIO; else// if(SATSRCH_CHAN_IDX==0) prog_type = P_SEARCH_TV|P_SEARCH_RADIO; /* FTA Only */ if (SATSRCH_FTA_IDX == 1) search_mode = P_SEARCH_FTA; else// if (sSATSRCH_FTA_IDX == 1) search_mode = P_SEARCH_FTA|P_SEARCH_SCRAMBLED; param.as_from = AS_FREQ_MIN; param.as_to = AS_FREQ_MAX; param.as_prog_attr = prog_type|search_mode; #ifndef NEW_DEMO_FRAME if(single_multi_srch_flag == 0) { get_tuner_sat(TUNER_EITHER,SATSRCH_SAT_IDX,&s_node); param.as_sat_id = s_node.sat_id; if (s_node.lnb_type == LNB_CTRL_22K) { param.as_from = 950; param.as_to = 2150; } } else { param.as_sat_ids = sat_ids; } #else param.as_frontend_type = FRONTEND_TYPE; if(single_multi_srch_flag == 0) { get_tuner_sat(TUNER_EITHER,SATSRCH_SAT_IDX, &s_node); param.sat_ids[0] = s_node.sat_id; param.as_sat_cnt = 1; } else { param.as_sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); // multi-search max satellite number is 256 if(param.as_sat_cnt > 256) param.as_sat_cnt = 256; MEMCPY(param.sat_ids, sat_ids, param.as_sat_cnt * sizeof(UINT16)); } #endif #ifdef ORDER_GZ1011001 if(SATSRCH_MODE_IDX == 1) #else if(SATSRCH_MODE_IDX == IDX_SCAN_MODE_AUTO_SCAN ||SATSRCH_MODE_IDX == IDX_SCAN_MODE_ACCURATE_SCAN ) #endif { if(single_multi_srch_flag == 0) param.as_method = AS_METHOD_FFT; else param.as_method = AS_METHOD_MULTI_FFT; } else if (SATSRCH_MODE_IDX == IDX_SCAN_MODE_PRESET_SCAN) { if(single_multi_srch_flag == 0) param.as_method = (SATSRCH_NIT_IDX==0)? AS_METHOD_SAT_TP : AS_METHOD_NIT; else param.as_method = (SATSRCH_NIT_IDX==0)? AS_METHOD_MULTI_TP : AS_METHOD_MULTI_NIT; } for(i = 0;i < param.as_sat_cnt;i++) { get_sat_by_id(param.sat_ids[i], &s_node); if(s_node.tuner1_valid == 1) { nim= (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, 0); } else if(s_node.tuner2_valid == 1) { nim= (struct nim_device *)dev_get_by_id(HLD_DEV_TYPE_NIM, 1); } else continue; if(SATSRCH_MODE_IDX == IDX_SCAN_MODE_ACCURATE_SCAN) nim_io_control(nim, NIM_DRIVER_SET_BLSCAN_MODE, 1); else nim_io_control(nim, NIM_DRIVER_SET_BLSCAN_MODE, 0); } param.as_p_add_cfg = PROG_ADD_REPLACE_OLD; param.as_handler = NULL; // set param win_search_set_param(¶m); //update_data(); #if 0 vdec = (struct vdec_device *)dev_get_by_id(HLD_DEV_TYPE_DECV, 0); vfrm_param.ufrm_mode = VDEC_UN_DISPLAY; vdec_io_control(vdec, VDEC_IO_GET_FRM, (UINT32)&vfrm_param); addr = vfrm_param.tFrmInfo.uC_Addr; len = (vfrm_param.tFrmInfo.uHeight*vfrm_param.tFrmInfo.uWidth*3)/2; #else addr = __MM_AUTOSCAN_DB_BUFFER_ADDR; addr &= 0x8fffffff; len = __MM_AUTOSCAN_DB_BUFFER_LEN; #endif db_search_init((UINT8 *)addr, len); }
static PRESULT win_tplist_list_unkown_act_proc(VACTION act) { PRESULT ret = PROC_LOOP; UINT8 pre_sat_idx; UINT16 sel,sat_cnt; OSD_RECT rect; COM_POP_LIST_PARAM_T param; OBJLIST* ol; S_NODE s_node; T_NODE t_node; UINT32 freq,symb,pol; UINT8 back_saved; UINT32 ftaonly_VPid,srch_chan_APid,nit_PPid; UINT32 choice; POBJECT_HEAD sub_menu; INT32 iret; UINT16 pre_sat_id,cur_sat_id; sat_cnt = get_tuner_sat_cnt(TUNER_EITHER); get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); ol = &tplst_olist; sel = OSD_GetObjListCurPoint(ol); pre_sat_idx = cur_tp_sat_idx; switch(act) { case VACT_SAT_PRE: if(cur_tp_sat_idx > 0) cur_tp_sat_idx --; else cur_tp_sat_idx = sat_cnt - 1; goto SAT_CHANGE; case VACT_SAT_NEXT: if(cur_tp_sat_idx < (sat_cnt - 1)) cur_tp_sat_idx ++; else cur_tp_sat_idx = 0; goto SAT_CHANGE; case VACT_SAT_SELECT: param.id = TUNER_EITHER; param.cur = cur_tp_sat_idx; param.selecttype = POP_LIST_SINGLESELECT; OSD_SetRect(&rect, LST_SAT_L - 20 , LST_SAT_T, LST_SAT_W + 40, 360); rect.uTop += LST_SAT_H; sel = win_com_open_sub_list(POP_LIST_TYPE_SAT,&rect,¶m); if(sel < sat_cnt) cur_tp_sat_idx = sel; goto SAT_CHANGE; SAT_CHANGE: tp_list_pos = 0; tp_list_top = 0; if(cur_tp_sat_idx != pre_sat_idx) { pre_tp_sat_idx = pre_sat_idx; get_tuner_sat(TUNER_EITHER, pre_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; #ifdef SUPPORT_TWO_TUNER #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 #endif if(win_tplist_check_change()) update_data(); win_tplist_load_sat(TRUE); //OSD_TrackObject( (POBJECT_HEAD)&tplst_olist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); api_stop_timer(&tpturn_timer_id); tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } break; case VACT_TP_EDIT: /* If not TP, can't EDIT */ if(OSD_GetObjListCount(ol) == 0) break; get_tp_at(s_node.sat_id,sel, &t_node); choice = win_tpe_open(0, s_node.sat_id, t_node.tp_id); if( choice) { win_tpe_get_setting(&freq, &symb, &pol); if(freq != t_node.frq || symb != t_node.sym || pol != t_node.pol) { t_node.frq = freq; t_node.sym = symb; t_node.pol = pol; modify_tp(t_node.tp_id,&t_node); api_stop_timer(&tpturn_timer_id); tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } } //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case VACT_TP_ADD: if(OSD_GetObjListCount(ol) == MAX_TP_NUM) break; extern UINT32 edit_tp_exist; edit_tp_exist = 0; choice = win_tpe_open(1, s_node.sat_id, 0); if(choice) { win_tpe_get_setting(&freq, &symb, &pol); MEMSET(&t_node,0,sizeof(t_node) ); t_node.frq = freq; t_node.sym = symb; t_node.pol = pol; t_node.sat_id = s_node.sat_id; iret = add_node(TYPE_TP_NODE,s_node.sat_id,(void*)&t_node); if((iret == DBERR_MAX_LIMIT) || (iret == DBERR_FLASH_FULL)) { OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg(NULL,NULL, RS_DISPLAY_TOO_MANY_TP); win_compopup_open_ext(&back_saved); break; } OSD_SetObjListCount(ol, OSD_GetObjListCount(ol) + 1); //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_ChangeFocus((POBJECT_HEAD)ol,OSD_GetObjListCount(ol) - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); api_stop_timer(&tpturn_timer_id); tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } else { OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); if( edit_tp_exist > 0) { OSD_ChangeFocus((POBJECT_HEAD)ol,edit_tp_exist - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); edit_tp_exist = 0; } //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } break; case VACT_TP_DEL: /* If not TP, can't DEL */ if(OSD_GetObjListCount(ol) == 0) break; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL,RS_DISPLAY_SURE_TO_DELETE); if(win_compopup_open_ext(&back_saved) != WIN_POP_CHOICE_YES) break; get_tp_at(s_node.sat_id,sel, &t_node); del_tp_by_id(t_node.tp_id); OSD_SetObjListCount(ol, OSD_GetObjListCount(ol) -1); OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); if( OSD_GetObjListCount(ol) > 0) { if(sel == OSD_GetObjListCount(ol)) /* Delete last TP */ OSD_ChangeFocus((POBJECT_HEAD)ol,OSD_GetObjListCount(ol) - 1, C_DRAW_SIGN_EVN_FLG | C_UPDATE_FOCUS); else tpturn_timer_id = api_start_timer(TPTURN_TIMER_NAME, TPTURN_TIMER_TIME, win_tplist_tpturn_handler); } break; case VACT_TP_SRCH: /* If not TP, can't SEARCH */ if(OSD_GetObjListCount(ol) == 0) break; sys_data_set_cur_satidx(cur_tp_sat_idx); tp_list_pos = OSD_GetObjListCurPoint(ol); tp_list_top = OSD_GetObjListTop(ol); choice = win_tpsrch_open(&ftaonly_VPid,&srch_chan_APid,&nit_PPid); if(choice==1) { win_tpsrch_set_search_param(ftaonly_VPid,srch_chan_APid,nit_PPid); sub_menu = (POBJECT_HEAD)&g_win_search; wincom_close_help(); if(OSD_ObjOpen(sub_menu, 0xFFFFFFFF) != PROC_LEAVE) { menu_stack_push(sub_menu); set_movedish_flag(TRUE);/*only tp search,need not moving dish when return*/ } } else if(choice==2) //pid search { tp_VPid = ftaonly_VPid; tp_APid = srch_chan_APid; tp_PPid = nit_PPid; prog_callback_register((prog_node_return)win_tplist_set_search_pid_callback); get_tp_at(s_node.sat_id,sel,&t_node); win_search_set_pid_param(t_node.tp_id, tp_VPid, tp_APid, tp_PPid); win_tpsrch_set_search_param(P_SEARCH_FTA|P_SEARCH_SCRAMBLED,P_SEARCH_TV|P_SEARCH_RADIO,0); sub_menu = (POBJECT_HEAD)&g_win_search; wincom_close_help(); if(OSD_ObjOpen(sub_menu, 0xFFFFFFFF) != PROC_LEAVE) menu_stack_push(sub_menu); } else { //OSD_TrackObject( (POBJECT_HEAD)ol, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); OSD_TrackObject( (POBJECT_HEAD)&g_win_tplist, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); } break; } return ret; }
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; }
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); }
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,¶m); 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; }
static PRESULT atnsetf_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT32 sel; UINT8 bID; char str[30]; UINT16 * Uni_str; UINT8* pstr; SYSTEM_DATA* sys_data; POBJECT_HEAD other_antset_menu,item; S_NODE s_node; UINT16 cur_idx; COM_POP_LIST_TYPE_T list_type; OSD_RECT rect; COM_POP_LIST_PARAM_T param; MULTISEL* msel; sys_data = sys_data_get(); bID = OSD_GetObjID(pObj); switch(event) { case EVN_PRE_CHANGE: sel = *((UINT32*)param1); if(bID == TUNER_ID) { if(TUNER_CNT < 2) break; /* Check tuner : sel has selected satellite or not.*/ if(get_tuner_sat_cnt(sel) == 0) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg(NULL,NULL, RS_TUNER_HAS_NO_SATE_SEL); win_compopup_open_ext(&back_saved); antset_cur_tuner = (sel == 0)? 1: 0; win_atnsetf_load_sat_cnt(FALSE); ret = PROC_LOOP; } else { antset_cur_tuner = sel; cur_tuner_idx = antset_cur_tuner; } } break; case EVN_POST_CHANGE: sel = param1; if(bID == LNB_ID) { win_atnsetf_load_22k_action(TRUE); #ifdef SUPPORT_UNICABLE if(win_unicable_setting_open(LNB_IDX)) OSD_TrackObject((POBJECT_HEAD)&g_win_antenna_set_fixed, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); #endif } if(bID == TUNER_ID) { if(sys_data->tuner_lnb_type[sel] != LNB_FIXED) { /* Need to change : Motor antenna setting menu. */ other_antset_menu = (POBJECT_HEAD)&g_win_antenna_set_motor; if(OSD_ObjOpen(other_antset_menu, MENU_OPEN_TYPE_MENU + bID) != PROC_LEAVE) { win_signal_close(); menu_stack_pop(); menu_stack_push(other_antset_menu); } ret = PROC_LOOP; } else { win_atnsetf_load_sat_cnt(TRUE); win_atnsetf_load_sat_setting(0,TRUE); } } else if(bID == SAT_ID) win_atnsetf_load_sat_setting(sel,TRUE); else if(bID != TP_ID) { win_atnsetf_modify_sat_setting(SAT_IDX); } if(ret != PROC_LOOP) { api_stop_timer(&set_frontend); set_frontend = api_start_timer("SETANT",600,(OSAL_T_TIMER_FUNC_PTR)atnsetf_set_frontend_handler); } break; case EVN_REQUEST_STRING: sel = param1; Uni_str= (UINT16*)param2; if(bID == SAT_ID) { get_tuner_sat_name(antset_cur_tuner,sel,Uni_str); sys_data_set_cur_satidx(sel); } else if(bID == TP_ID) { get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); get_tp_name(s_node.sat_id,sel,Uni_str); #ifdef SUPPORT_SELECT_SAME_SAT s_node.reserve_1 = antset_cur_tuner; modify_sat(s_node.sat_id, &s_node); update_data(); #endif } else if(bID == LNB_ID) get_lnb_name(sel,Uni_str); else if(bID == DISEQC11_ID) get_diseqc11_name(sel,Uni_str); else if(bID == IF_CHANNEL_ID) get_IF_channel_name(sel,Uni_str); else if(bID == CENTRE_FREQ_ID) get_centre_freqs_name(sel,Uni_str); break; case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact == VACT_POP_UP) { OSD_SetRect2(&rect,&pObj->frame); /*Patch: For solve pop-up windows show bugs,for example: Universal(5150-10600) can not be all show*/ OSD_SetRect(&rect, rect.uLeft, rect.uTop, (rect.uWidth + 10), rect.uHeight); param.selecttype = POP_LIST_SINGLESELECT; switch(bID) { case SAT_ID: rect.uLeft -= 40; rect.uWidth += 40; list_type = POP_LIST_TYPE_SAT; rect.uHeight = 300; param.id = antset_cur_tuner; param.cur = SAT_IDX; break; case LNB_ID: list_type = POP_LIST_TYPE_LNB; rect.uHeight = 300; param.cur = LNB_IDX; break; case TP_ID: list_type = POP_LIST_TYPE_TP; rect.uHeight = 340; get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); param.id = s_node.sat_id; param.cur = TP_IDX; break; case DISEQC10_ID: list_type = POP_LIST_TYPE_DISEQC10; rect.uHeight = 280; param.cur = DISEQC10_IDX; break; case DISEQC11_ID: list_type = POP_LIST_TYPE_DISEQC11; rect.uHeight = 240; param.cur = DISEQC11_IDX; break; case IF_CHANNEL_ID: list_type = POP_LIST_TYPE_IF_CHANNEL; rect.uHeight = 200; param.cur = IF_CHANNEL_IDX; break; case CENTRE_FREQ_ID: list_type = POP_LIST_TYPE_CENTRE_FREQ; rect.uHeight = 200; param.cur = CENTRE_FREQ_IDX; break; default: list_type = 0xFF; break; } if(list_type == 0xFF) break; cur_idx = win_com_open_sub_list(list_type,&rect,¶m); if(cur_idx == LIST_INVALID_SEL_IDX || cur_idx == param.cur) break; item = anesetf_items[bID - 1]; msel = anesetf_msels[bID - 1]; switch(bID) { case SAT_ID: SAT_IDX = cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); win_atnsetf_load_sat_setting((UINT32)cur_idx, TRUE); break; case LNB_ID: LNB_IDX = cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); win_atnsetf_load_22k_action(TRUE); #ifdef SUPPORT_UNICABLE if(win_unicable_setting_open(LNB_IDX)) OSD_TrackObject((POBJECT_HEAD)&g_win_antenna_set_fixed, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); #endif break; /* case TP_ID: TP_IDX = cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case DISEQC10_ID: DISEQC10_IDX = cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case DISEQC11_ID: DISEQC11_IDX = cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case IF_CHANNEL_ID: IF_CHANNEL_IDX= cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; case CENTRE_FREQ_ID: CENTRE_FREQ_IDX= cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; */ default: msel->nSel = cur_idx; OSD_TrackObject(item, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); break; } if(bID != SAT_ID && bID != TP_ID) win_atnsetf_modify_sat_setting(SAT_IDX); api_stop_timer(&set_frontend); set_frontend = api_start_timer("SETANT",500,(OSAL_T_TIMER_FUNC_PTR)atnsetf_set_frontend_handler); } break; } return ret; }
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;
static void win_satsrch_set_search_param(void) { UINT32 search_mode; UINT32 prog_type; S_NODE s_node; struct as_service_param param; struct vdec_device *vdec; struct vdec_io_get_frm_para vfrm_param; UINT32 addr, len; UINT32 sat_index = 0 ; /*sky.bi 20101228*/ UINT32 default_satidx = 0; UINT32 temp_value = 0; // BOOL find_flag = false; //tv/radio/all if(SATSRCH_CHAN_IDX==1) prog_type = P_SEARCH_TV; else if(SATSRCH_CHAN_IDX==2) prog_type = P_SEARCH_RADIO; else// if(SATSRCH_CHAN_IDX==0) prog_type = P_SEARCH_TV|P_SEARCH_RADIO; /* FTA Only */ if (SATSRCH_FTA_IDX == 1) search_mode = P_SEARCH_FTA; else// if (sSATSRCH_FTA_IDX == 1) search_mode = P_SEARCH_FTA|P_SEARCH_SCRAMBLED; param.as_from = AS_FREQ_MIN; param.as_to = AS_FREQ_MAX; param.as_prog_attr = prog_type|search_mode; #ifndef NEW_DEMO_FRAME if(single_multi_srch_flag == 0) { get_tuner_sat(TUNER_EITHER,SATSRCH_SAT_IDX,&s_node); param.as_sat_id = s_node.sat_id; if (s_node.lnb_type == LNB_CTRL_22K) { param.as_from = 950; param.as_to = 2150; } } else { param.as_sat_ids = sat_ids; } #else param.as_frontend_type = FRONTEND_TYPE_S; if(single_multi_srch_flag == 0) { get_tuner_sat(TUNER_EITHER,SATSRCH_SAT_IDX, &s_node); param.sat_ids[0] = s_node.sat_id; param.as_sat_cnt = 1; } else { param.as_sat_cnt = get_tuner_sat_cnt(TUNER_EITHER_SELECT); /*设置选中的卫星为第一颗卫星 20101228 sky.bi */ default_satidx = sys_data_get_cur_satidx(); for (sat_index = 0; sat_index < param.as_sat_cnt;++sat_index) { if (default_satidx > param.as_sat_cnt) { break; } if (sat_ids[default_satidx] == sat_ids[sat_index] ) { temp_value = sat_ids[0]; sat_ids[0] = sat_ids[default_satidx]; sat_ids[default_satidx] = temp_value; break; } } MEMCPY(param.sat_ids, sat_ids, param.as_sat_cnt * sizeof(UINT16)); } #endif if(SATSRCH_MODE_IDX == 0) { if(single_multi_srch_flag == 0) param.as_method = AS_METHOD_FFT; else param.as_method = AS_METHOD_MULTI_FFT; } else { if(single_multi_srch_flag == 0) param.as_method = (SATSRCH_NIT_IDX==0)? AS_METHOD_SAT_TP : AS_METHOD_NIT; else param.as_method = (SATSRCH_NIT_IDX==0)? AS_METHOD_MULTI_TP : AS_METHOD_MULTI_NIT; } param.as_p_add_cfg = PROG_ADD_REPLACE_OLD; /*sky.bi 20101225*/ param.as_handler = NULL; // set param win_search_set_param(¶m); //update_data(); #if 0 vdec = (struct vdec_device *)dev_get_by_id(HLD_DEV_TYPE_DECV, 0); vfrm_param.ufrm_mode = VDEC_UN_DISPLAY; vdec_io_control(vdec, VDEC_IO_GET_FRM, (UINT32)&vfrm_param); addr = vfrm_param.tFrmInfo.uC_Addr; len = (vfrm_param.tFrmInfo.uHeight*vfrm_param.tFrmInfo.uWidth*3)/2; #else addr = __MM_AUTOSCAN_DB_BUFFER_ADDR; addr &= 0x8fffffff; len = __MM_AUTOSCAN_DB_BUFFER_LEN; #endif db_search_init((UINT8 *)addr, len); }
static void win_tplist_load_sat(BOOL updatesat) { UINT16 i,tp_num,focus_pos,max_top; OBJLIST* ol; CONTAINER* item; TEXT_FIELD* txt; SCROLL_BAR* sb; S_NODE s_node; T_NODE prog_tp_node; if(cur_tp_sat_idx >= get_tuner_sat_cnt(TUNER_EITHER) ) cur_tp_sat_idx= 0; get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); ol = &tplst_olist; txt = &tplst_sat; sb = &tplst_scb; recreate_tp_view(VIEW_SINGLE_SAT, s_node.sat_id); tp_num = get_tp_num_sat(s_node.sat_id); OSD_SetObjListCount(ol, tp_num); /* Set count */ focus_pos = tp_list_pos;//OSD_GetObjListCurPoint(ol); if (tp_num > OSD_GetObjListPage(ol)) max_top = tp_num - OSD_GetObjListPage(ol); else max_top = 0; if (focus_pos == 0xffff) { if(playing_pnode.sat_id == s_node.sat_id) { for(i = 0;i < tp_num;i++) { get_tp_at(playing_pnode.sat_id, i, &prog_tp_node); if(prog_tp_node.tp_id == playing_pnode.tp_id) { focus_pos = i; if (focus_pos > max_top) tp_list_top = max_top; else tp_list_top = focus_pos; break; } } } } if(focus_pos >= tp_num) { focus_pos = 0; tp_list_top = 0; } OSD_SetObjListCurPoint(ol, focus_pos); OSD_SetObjListNewPoint(ol, focus_pos); OSD_SetObjListTop(ol, tp_list_top); OSD_SetScrollBarMax(sb,tp_num); OSD_SetScrollBarPos(sb, focus_pos); win_tplist_set_sat_display(); if(updatesat) OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); }
static PRESULT motorset_itembtn_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; VACTION unact; UINT8 bID; UINT8 back_saved; win_popup_choice_t choice; UINT32 position,sat_pos; struct nim_device *nim_dev; S_NODE s_node; nim_dev = antset_cur_tuner==0? g_nim_dev : g_nim_dev2; bID = OSD_GetObjID(pObj); switch(event) { case EVN_UNKNOWN_ACTION: unact = (VACTION)(param1>>16); if(unact == VACT_MOVE_WEST || unact == VACT_MOVE_EAST) { if(bID != MOVESAVE_ID) break; if(diskmotor_move_state == 0 ) { if(unact == VACT_MOVE_WEST) { #ifdef FIRST_MOVE_BY_STEP api_diseqc_drive_motor_west_by_steps(nim_dev,1,0); diskmotor_move_step = 0; #else api_diseqc_drive_motor_west(nim_dev,0); #endif diskmotor_move_state = 1; } else //VACT_MOVE_EAST { #ifdef FIRST_MOVE_BY_STEP api_diseqc_drive_motor_east_by_steps(nim_dev,1,0); diskmotor_move_step = 0; #else api_diseqc_drive_motor_east(nim_dev,0); #endif diskmotor_move_state = 2; } api_stop_timer(&diskmove_timer_id); osal_task_sleep(100); DBG_PRINTF("Start move %d\n",diskmotor_move_state); diskmove_timer_id = api_start_timer(MOVE_TIERR_NAME, MOVE_TIERR_TIME,win_disk_move_handler); SET_MOVE_DISPLAY: win_motorset_draw_info(diskmotor_move_state); win_motorset_movebtn_setstr(1); win_motorset_movebtn_draw(1); } else { if( (diskmotor_move_state == 1 && unact == VACT_MOVE_WEST) || (diskmotor_move_state ==2 && unact == VACT_MOVE_EAST)) { /* Continue move West or East*/ DBG_PRINTF("Continue move %d\n",diskmotor_move_state); #ifdef FIRST_MOVE_BY_STEP api_stop_timer(&diskmove_timer_id); if(diskmotor_move_step == 0) { osal_task_sleep(100); if(diskmotor_move_state== 1) api_diseqc_drive_motor_west(nim_dev,0); else api_diseqc_drive_motor_east(nim_dev,0); diskmotor_move_step = 1; DBG_PRINTF("First time continue move\n"); } //else // DBG_PRINTF("Continue move %d\n",diskmotor_move_state); #endif osal_task_sleep(100); diskmove_timer_id = api_start_timer(MOVE_TIERR_NAME, MOVE_TIERR_TIME,win_disk_move_handler); } else goto STOP_MOVE; } } else if(unact == VACT_ENTER) { if(bID == MOVESAVE_ID) { if(diskmotor_move_state != 0) goto STOP_MOVE; else { /* Save current postion */ OSD_GetEditFieldIntValue(&motorset_edf3,&position); get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); if(position<=MAX_POSNUM) { sat_pos = antset_cur_tuner==0? s_node.position : s_node.tuner2_antena.position; if(sat_pos == position && position== 0) { win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("Position not specified (1~63)", NULL, 0); win_compopup_open_ext(&back_saved); break; } win_compopup_init(WIN_POPUP_TYPE_OKNO); if(position == 0) win_compopup_set_msg("Are you sure to clear this satellite's position?", NULL, 0); else win_compopup_set_msg("Are you sure to change this satellite's position?", NULL, 0); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { if(sat_pos != position) { recreate_sat_view(VIEW_ALL,0); if(antset_cur_tuner == 0) s_node.position = position; else s_node.tuner2_antena.position = position; modify_sat(s_node.sat_id, &s_node); update_data(); } if(position != 0) api_diseqc_store_satellite_position(nim_dev, (UINT8)position,0); } } else { } } } else if(bID == GOTONN_ID) { position = (UINT32)win_motorset_gotonn_sub_list(); if(position <= MAX_POSNUM) { if(position == 0) api_diseqc_goto_reference(nim_dev,0); else api_diseqc_goto_satellite_position(nim_dev,position,0); win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("Wait to move the position!", NULL, 0); win_compopup_set_btnstr(0, RS_DISEQC12_MOVEMENT_STOP); win_compopup_open_ext(&back_saved); api_diseqc_halt_motor(nim_dev,0); } } else if(bID == RECACULATE_ID) { get_tuner_sat(antset_cur_tuner,SAT_IDX,&s_node); if(s_node.position==0) { win_compopup_init(WIN_POPUP_TYPE_SMSG); win_compopup_set_msg("Position is NULL", NULL,0); win_compopup_open_ext(&back_saved); osal_task_sleep(500); win_compopup_smsg_restoreback(); } win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Are you sure re-calulate all satellite positions?", NULL, 0); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) api_diseqc_calculate_satellite_position(nim_dev,s_node.position,0,0, 0); } } break; case EVN_UNKNOWNKEY_GOT: //if(bID == MOVESAVE_ID) if(diskmotor_move_state) { STOP_MOVE: DBG_PRINTF("Stoped\n"); api_stop_timer(&diskmove_timer_id); osal_task_sleep(50); api_diseqc_halt_motor(nim_dev,0); diskmotor_move_state = 0; win_motorset_draw_info(diskmotor_move_state); win_motorset_movebtn_setstr(0); win_motorset_movebtn_draw(1); } break; } return ret; }
static void win_tplist_set_display(void) { char str[20]; UINT16 pol_strID; UINT16 top,cnt,page,index,curitem; UINT32 i,n; UINT32 valid_idx; S_NODE s_node; T_NODE t_node; OBJLIST* ol; CONTAINER* item; TEXT_FIELD* txt; ol = &tplst_olist; cnt = OSD_GetObjListCount(ol); page = OSD_GetObjListPage(ol); top = OSD_GetObjListTop(ol); curitem = OSD_GetObjListNewPoint(ol); get_tuner_sat(TUNER_EITHER, cur_tp_sat_idx, &s_node); for(i=0;i<page;i++) { item = (CONTAINER*)tplist_items[i]; index = top + i; if(index< cnt) valid_idx = 1; else valid_idx = 0; if(valid_idx) get_tp_at(s_node.sat_id,index,&t_node); /* TP IDX */ txt = (PTEXT_FIELD)OSD_GetContainerNextObj(item); if(valid_idx) sprintf(str,"%d",index + 1); else STRCPY(str,""); OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str); /* Freq*/ txt = (PTEXT_FIELD)OSD_GetObjpNext(txt); if(valid_idx) sprintf(str,"%5dMHz",t_node.frq); else STRCPY(str,""); OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str); /* Symb */ txt = (PTEXT_FIELD)OSD_GetObjpNext(txt); if(valid_idx) sprintf(str,"%5dKs/s",t_node.sym); else STRCPY(str,""); OSD_SetTextFieldContent(txt, STRING_ANSI, (UINT32)str); /* pol */ txt = (PTEXT_FIELD)OSD_GetObjpNext(txt); if(!valid_idx) pol_strID = 0; else if(t_node.pol == 0) pol_strID = RS_INFO_POLARITY_H; else pol_strID = RS_INFO_POLARITY_V; OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)pol_strID); } }
static void win_satsrch_set_drawselectsats(void) { // FIXED_PRINTF("win_satsrch_set_drawselectsats : sky.bi \n"); struct OSDRect rect; UINT16 i,sat_cnt,num; UINT16 col,row; TEXT_FIELD* txt = &satsrch_multisats_name; S_NODE s_node; UINT16 top; UINT16 str[50]; UINT16 nStrLen; if(single_multi_srch_flag == 0) return; MEMSET(sat_ids,0,sizeof(sat_ids)/sizeof(sat_ids[0])); sat_cnt = num = get_tuner_sat_cnt(TUNER_EITHER_SELECT);//get_selected_sat_num(); if(num > SELSAT_ROW_CNT *2) num = SELSAT_ROW_CNT *2; txt->pString = display_strs[0]; // FIXED_PRINTF("sat_cnt :%d\n",sat_cnt); for(i=0;i<sat_cnt;i++) { get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); sat_ids[i] = s_node.sat_id; } for(i=0;i<SELSAT_ROW_CNT*3;i++) /*2 for 3 20110117 sky.bi*/ { row = i/3; top = SELSAT_T + row * SELSAT_H+40; if(i%3 == 0) { OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SAT_NAME_STRING_LENGTH, SELSAT_H-6); // OSD_SetRect(&txt->head.frame, SELSAT_L0, top, SELSAT_W, SELSAT_H-6); } else { OSD_SetRect(&txt->head.frame, SELSAT_L0 + (SAT_NAME_STRING_LENGTH) * (i%3), top, SAT_NAME_STRING_LENGTH, SELSAT_H-6); // OSD_SetRect(&txt->head.frame, SELSAT_L1, top, SELSAT_W, SELSAT_H-6); } get_tuner_sat(TUNER_EITHER_SELECT,i,&s_node); if(i<sat_cnt) { if(s_node.DiSEqC_type !=6) { ComUniStrCopyChar((UINT8*)txt->pString, s_node.sat_name); } } else { ComAscStr2Uni("", txt->pString); } if ((sat_cnt > SELSAT_ROW_CNT*3) &&(i == 5) ) { ComAscStr2Uni("...", txt->pString); } OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } if(num == 0) { txt->pString = NULL; top = SELSAT_T + 2 * SELSAT_H+40; OSD_SetRect(&txt->head.frame, SELSAT_L0 + SELSAT_W/2, top, SELSAT_W, SELSAT_H-6); OSD_SetTextFieldContent(txt, STRING_ID , RS_DISPLAY_NO_SATELLITE/*RS_NO_SATELLITE_SELECT*/); OSD_DrawObject( (POBJECT_HEAD)txt, C_UPDATE_ALL); } }