Changeset 25 in svn
- Timestamp:
- Mar 25, 2015 5:05:03 PM (11 years ago)
- Location:
- trunk/zasc/app_c
- Files:
-
- 4 edited
-
DST_HostInterface.c (modified) (2 diffs)
-
DST_WinEngineerMenu.c (modified) (2 diffs)
-
DST_WinFrequencySetting.c (modified) (5 diffs)
-
DST_WinMTSHot.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/zasc/app_c/DST_HostInterface.c
r17 r25 324 324 return 0; 325 325 } 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 335 327 // ³ë¶û 5 ³ì»ö 1 336 328 if (KeyCodes[1] == VK_YELLOW && KeyCodes[2] == VK_YELLOW && KeyCodes[3] == VK_YELLOW && … … 413 405 { 414 406 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 418 411 } 419 412 return KeyCode; -
trunk/zasc/app_c/DST_WinEngineerMenu.c
r11 r25 256 256 sprintf(strText[8], "2. swich on/off WeakSignal Mute : [%s]", DST_g_WeakSignalMuteOff?(char*)"OFF":(char*)"ON"); 257 257 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)); 260 259 261 260 this->DrawText(this, 2, 362, this->rect.w, 20, (char*)"[0..9] Select ", &(this->font)); … … 279 278 this->Show(this); 280 279 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 283 283 case VK_4: 284 284 case VK_5: -
trunk/zasc/app_c/DST_WinFrequencySetting.c
r19 r25 96 96 this->DrawImage(this, 0, 0, newcon2_gui_banner_4line_back, false); 97 97 98 int nLineHeight = (this->rect.h) / 6; 98 char strText[256]; 99 100 int nLineHeight = (this->rect.h) / 7; 99 101 // title 100 102 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)); 102 120 // 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 111 138 int num = DST_EEPROM_GetMinRF(); 112 char strText[256]; 113 if (num > 0) 114 { 139 115 140 int rf = DST_GetFrequencyNumberbyIndex(num); 116 141 int freq = DST_GetMHzFrequencybyIndex(num); 117 142 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)); 124 145 // 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 133 163 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)); 145 171 // descriptor 146 172 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)); 148 174 } 149 175 … … 157 183 return; 158 184 } 185 else if (DST_EEPROM_GetMinRF() > DST_EEPROM_GetMaxRF()) 186 { 187 DST_EEPROM_SetMaxRF(DST_EEPROM_GetMinRF()); 188 return; 189 } 159 190 DST_EEPROM_SetMaxRF(DST_EEPROM_GetMaxRF() + 1); 160 191 } 161 192 void DecreaseMinRF() 162 193 { 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()); 166 202 return; 167 203 } … … 170 206 void IncreaseMinRF() 171 207 { 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 177 219 DST_EEPROM_SetMinRF(DST_EEPROM_GetMinRF() + 1); 178 220 } 179 221 void DecreaseMaxRF() 180 222 { 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 186 234 DST_EEPROM_SetMaxRF(DST_EEPROM_GetMaxRF() - 1); 187 235 } … … 189 237 { 190 238 int i = 0; 239 int isOn = DST_EEPROM_GetFrequencySetting(); 191 240 switch(key) 192 241 { 193 242 case VK_UP: 194 if (nPos == 0)243 switch(nPos) 195 244 { 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; 197 262 } 198 else 199 { 200 for (i=0; i < 10; i++) IncreaseMaxRF(); 201 } 263 202 264 this->Show(this); 203 265 break; 204 266 205 267 case VK_DN: 206 if (nPos == 0)268 switch(nPos) 207 269 { 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; 209 287 } 210 else 211 { 212 for (i=0; i < 10; i++) DecreaseMaxRF(); 213 } 288 214 289 this->Show(this); 215 290 break; … … 217 292 case VK_VOL_UP: 218 293 case VK_CH_UP: 294 if(isOn == 1) nPos = (nPos+1)>2?0:(nPos+1); 295 this->Show(this); 296 break; 219 297 case VK_VOL_DN: 220 298 case VK_CH_DN: 221 nPos = nPos ? 0 : 1;299 if(isOn == 1) nPos = (nPos-1)<0?2:(nPos-1); 222 300 this->Show(this); 223 301 break; 224 302 225 303 case VK_LEFT: 226 if (nPos == 0)304 switch(nPos) 227 305 { 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; 229 317 } 230 else 231 { 232 DecreaseMaxRF(); 233 } 318 234 319 this->Show(this); 235 320 break; 236 321 237 322 case VK_RIGHT: 238 if (nPos == 0)323 switch(nPos) 239 324 { 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; 241 336 } 242 else 243 { 244 IncreaseMaxRF(); 245 } 337 246 338 this->Show(this); 247 339 break; -
trunk/zasc/app_c/DST_WinMTSHot.c
r17 r25 325 325 this->DrawTextUni(this, 0, 0, this->rect.w, this->rect.h, CDisplayModeWin_GetString(CDisplayModeWin_nDMPos), &(this->font)); 326 326 327 this->RegisterKey(this, VK_ ZOOM, true, 0, 0);327 this->RegisterKey(this, VK_DISPLAY_MODE, true, 0, 0); 328 328 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; 329 344 } 330 345 … … 334 349 switch (key) 335 350 { 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 } 338 358 this->Show(this); 339 359 break;
Note: See TracChangeset
for help on using the changeset viewer.
