Changeset 25 in svn


Ignore:
Timestamp:
Mar 25, 2015 5:05:03 PM (11 years ago)
Author:
jglee
Message:
 
Location:
trunk/zasc/app_c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/zasc/app_c/DST_HostInterface.c

    r17 r25  
    324324                return 0; 
    325325        } 
    326         // »óÇÏ Á¿ì ÁÂÁ 
    327         if (KeyCodes[1] == VK_UP    && KeyCodes[2] == VK_DN   && KeyCodes[3] == VK_LEFT &&  
    328                         KeyCodes[4] == VK_RIGHT && KeyCodes[5] == VK_LEFT && KeyCodes[6] == VK_LEFT) 
    329         { 
    330                 DST_ResetKeyCode(); 
    331                 DST_Printf("Enter Engineer Menu\n"); 
    332                 DST_CreateWin(WIN_ENGINEER_MODE, WIN_NULL, 0,0,0,0); // ¿£Áö´Ï¾î ¸ðµå ÁøÀÔ 
    333                 return 0; 
    334         } 
     326         
    335327        // ³ë¶û 5 ³ì»ö 1 
    336328        if (KeyCodes[1] == VK_YELLOW    && KeyCodes[2] == VK_YELLOW   && KeyCodes[3] == VK_YELLOW &&  
     
    413405        { 
    414406                DST_ResetKeyCode(); 
    415                 DST_Printf("Enter Frequncy Setting\n"); 
    416                 DST_CreateWin(WIN_FREQUENCY_SETTING, WIN_NULL, 0,0,0,0); // ¿£Áö´Ï¾î ¸ðµå ÁøÀÔ 
    417                 return 0; 
     407                DST_Printf("Enter Engineer Menu\n"); 
     408                DST_CreateWin(WIN_ENGINEER_MODE, WIN_NULL, 0,0,0,0); // ¿£Áö´Ï¾î ¸ðµå ÁøÀÔ 
     409                return 0; 
     410 
    418411        } 
    419412        return  KeyCode; 
  • trunk/zasc/app_c/DST_WinEngineerMenu.c

    r11 r25  
    256256                sprintf(strText[8], "2. swich on/off WeakSignal Mute :  [%s]", DST_g_WeakSignalMuteOff?(char*)"OFF":(char*)"ON"); 
    257257                this->DrawText(this, 2, 262, this->rect.w, 20, strText[8], &(this->font));       
    258                 sprintf(strText[9], "3. swich Only-Terrestrial-Broadcasting Searching Mode :  [%s]", DST_g_isAirOnly?(char*)"ON":(char*)"OFF"); 
    259                 this->DrawText(this, 2, 282, this->rect.w, 20, strText[9], &(this->font));       
     258                this->DrawText(this, 2, 282, this->rect.w, 20, (char*)"3. set Frequency Range", &(this->font));  
    260259 
    261260                this->DrawText(this, 2, 362, this->rect.w, 20, (char*)"[0..9] Select ", &(this->font));  
     
    279278                                this->Show(this); 
    280279                        case VK_3: 
    281                                 DST_g_isAirOnly = !DST_g_isAirOnly; 
    282                                 this->Show(this); 
     280                                DST_CreateWin(WIN_FREQUENCY_SETTING, WIN_NULL, 0,0,0,0); 
     281                                this->Close(this); 
     282 
    283283                        case VK_4: 
    284284                        case VK_5: 
  • trunk/zasc/app_c/DST_WinFrequencySetting.c

    r19 r25  
    9696                this->DrawImage(this, 0, 0, newcon2_gui_banner_4line_back, false); 
    9797         
    98                 int nLineHeight = (this->rect.h) / 6; 
     98                char strText[256]; 
     99                 
     100                int nLineHeight = (this->rect.h) / 7; 
    99101                // title 
    100102                this->setFontStyle(this, 18, 0xFFC8C8C8, ALIGN_MIDDLE, ALIGN_CENTER); 
    101                 this->DrawText(this, 0, 0, this->rect.w, nLineHeight*2, (char*)"Frequency Setting", &(this->font)); 
     103                this->DrawText(this, 0, 0, this->rect.w, nLineHeight*2, (char*)"Frequency Range Setting", &(this->font)); 
     104                int isOn = DST_EEPROM_GetFrequencySetting(); 
     105                sprintf(strText, "< %s >", isOn == 1?(char*)"ON":(char*)"OFF"); 
     106                switch(nPos) 
     107                { 
     108                        case 0: 
     109                                this->setFontStyle(this, 17, 0xFFFFFFFF, ALIGN_MIDDLE, ALIGN_CENTER); 
     110                                break; 
     111                        case 1: 
     112                                this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
     113                                break; 
     114                        case 2: 
     115                                this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
     116                                break; 
     117                        default:break; 
     118                } 
     119                this->DrawText(this, 0, nLineHeight * 2, this->rect.w, nLineHeight, (char*)strText, &(this->font)); 
    102120                // display max 
    103                 if (nPos == 0) 
    104                 { 
    105                         this->setFontStyle(this, 17, 0xFFFFFFFF, ALIGN_MIDDLE, ALIGN_CENTER); 
    106                 } 
    107                 else 
    108                 { 
    109                         this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
    110                 } 
     121                switch(nPos) 
     122                { 
     123                        case 0: 
     124                                this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
     125                                if(isOn == 0) this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
     126                                break; 
     127                        case 1: 
     128                                this->setFontStyle(this, 17, 0xFFFFFFFF, ALIGN_MIDDLE, ALIGN_CENTER); 
     129                                if(isOn == 0) this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
     130                                break; 
     131                        case 2: 
     132                                this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
     133                                if(isOn == 0) this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
     134                                break; 
     135                        default:break; 
     136                } 
     137 
    111138                int num = DST_EEPROM_GetMinRF(); 
    112                 char strText[256]; 
    113                 if (num > 0) 
    114                 { 
     139                 
    115140                        int rf = DST_GetFrequencyNumberbyIndex(num); 
    116141                        int freq = DST_GetMHzFrequencybyIndex(num); 
    117142                        sprintf(strText, "< Min : %d ( %dMHz ) >", rf, freq); 
    118                 } 
    119                 else 
    120                 { 
    121                         sprintf(strText, "< Min : OFF >"); 
    122                 } 
    123                 this->DrawText(this, 0, nLineHeight * 2, this->rect.w, nLineHeight, (char*)strText, &(this->font)); 
     143 
     144                this->DrawText(this, 0, nLineHeight * 3, this->rect.w, nLineHeight, (char*)strText, &(this->font)); 
    124145                // display min 
    125                 if (nPos == 0) 
    126                 { 
    127                         this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
    128                 } 
    129                 else 
    130                 { 
    131                         this->setFontStyle(this, 17, 0xFFFFFFFF, ALIGN_MIDDLE, ALIGN_CENTER); 
    132                 } 
     146                switch(nPos) 
     147                { 
     148                        case 0: 
     149                                this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
     150                                if(isOn == 0) this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
     151                                break; 
     152                        case 1: 
     153                                this->setFontStyle(this, 15, 0xFFAAAAAA, ALIGN_MIDDLE, ALIGN_CENTER); 
     154                                if(isOn == 0) this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
     155                                break; 
     156                        case 2: 
     157                                this->setFontStyle(this, 17, 0xFFFFFFFF, ALIGN_MIDDLE, ALIGN_CENTER); 
     158                                if(isOn == 0) this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
     159                                break; 
     160                        default:break; 
     161                } 
     162 
    133163                num = DST_EEPROM_GetMaxRF(); 
    134                 if (num > 0) 
    135                 { 
    136                         int rf = DST_GetFrequencyNumberbyIndex(num); 
    137                         int freq = DST_GetMHzFrequencybyIndex(num); 
    138                         sprintf(strText, "< Max : %d ( %dMHz ) >", rf, freq); 
    139                 } 
    140                 else 
    141                 { 
    142                         sprintf(strText, "< Max : OFF >"); 
    143                 } 
    144                 this->DrawText(this, 0, nLineHeight * 3, this->rect.w, nLineHeight, (char*)strText, &(this->font)); 
     164 
     165                rf = DST_GetFrequencyNumberbyIndex(num); 
     166                freq = DST_GetMHzFrequencybyIndex(num); 
     167                sprintf(strText, "< Max : %d ( %dMHz ) >", rf, freq); 
     168 
     169 
     170                this->DrawText(this, 0, nLineHeight * 4, this->rect.w, nLineHeight, (char*)strText, &(this->font)); 
    145171                // descriptor 
    146172                this->setFontStyle(this, 15, 0xFF666666, ALIGN_MIDDLE, ALIGN_CENTER); 
    147                 this->DrawText(this, 0, nLineHeight * 5, this->rect.w, nLineHeight, (char*)"Channel/Volume : Next", &(this->font)); 
     173                this->DrawText(this, 0, nLineHeight * 6, this->rect.w, nLineHeight, (char*)"Channel/Volume : Next", &(this->font)); 
    148174        } 
    149175 
     
    157183                        return; 
    158184                } 
     185                else if (DST_EEPROM_GetMinRF() > DST_EEPROM_GetMaxRF()) 
     186                { 
     187                        DST_EEPROM_SetMaxRF(DST_EEPROM_GetMinRF()); 
     188                        return; 
     189                } 
    159190                DST_EEPROM_SetMaxRF(DST_EEPROM_GetMaxRF() + 1); 
    160191        } 
    161192        void DecreaseMinRF() 
    162193        { 
    163                 if (DST_EEPROM_GetMinRF() < DST_MinRF())  
    164                 { 
    165                         DST_EEPROM_SetMinRF(-1); 
     194                if (DST_EEPROM_GetMinRF() <= DST_MinRF())  
     195                { 
     196                        DST_EEPROM_SetMinRF(DST_MinRF()); 
     197                        return; 
     198                } 
     199                else if (DST_EEPROM_GetMinRF() > DST_EEPROM_GetMaxRF()) 
     200                { 
     201                        DST_EEPROM_SetMinRF(DST_EEPROM_GetMaxRF()); 
    166202                        return; 
    167203                } 
     
    170206        void IncreaseMinRF() 
    171207        { 
    172                 if (DST_EEPROM_GetMinRF() >= DST_MinRF())  
    173                 { 
    174                         DST_EEPROM_SetMinRF(DST_MinRF()); 
    175                         return; 
    176                 } 
     208                if (DST_EEPROM_GetMinRF() >= DST_MaxRF())  
     209                { 
     210                        DST_EEPROM_SetMinRF(DST_MaxRF()); 
     211                        return; 
     212                } 
     213                else if (DST_EEPROM_GetMinRF() >= DST_EEPROM_GetMaxRF()) 
     214                { 
     215                        DST_EEPROM_SetMinRF(DST_EEPROM_GetMaxRF()); 
     216                        return; 
     217                } 
     218 
    177219                DST_EEPROM_SetMinRF(DST_EEPROM_GetMinRF() + 1); 
    178220        } 
    179221        void DecreaseMaxRF() 
    180222        { 
    181                 if (DST_EEPROM_GetMaxRF() < DST_MaxRF())  
    182                 { 
    183                         DST_EEPROM_SetMaxRF(-1); 
    184                         return; 
    185                 } 
     223                if (DST_EEPROM_GetMaxRF() <= DST_MinRF())  
     224                { 
     225                        DST_EEPROM_SetMaxRF(DST_MinRF()); 
     226                        return; 
     227                } 
     228                else if (DST_EEPROM_GetMinRF() >= DST_EEPROM_GetMaxRF()) 
     229                { 
     230                        DST_EEPROM_SetMaxRF(DST_EEPROM_GetMinRF()); 
     231                        return; 
     232                } 
     233 
    186234                DST_EEPROM_SetMaxRF(DST_EEPROM_GetMaxRF() - 1); 
    187235        } 
     
    189237        { 
    190238                int i = 0; 
     239                int isOn = DST_EEPROM_GetFrequencySetting(); 
    191240                switch(key) 
    192241                { 
    193242                        case VK_UP: 
    194                                 if (nPos == 0) 
     243                                switch(nPos) 
    195244                                { 
    196                                         for (i=0; i < 10; i++) IncreaseMinRF(); 
     245                                        case 0: 
     246                                                isOn = isOn ? 0 : 1; 
     247                                                DST_EEPROM_SetFrequncySetting(isOn); 
     248                                                break; 
     249                                        case 1: 
     250                                                if(isOn == 1) 
     251                                                { 
     252                                                        for (i=0; i < 10; i++) IncreaseMinRF(); 
     253                                                } 
     254                                                break; 
     255                                        case 2: 
     256                                                if(isOn == 1) 
     257                                                { 
     258                                                        for (i=0; i < 10; i++) IncreaseMaxRF(); 
     259                                                } 
     260                                                break; 
     261                                                default:break; 
    197262                                } 
    198                                 else 
    199                                 { 
    200                                         for (i=0; i < 10; i++) IncreaseMaxRF(); 
    201                                 } 
     263 
    202264                                this->Show(this); 
    203265                                break; 
    204266                                 
    205267                        case VK_DN: 
    206                                 if (nPos == 0) 
     268                                switch(nPos) 
    207269                                { 
    208                                         for (i=0; i < 10; i++) DecreaseMinRF(); 
     270                                        case 0: 
     271                                                isOn = isOn ? 0 : 1; 
     272                                                DST_EEPROM_SetFrequncySetting(isOn); 
     273                                                break; 
     274                                        case 1: 
     275                                                if(isOn == 1) 
     276                                                { 
     277                                                        for (i=0; i < 10; i++) DecreaseMinRF(); 
     278                                                } 
     279                                                break; 
     280                                        case 2: 
     281                                                if(isOn == 1) 
     282                                                { 
     283                                                        for (i=0; i < 10; i++) DecreaseMaxRF(); 
     284                                                } 
     285                                                break; 
     286                                                default:break; 
    209287                                } 
    210                                 else 
    211                                 { 
    212                                         for (i=0; i < 10; i++) DecreaseMaxRF(); 
    213                                 } 
     288 
    214289                                this->Show(this); 
    215290                                break; 
     
    217292                        case VK_VOL_UP: 
    218293                        case VK_CH_UP: 
     294                                if(isOn == 1) nPos = (nPos+1)>2?0:(nPos+1); 
     295                                this->Show(this);        
     296                                break; 
    219297                        case VK_VOL_DN: 
    220298                        case VK_CH_DN: 
    221                                 nPos = nPos ? 0 : 1; 
     299                                if(isOn == 1) nPos = (nPos-1)<0?2:(nPos-1); 
    222300                                this->Show(this);                        
    223301                                break; 
    224302                                 
    225303                        case VK_LEFT: 
    226                                 if (nPos == 0) 
     304                                switch(nPos) 
    227305                                { 
    228                                         DecreaseMinRF(); 
     306                                        case 0: 
     307                                                isOn = isOn ? 0 : 1; 
     308                                                DST_EEPROM_SetFrequncySetting(isOn); 
     309                                                break; 
     310                                        case 1: 
     311                                                if(isOn == 1) DecreaseMinRF(); 
     312                                                break; 
     313                                        case 2: 
     314                                                if(isOn == 1) DecreaseMaxRF(); 
     315                                                break; 
     316                                                default:break; 
    229317                                } 
    230                                 else 
    231                                 { 
    232                                         DecreaseMaxRF(); 
    233                                 } 
     318 
    234319                                this->Show(this); 
    235320                                break; 
    236321                         
    237322                        case VK_RIGHT: 
    238                                 if (nPos == 0) 
     323                                switch(nPos) 
    239324                                { 
    240                                         IncreaseMinRF(); 
     325                                        case 0: 
     326                                                isOn = isOn ? 0 : 1; 
     327                                                DST_EEPROM_SetFrequncySetting(isOn); 
     328                                                break; 
     329                                        case 1: 
     330                                                if(isOn == 1) IncreaseMinRF(); 
     331                                                break; 
     332                                        case 2: 
     333                                                if(isOn == 1) IncreaseMaxRF(); 
     334                                                break; 
     335                                                default:break; 
    241336                                } 
    242                                 else 
    243                                 { 
    244                                         IncreaseMaxRF(); 
    245                                 } 
     337 
    246338                                this->Show(this); 
    247339                                break; 
  • trunk/zasc/app_c/DST_WinMTSHot.c

    r17 r25  
    325325                this->DrawTextUni(this, 0, 0, this->rect.w, this->rect.h, CDisplayModeWin_GetString(CDisplayModeWin_nDMPos), &(this->font)); 
    326326                 
    327                 this->RegisterKey(this, VK_ZOOM, true, 0, 0); 
     327                this->RegisterKey(this, VK_DISPLAY_MODE, true, 0, 0); 
    328328                this->RegisterKey(this, VK_CANCEL, true, 0, 0); 
     329        } 
     330 
     331        bool CDisplayModeWin_getTR_AspectRatio() 
     332        { 
     333                DS_U16 w = 0, h = 0, fps = 0; 
     334                bool bWide = false, bInterlace = false; 
     335                DST_GetVideoSize(&w, &h, &fps, &bInterlace, &bWide); 
     336                 
     337                return (!bWide); 
     338        } 
     339 
     340        DS_U8 CDisplayModeWin_getAspectRatioIndex() 
     341        { 
     342                if(CDisplayModeWin_getTR_AspectRatio()) return 1; 
     343                else return 3; 
    329344        } 
    330345 
     
    334349                switch (key) 
    335350                { 
    336                         case VK_ZOOM: 
    337                                 DST_UI_SetAspect(DST_UI_GetAspect() < 2 ? DST_UI_GetAspect()+1 : 0); 
     351                        case VK_DISPLAY_MODE: 
     352                                if(CDisplayModeWin_getAspectRatioIndex() != 1) 
     353                                { 
     354                                        int value = DST_UI_GetAspect()+1; 
     355                                        if(value>=CDisplayModeWin_getAspectRatioIndex()) value = 0; 
     356                                        DST_UI_SetAspect(value); 
     357                                } 
    338358                                this->Show(this); 
    339359                                break; 
Note: See TracChangeset for help on using the changeset viewer.