📄 menuprocess_dopt.lst
字号:
1134 1 return PREVIEW_MENU;
1135 1 }
1136
1137 BYTE menu_e1_loop_left( void )
1138 {
1139 1 if( gSystemInfo.e1_number > 1 )
1140 1 gSystemInfo.e1_number --;
1141 1
1142 1 return NOCHANGE_MENU;
1143 1 }
1144
1145 BYTE menu_e1_loop_rigth( void )
1146 {
1147 1 if( gSystemInfo.e1_number < gSystemInfo.max_system_e1 )
1148 1 gSystemInfo.e1_number ++;
1149 1 return NOCHANGE_MENU;
1150 1 }
1151
1152 BYTE menu_4_e1_loop( BYTE FlashLcd )
1153 {
1154 1 SYSTEM_DEVICE_STATUS xdata *psdev = &gsystemStauts;
1155 1 SYSTEM_INFOMATION xdata *psys = &gSystemInfo;
1156 1 BYTE xdata buffer[2][LCD_MAX_CASE];
1157 1 BYTE status;
1158 1
1159 1 KeyPro.keyEnter = menu_e1_loop_yes_no;
1160 1 KeyPro.keyLeft = menu_yes_no_left;
1161 1 KeyPro.keyRight = menu_yes_no_rigth;
1162 1 KeyPro.keyCanncel = menu_1_preview;
1163 1
1164 1 memcpy( &buffer[0][0], rownull, LCD_LAST_CASE );
1165 1 memcpy( &buffer[1][0], rownull, LCD_LAST_CASE );
1166 1
1167 1 status = (psdev->remote.e1_status[psys->e1_number-1]&(~E1_NOLOOP))>>2;
1168 1 switch( status )
1169 1 {
C51 COMPILER V7.20 MENUPROCESS_DOPT 02/20/2006 10:14:03 PAGE 20
1170 2 case IDB_E1_LOOP:
1171 2 memcpy( &buffer[0][0], " E1- loop DIS ", LCD_MAX_CASE);
1172 2 break;
1173 2
1174 2 case IDB_E1_NOLOOP:
1175 2 memcpy( &buffer[0][0], " E1- loop EN ", LCD_MAX_CASE);
1176 2 break;
1177 2 }
1178 1 buffer[0][4] = NUMBER_CHAR_ADDRESS + psys->e1_number;
1179 1 LcdDisplay_length( ROW_1, CHAR_0, &buffer[0][0], LCD_LAST_CASE );
1180 1
1181 1 yes_no_display( FlashLcd, psys );
1182 1
1183 1 return key_process_status( &KeyPro );
1184 1 }
1185
1186
1187
1188 BYTE menu_3_e1_loop( BYTE FlashLcd )
1189 {
1190 1 SYSTEM_DEVICE_STATUS xdata *psdev = &gsystemStauts;
1191 1 SYSTEM_INFOMATION xdata *psys = &gSystemInfo;
1192 1 BYTE xdata buffer[2][LCD_MAX_CASE], lbuffer[5];
1193 1 BYTE xdata e1counter;
1194 1 BYTE xdata flash_status = flash_time( );
1195 1 BYTE *pe1, status;
1196 1
1197 1 KeyPro.keyEnter = key_go_next;
1198 1 KeyPro.keyLeft = menu_e1_loop_left;
1199 1 KeyPro.keyRight = menu_e1_loop_rigth;
1200 1 KeyPro.keyCanncel = menu_1_preview;
1201 1
1202 1 memcpy( &buffer[0][0], rownull, LCD_LAST_CASE );
1203 1 memcpy( &buffer[1][0], rownull, LCD_MAX_CASE );
1204 1
1205 1 if( FlashLcd == FLASH_SCREEN )
1206 1 {
1207 2 LcdDisplay_length( ROW_2, CHAR_0, rownull, LCD_MAX_CASE );
1208 2 }
1209 1
1210 1 if( psys->set_value == 0 )
1211 1 {
1212 2 pe1 = psdev->remote.e1_status;
1213 2 memcpy( &buffer[0][0], " L:E1 loop O-O) ", LCD_LAST_CASE );
1214 2 if( (check_remote_status() == ALARM) )
1215 2 KeyPro.keyEnter = key_do_nothing;
1216 2 else
1217 2 KeyPro.keyEnter = key_go_next;
1218 2 KeyPro.keyLeft = menu_e1_loop_left;
1219 2 KeyPro.keyRight = menu_e1_loop_rigth;
1220 2 }
1221 1 else
1222 1 {
1223 2 pe1 = psdev->local.e1_status;
1224 2 memcpy( &buffer[0][0], " R:E1 loop (O-O ", LCD_LAST_CASE );
1225 2 KeyPro.keyEnter = key_do_nothing;
1226 2 KeyPro.keyLeft = key_do_nothing;
1227 2 KeyPro.keyRight = key_do_nothing;
1228 2 }
1229 1 KeyPro.keyCanncel = menu_1_preview;
1230 1 LcdDisplay_length( ROW_1, CHAR_0, &buffer[0][0], LCD_LAST_CASE );
1231 1
C51 COMPILER V7.20 MENUPROCESS_DOPT 02/20/2006 10:14:03 PAGE 21
1232 1 if( (check_remote_status() == ALARM) && (psys->set_value == 1) )
1233 1 {
1234 2 memcpy( &buffer[1][0], rownull, LCD_MAX_CASE );
1235 2 flash_char_status( &buffer[1][4], "unknown", flash_status, 7 );
1236 2 LcdDisplay_length( ROW_2, CHAR_0, &buffer[1][0], LCD_LAST_CASE );
1237 2 }
1238 1 else
1239 1 {
1240 2 for( e1counter=0; e1counter<psys->max_system_e1; e1counter++ )
1241 2 {
1242 3 status = (pe1[e1counter]&(~E1_NOLOOP))>>2;
1243 3 switch( status )
1244 3 {
1245 4 case IDB_E1_LOOP:
1246 4 lbuffer[0] = NUMBER_CHAR_ADDRESS + e1counter+1;
1247 4 if( (check_remote_status() == ALARM) )
1248 4 flash_status = SHOW_CHAR_STATUS;
1249 4 flash_char_status( &buffer[1][e1counter*2], lbuffer, flash_status, 1 );
1250 4 break;
1251 4
1252 4 case IDB_E1_NOLOOP:
1253 4 lbuffer[0] = NUMBER_CHAR_ADDRESS + e1counter+1;
1254 4 flash_char_status( &buffer[1][e1counter*2], lbuffer, SHOW_CHAR_STATUS, 1 );
1255 4 break;
1256 4 }
1257 3 LcdDisplay_length( ROW_2, e1counter*2, &buffer[1][e1counter*2], 1 );
1258 3 if( (psys->e1_number-1) != e1counter )
1259 3 LcdDisplay_length( ROW_2, e1counter*2+1, rownull, 1 );
1260 3 }
1261 2 }
1262 1 if( psys->set_value == 0 )
1263 1 diaplay_char( ROW_2, psys->e1_number*2-1, LCD_PRINT_TRIANGLE );
1264 1 return key_process_status( &KeyPro );
1265 1 }
1266
1267 void get_loop_status( BYTE *pbuffer, SYSTEM_INFOMATION *psys )
1268 {
1269 1 SYSTEM_DEVICE_STATUS xdata *psdev = &gsystemStauts;
1270 1 BYTE xdata flash_status, last_status;
1271 1 BYTE xdata endcouter, e1counter;
1272 1 BYTE xdata loop[2] = {IDB_E1_NOLOOP, IDB_E1_NOLOOP};
1273 1 BYTE xdata list_char = 6;
1274 1 BYTE xdata status;
1275 1
1276 1 flash_status = flash_time( );
1277 1
1278 1 for( endcouter=LACAL_EQU; endcouter<=REMOTE_EQU; endcouter++ )
1279 1 {
1280 2 for( e1counter=0; e1counter<psys->max_system_e1; e1counter++ )
1281 2 {
1282 3 if( endcouter == LACAL_EQU )
1283 3 status = (psdev->local.e1_status[e1counter-1]&(~E1_NOLOOP))>>2;
1284 3 else
1285 3 status = (psdev->remote.e1_status[e1counter-1]&(~E1_NOLOOP))>>2;
1286 3 switch( status )
1287 3 {
1288 4 case IDB_E1_LOOP:
1289 4 loop[endcouter-1] = IDB_E1_LOOP;
1290 4 continue;
1291 4 break;
1292 4
1293 4 case IDB_E1_NOLOOP:
C51 COMPILER V7.20 MENUPROCESS_DOPT 02/20/2006 10:14:03 PAGE 22
1294 4 break;
1295 4 }
1296 3 }
1297 2 }
1298 1
1299 1 if( loop[1] == IDB_E1_LOOP )
1300 1 last_status = flash_status;
1301 1 else
1302 1 last_status = SHOW_CHAR_STATUS;
1303 1 flash_char_status( &pbuffer[1], "Local", last_status, 5 );
1304 1 LcdDisplay_length( ROW_2, CHAR_0, pbuffer, 6 );
1305 1
1306 1 if( loop[0] == IDB_E1_LOOP )
1307 1 last_status = flash_status;
1308 1 else
1309 1 last_status = SHOW_CHAR_STATUS;
1310 1 flash_char_status( &pbuffer[8], "Remote", last_status, 6 );
1311 1 LcdDisplay_length( ROW_2, CHAR_8, &pbuffer[8], 6 );
1312 1
1313 1 if( psys->set_value == 1 )
1314 1 list_char = 14;
1315 1 diaplay_char( ROW_2, list_char, LCD_PRINT_TRIANGLE );
1316 1 if( list_char == 6 )
1317 1 LcdDisplay_length( ROW_2, CHAR_14, rownull, 1 );
1318 1 else
1319 1 LcdDisplay_length( ROW_2, CHAR_6, rownull, 1 );
1320 1 }
1321
1322 BYTE menu_2_loop_set( BYTE FlashLcd )
1323 {
1324 1 SYSTEM_INFOMATION xdata *psys = &gSystemInfo;
1325 1 BYTE xdata buffer[2][LCD_MAX_CASE];
1326 1
1327 1 KeyPro.keyEnter = key_go_next;
1328 1 KeyPro.keyLeft = menu_set_left;
1329 1 KeyPro.keyRight = menu_set_rigth;
1330 1 KeyPro.keyCanncel = menu_1_preview;
1331 1 memcpy( &buffer[0][0], rownull, LCD_MAX_CASE );
1332 1 memcpy( &buffer[1][0], rownull, LCD_MAX_CASE );
1333 1
1334 1 if( FlashLcd == FLASH_SCREEN )
1335 1 {
1336 2 psys->set_value = 0;
1337 2 LcdDisplay_length( ROW_2, CHAR_0, &buffer[1][0], LCD_MAX_CASE );
1338 2 }
1339 1 psys->e1_number = 1;
1340 1
1341 1
1342 1 memcpy( &buffer[0][0], " E1 loop set ", LCD_LAST_CASE );
1343 1 LcdDisplay_length( ROW_1, CHAR_0, &buffer[0][0], LCD_LAST_CASE );
1344 1
1345 1 get_loop_status( &buffer[1][0], psys );
1346 1
1347 1 return key_process_status( &KeyPro );
1348 1 }
1349
1350
1351 BYTE menu_sys_show( BYTE *pbuffer , BYTE FlashLcd )
1352 {
1353 1 KeyPro.keyEnter = key_go_next;
1354 1 KeyPro.keyLeft = menu_1_left;
1355 1 KeyPro.keyRight = menu_1_right;
C51 COMPILER V7.20 MENUPROCESS_DOPT 02/20/2006 10:14:03 PAGE 23
1356 1 KeyPro.keyCanncel = menu_1_preview;
1357 1
1358 1 if( FlashLcd == FLASH_SCREEN )
1359 1 {
1360 2 LcdDisplay_length( ROW_1, CHAR_0, " System set ", LCD_LAST_CASE );
1361 2 LcdDisplay_length( ROW_2, CHAR_0, rownull, LCD_LAST_CASE );
1362 2 }
1363 1 else
1364 1 {
1365 2 LcdDisplay_length( ROW_2, CHAR_0, pbuffer, LCD_LAST_CASE );
1366 2 }
1367 1
1368 1 return key_process_status( &KeyPro );
1369 1 }
1370
1371 void ConstrastSet( BYTE value )
1372 {
1373 1 static BYTE xdata static_contrast_value = 50;
1374 1
1375 1 if( static_contrast_value >= value )
1376 1 wiperDown( CONTRAST_VALUE*(static_contrast_value - value) );
1377 1 else
1378 1 wiperUp( CONTRAST_VALUE*(value - static_contrast_value) );
1379 1 static_contrast_value = value;
1380 1 }
1381
1382 BYTE menu_contrast_set_rigth( void )
1383 {
1384 1 SYSTEM_INFOMATION xdata *psys = &gSystemInfo;
1385 1
1386 1 if( psys->preview_contrast_value > 0 )
1387 1 {
1388 2 psys->preview_contrast_value --;
1389 2 SetSystemConstrast( psys->preview_contrast_value );
1390 2 }
1391 1 return NOCHANGE_MENU;
1392 1 }
1393
1394 BYTE menu_contrast_set_left( void )
1395 {
1396 1 SYSTEM_INFOMATION xdata *psys = &gSystemInfo;
1397 1
1398 1 if( psys->preview_contrast_value < LCD_LAST_CASE )
1399 1 {
1400 2 psys->preview_contrast_value ++;
1401 2 SetSystemConstrast( psys->preview_contrast_value );
1402 2 }
1403 1 return NOCHANGE_MENU;
1404 1 }
1405
1406 BYTE menu_contrast_set_entry( void )
1407 {
1408 1 SYSTEM_INFOMATION xdata *psys = &gSystemInfo;
1409 1
1410 1 noStorReturn();
1411 1
1412 1 gSystemInfo.contrast_value = psys->preview_contrast_value;
1413 1
1414 1 SetSystemConstrast( psys->preview_contrast_value );
1415 1 save_constrast_set( psys->preview_contrast_value );
1416 1
1417 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -