Mercurial > public > hwos_code
comparison src/tft_outputs.asm @ 147:fdd4e30846ae
some cleanup
author | heinrichsweikamp |
---|---|
date | Wed, 06 Aug 2014 11:59:04 +0200 |
parents | e3ac5b2021bc |
children | 5cb177f0948a |
comparison
equal
deleted
inserted
replaced
146:d6ad414c7c12 | 147:fdd4e30846ae |
---|---|
1241 movff compass_DZ+0,lo | 1241 movff compass_DZ+0,lo |
1242 movff compass_DZ+1,hi | 1242 movff compass_DZ+1,hi |
1243 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | 1243 call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required |
1244 output_16 | 1244 output_16 |
1245 STRCAT_PRINT " " | 1245 STRCAT_PRINT " " |
1246 | |
1247 ; WIN_TINY .20,.86 | |
1248 ; STRCPY "DX:" | |
1249 ; movff compass_DX_f+0,lo | |
1250 ; movff compass_DX_f+1,hi | |
1251 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1252 ; output_16 | |
1253 ; STRCAT ", DY:" | |
1254 ; movff compass_DY_f+0,lo | |
1255 ; movff compass_DY_f+1,hi | |
1256 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1257 ; output_16 | |
1258 ; STRCAT ", DZ:" | |
1259 ; movff compass_DZ_f+0,lo | |
1260 ; movff compass_DZ_f+1,hi | |
1261 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1262 ; output_16 | |
1263 ; STRCAT_PRINT " " | |
1264 | |
1265 return | 1246 return |
1266 | 1247 |
1267 global TFT_show_timeout_testmode | 1248 global TFT_show_timeout_testmode |
1268 TFT_show_timeout_testmode: ; With timeout in WREG... | 1249 TFT_show_timeout_testmode: ; With timeout in WREG... |
1269 movwf hi | 1250 movwf hi |
1291 bsf leftbind | 1272 bsf leftbind |
1292 output_8 | 1273 output_8 |
1293 bcf leftbind | 1274 bcf leftbind |
1294 STRCAT_PRINT "!" | 1275 STRCAT_PRINT "!" |
1295 return | 1276 return |
1296 | |
1297 ; global TFT_update_raw_data | |
1298 ;TFT_update_raw_data: | |
1299 ; call TFT_standard_color | |
1300 ; WIN_TINY .0,.0 | |
1301 ; STRCPY "pres:" | |
1302 ; SAFE_2BYTE_COPY amb_pressure, lo | |
1303 ; movlw .5 ;>1280mbar | |
1304 ; cpfslt hi | |
1305 ; call TFT_warnings_color | |
1306 ; bsf leftbind | |
1307 ; output_16 | |
1308 ; STRCAT_PRINT "mbar " | |
1309 ; WIN_TINY .80,.0 | |
1310 ; STRCPY "temp:" | |
1311 ; SAFE_2BYTE_COPY temperature, lo | |
1312 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1313 ; movlw d'3' | |
1314 ; movwf ignore_digits | |
1315 ; output_16dp d'2' ; temperature | |
1316 ; STRCAT_PRINT "°C " | |
1317 ; | |
1318 ; call TFT_standard_color | |
1319 ; call get_battery_voltage ; get battery voltage | |
1320 ; WIN_TINY .0,.18 | |
1321 ; STRCPY "AN06:" | |
1322 ; movff ADRESL,lo | |
1323 ; movff ADRESH,hi | |
1324 ; output_16 | |
1325 ; STRCAT_PRINT "" | |
1326 ; WIN_TINY .80,.18 | |
1327 ; STRCPY "BATT:" | |
1328 ; movff batt_voltage+0,lo | |
1329 ; movff batt_voltage+1,hi | |
1330 ; output_16 | |
1331 ; STRCAT_PRINT "mV " | |
1332 ; | |
1333 ; call get_ambient_level ; get ambient light level | |
1334 ; WIN_TINY .0,.36 | |
1335 ; STRCPY "AN07:" | |
1336 ; movff ADRESL,lo | |
1337 ; movff ADRESH,hi | |
1338 ; output_16 | |
1339 ; STRCAT_PRINT " " | |
1340 ; WIN_TINY .80,.36 | |
1341 ; STRCPY "Amb.:" | |
1342 ; movff ambient_light+0,lo | |
1343 ; movff ambient_light+1,hi | |
1344 ; output_16 | |
1345 ; STRCAT_PRINT " " | |
1346 ; | |
1347 ;; call get_rssi_level ; get rssi level | |
1348 ;; WIN_TINY .0,.54 | |
1349 ;; STRCPY "AN17:" | |
1350 ;; movff ADRESL,lo | |
1351 ;; movff ADRESH,hi | |
1352 ;; output_16 | |
1353 ;; STRCAT_PRINT " " | |
1354 ;; WIN_TINY .80,.54 | |
1355 ;; STRCPY "RSSI:" | |
1356 ;; movff rssi_value,lo | |
1357 ;; output_8 | |
1358 ;; STRCAT_PRINT " " | |
1359 ; | |
1360 ; WIN_TINY .0,.72 | |
1361 ; STRCPY "HUD_Status:" | |
1362 ; movff hud_status_byte,lo | |
1363 ; output_8 | |
1364 ; STRCAT_PRINT " " | |
1365 ; WIN_TINY .80,.72 | |
1366 ; STRCPY "HUD_BATT:" | |
1367 ; movff hud_battery_mv+0,lo | |
1368 ; movff hud_battery_mv+1,hi | |
1369 ; output_16 | |
1370 ; STRCAT_PRINT "mV " | |
1371 ; | |
1372 ;; call disable_ir | |
1373 ;; bsf mcp_power | |
1374 ;; btfss mcp_power | |
1375 ;; bra $-4 | |
1376 ;; call get_analog_inputs | |
1377 ; WIN_TINY .0,.90 | |
1378 ; STRCPY "Sens1.:" | |
1379 ; movff o2_mv_sensor1+0,lo | |
1380 ; movff o2_mv_sensor1+1,hi | |
1381 ; output_16dp d'4' | |
1382 ; STRCAT_PRINT "mV " | |
1383 ; WIN_TINY .80,.90 | |
1384 ; STRCPY "Sens2:" | |
1385 ; movff o2_mv_sensor2+0,lo | |
1386 ; movff o2_mv_sensor2+1,hi | |
1387 ; output_16dp d'4' | |
1388 ; STRCAT_PRINT "mV " | |
1389 ; | |
1390 ; WIN_TINY .0,.108 | |
1391 ; STRCPY "Sens3.:" | |
1392 ; movff o2_mv_sensor3+0,lo | |
1393 ; movff o2_mv_sensor3+1,hi | |
1394 ; output_16dp d'4' | |
1395 ; STRCAT_PRINT "mV " | |
1396 ; WIN_TINY .80,.108 ; Space | |
1397 ; | |
1398 ; WIN_TINY .0,.128 | |
1399 ; STRCPY "ccDX:" | |
1400 ; movff compass_DX_f+0,lo ; Display calibrated data | |
1401 ; movff compass_CX_f+0,WREG ; by substracting compass_CX_f | |
1402 ; subwf lo,F ; lo := lo - W | |
1403 ; movff compass_DX_f+1,hi | |
1404 ; movff compass_CX_f+1,WREG | |
1405 ; subwfb hi,F | |
1406 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1407 ; output_16 | |
1408 ; STRCAT_PRINT " " | |
1409 ; WIN_TINY .80,.128 | |
1410 ; STRCPY "ccDY:" | |
1411 ; movff compass_DY_f+0,lo | |
1412 ; movff compass_CY_f+0,WREG | |
1413 ; subwf lo,F | |
1414 ; movff compass_DY_f+1,hi | |
1415 ; movff compass_CY_f+1,WREG | |
1416 ; subwfb hi,F | |
1417 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1418 ; output_16 | |
1419 ; STRCAT_PRINT " " | |
1420 ; WIN_TINY .0,.146 | |
1421 ; STRCPY "ccDZ:" | |
1422 ; movff compass_DZ_f+0,lo | |
1423 ; movff compass_CZ_f+0,WREG | |
1424 ; subwf lo,F | |
1425 ; movff compass_DZ_f+1,hi | |
1426 ; movff compass_CZ_f+1,WREG | |
1427 ; subwfb hi,F | |
1428 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1429 ; output_16 | |
1430 ; STRCAT_PRINT " " | |
1431 ; WIN_TINY .80,.146 ; Space | |
1432 ; | |
1433 ; WIN_TINY .0,.164 | |
1434 ; STRCPY "AcDX:" | |
1435 ; movff accel_DX_f+0,lo | |
1436 ; movff accel_DX_f+1,hi | |
1437 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1438 ; output_16 | |
1439 ; STRCAT_PRINT "mg " | |
1440 ; WIN_TINY .80,.164 | |
1441 ; STRCPY "AcDY:" | |
1442 ; movff accel_DY_f+0,lo | |
1443 ; movff accel_DY_f+1,hi | |
1444 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1445 ; output_16 | |
1446 ; STRCAT_PRINT "mg " | |
1447 ; WIN_TINY .0,.182 | |
1448 ; STRCPY "AcDZ:" | |
1449 ; movff accel_DZ_f+0,lo | |
1450 ; movff accel_DZ_f+1,hi | |
1451 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1452 ; output_16 | |
1453 ; STRCAT_PRINT "mg " | |
1454 ; | |
1455 ; WIN_TINY .80,.182 | |
1456 ; STRCPY "Head:" | |
1457 ; movff compass_heading+0,lo | |
1458 ; movff compass_heading+1,hi | |
1459 ; | |
1460 ; btfsc hi,7 ; Uncalibrated compass ? | |
1461 ; bra TFT_update_compass_1 | |
1462 ; | |
1463 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1464 ; output_16 | |
1465 ; STRCAT_PRINT " " | |
1466 ; bra TFT_update_compass_2 | |
1467 ; | |
1468 ;TFT_update_compass_1: | |
1469 ; STRCAT_PRINT "---" | |
1470 ; | |
1471 ;TFT_update_compass_2: | |
1472 ; WIN_TINY .0,.200 | |
1473 ; STRCPY "calX:" | |
1474 ; movff compass_CX_f+0,lo | |
1475 ; movff compass_CX_f+1,hi | |
1476 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1477 ; output_16 | |
1478 ; STRCAT ", " | |
1479 ; movff compass_CY_f+0,lo | |
1480 ; movff compass_CY_f+1,hi | |
1481 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1482 ; output_16 | |
1483 ; STRCAT ", " | |
1484 ; movff compass_CZ_f+0,lo | |
1485 ; movff compass_CZ_f+1,hi | |
1486 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1487 ; output_16 | |
1488 ; STRCAT_PRINT " " | |
1489 ; | |
1490 ; WIN_TINY .0,.218 | |
1491 ; STRCPY "Roll:" | |
1492 ; movff compass_roll+0,lo | |
1493 ; movff compass_roll+1,hi | |
1494 ; call TFT_convert_signed_16bit | |
1495 ; output_16 | |
1496 ; STRCAT_PRINT " " | |
1497 ; | |
1498 ; WIN_TINY .80, .218 | |
1499 ; STRCPY "Pitch:" | |
1500 ; movff compass_pitch+0,lo | |
1501 ; movff compass_pitch+1,hi | |
1502 ; call TFT_convert_signed_16bit | |
1503 ; output_16 | |
1504 ; STRCAT_PRINT " " | |
1505 ; | |
1506 ; ; call TFT_serial | |
1507 ; bcf leftbind | |
1508 ; return | |
1509 ; | |
1510 ; global TFT_update_raw_data2 | |
1511 ;TFT_update_raw_data2: | |
1512 ; call TFT_standard_color | |
1513 ; WIN_TINY .0,.0 | |
1514 ; STRCPY "pres:" | |
1515 ; SAFE_2BYTE_COPY amb_pressure, lo | |
1516 ; movlw .5 ;>1280mbar | |
1517 ; cpfslt hi | |
1518 ; call TFT_warnings_color | |
1519 ; bsf leftbind | |
1520 ; output_16 | |
1521 ; STRCAT_PRINT "mbar " | |
1522 ; WIN_TINY .80,.0 | |
1523 ; STRCPY "temp:" | |
1524 ; SAFE_2BYTE_COPY temperature, lo | |
1525 ; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1526 ; movlw d'3' | |
1527 ; movwf ignore_digits | |
1528 ; output_16dp d'2' ; temperature | |
1529 ; STRCAT_PRINT "°C " | |
1530 ; | |
1531 ; call TFT_standard_color | |
1532 ; WIN_TINY .0,.18 | |
1533 ; STRCPY "D1:" | |
1534 ; movff D1+0,lo | |
1535 ; movff D1+1,hi | |
1536 ; output_16 | |
1537 ; STRCAT_PRINT "" | |
1538 ; WIN_TINY .80,.18 | |
1539 ; STRCPY "D2:" | |
1540 ; movff D2+0,lo | |
1541 ; movff D2+1,hi | |
1542 ; output_16 | |
1543 ; STRCAT_PRINT "" | |
1544 ; | |
1545 ; ; C1-C6 | |
1546 ; WIN_TINY .0,.36 | |
1547 ; STRCPY "C1:" | |
1548 ; movff C1+0,lo | |
1549 ; movff C1+1,hi | |
1550 ; output_16 | |
1551 ; STRCAT_PRINT "" | |
1552 ; WIN_TINY .80,.36 | |
1553 ; STRCPY "C2:" | |
1554 ; movff C2+0,lo | |
1555 ; movff C2+1,hi | |
1556 ; output_16 | |
1557 ; STRCAT_PRINT "" | |
1558 ; | |
1559 ; WIN_TINY .0,.54 | |
1560 ; STRCPY "C3:" | |
1561 ; movff C3+0,lo | |
1562 ; movff C3+1,hi | |
1563 ; output_16 | |
1564 ; STRCAT_PRINT "" | |
1565 ; WIN_TINY .80,.54 | |
1566 ; STRCPY "C4:" | |
1567 ; movff C4+0,lo | |
1568 ; movff C4+1,hi | |
1569 ; output_16 | |
1570 ; STRCAT_PRINT "" | |
1571 ; | |
1572 ; WIN_TINY .0,.72 | |
1573 ; STRCPY "C5:" | |
1574 ; movff C5+0,lo | |
1575 ; movff C5+1,hi | |
1576 ; output_16 | |
1577 ; STRCAT_PRINT "" | |
1578 ; WIN_TINY .80,.72 | |
1579 ; STRCPY "C6:" | |
1580 ; movff C6+0,lo | |
1581 ; movff C6+1,hi | |
1582 ; output_16 | |
1583 ; STRCAT_PRINT "" | |
1584 ; | |
1585 ;; WIN_TINY .0,.90 | |
1586 ;; STRCPY "Sens1.:" | |
1587 ;; movff o2_mv_sensor1+0,lo | |
1588 ;; movff o2_mv_sensor1+1,hi | |
1589 ;; output_16dp d'4' | |
1590 ;; STRCAT_PRINT "mV " | |
1591 ;; WIN_TINY .80,.90 | |
1592 ;; STRCPY "Sens2:" | |
1593 ;; movff o2_mv_sensor2+0,lo | |
1594 ;; movff o2_mv_sensor2+1,hi | |
1595 ;; output_16dp d'4' | |
1596 ;; STRCAT_PRINT "mV " | |
1597 ;; | |
1598 ;; WIN_TINY .0,.108 | |
1599 ;; STRCPY "Sens3.:" | |
1600 ;; movff o2_mv_sensor3+0,lo | |
1601 ;; movff o2_mv_sensor3+1,hi | |
1602 ;; output_16dp d'4' | |
1603 ;; STRCAT_PRINT "mV " | |
1604 ;; WIN_TINY .80,.108 ; Space | |
1605 ;; | |
1606 ;; WIN_TINY .0,.128 | |
1607 ;; STRCPY "ccDX:" | |
1608 ;; movff compass_DX_f+0,lo ; Display calibrated data | |
1609 ;; movff compass_CX_f+0,WREG ; by substracting compass_CX_f | |
1610 ;; subwf lo,F ; lo := lo - W | |
1611 ;; movff compass_DX_f+1,hi | |
1612 ;; movff compass_CX_f+1,WREG | |
1613 ;; subwfb hi,F | |
1614 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1615 ;; output_16 | |
1616 ;; STRCAT_PRINT " " | |
1617 ;; WIN_TINY .80,.128 | |
1618 ;; STRCPY "ccDY:" | |
1619 ;; movff compass_DY_f+0,lo | |
1620 ;; movff compass_CY_f+0,WREG | |
1621 ;; subwf lo,F | |
1622 ;; movff compass_DY_f+1,hi | |
1623 ;; movff compass_CY_f+1,WREG | |
1624 ;; subwfb hi,F | |
1625 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1626 ;; output_16 | |
1627 ;; STRCAT_PRINT " " | |
1628 ;; WIN_TINY .0,.146 | |
1629 ;; STRCPY "ccDZ:" | |
1630 ;; movff compass_DZ_f+0,lo | |
1631 ;; movff compass_CZ_f+0,WREG | |
1632 ;; subwf lo,F | |
1633 ;; movff compass_DZ_f+1,hi | |
1634 ;; movff compass_CZ_f+1,WREG | |
1635 ;; subwfb hi,F | |
1636 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1637 ;; output_16 | |
1638 ;; STRCAT_PRINT " " | |
1639 ;; WIN_TINY .80,.146 ; Space | |
1640 ;; | |
1641 ;; WIN_TINY .0,.164 | |
1642 ;; STRCPY "AcDX:" | |
1643 ;; movff accel_DX_f+0,lo | |
1644 ;; movff accel_DX_f+1,hi | |
1645 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1646 ;; output_16 | |
1647 ;; STRCAT_PRINT "mg " | |
1648 ;; WIN_TINY .80,.164 | |
1649 ;; STRCPY "AcDY:" | |
1650 ;; movff accel_DY_f+0,lo | |
1651 ;; movff accel_DY_f+1,hi | |
1652 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1653 ;; output_16 | |
1654 ;; STRCAT_PRINT "mg " | |
1655 ;; WIN_TINY .0,.182 | |
1656 ;; STRCPY "AcDZ:" | |
1657 ;; movff accel_DZ_f+0,lo | |
1658 ;; movff accel_DZ_f+1,hi | |
1659 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1660 ;; output_16 | |
1661 ;; STRCAT_PRINT "mg " | |
1662 ;; | |
1663 ;; WIN_TINY .80,.182 | |
1664 ;; STRCPY "Head:" | |
1665 ;; movff compass_heading+0,lo | |
1666 ;; movff compass_heading+1,hi | |
1667 ;; | |
1668 ;; WIN_TINY .0,.200 | |
1669 ;; STRCPY "calX:" | |
1670 ;; movff compass_CX_f+0,lo | |
1671 ;; movff compass_CX_f+1,hi | |
1672 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1673 ;; output_16 | |
1674 ;; STRCAT ", " | |
1675 ;; movff compass_CY_f+0,lo | |
1676 ;; movff compass_CY_f+1,hi | |
1677 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1678 ;; output_16 | |
1679 ;; STRCAT ", " | |
1680 ;; movff compass_CZ_f+0,lo | |
1681 ;; movff compass_CZ_f+1,hi | |
1682 ;; call TFT_convert_signed_16bit ; converts lo:hi into signed-short and adds '-' to POSTINC2 if required | |
1683 ;; output_16 | |
1684 ;; STRCAT_PRINT " " | |
1685 ;; | |
1686 ;; WIN_TINY .0,.218 | |
1687 ;; STRCPY "Roll:" | |
1688 ;; movff compass_roll+0,lo | |
1689 ;; movff compass_roll+1,hi | |
1690 ;; call TFT_convert_signed_16bit | |
1691 ;; output_16 | |
1692 ;; STRCAT_PRINT " " | |
1693 ;; | |
1694 ;; WIN_TINY .80, .218 | |
1695 ;; STRCPY "Pitch:" | |
1696 ;; movff compass_pitch+0,lo | |
1697 ;; movff compass_pitch+1,hi | |
1698 ;; call TFT_convert_signed_16bit | |
1699 ;; output_16 | |
1700 ;; STRCAT_PRINT " " | |
1701 ; | |
1702 ; call TFT_serial | |
1703 ; bcf leftbind | |
1704 ; return | |
1705 ; | |
1706 | 1277 |
1707 global TFT_surface_decosettings ; Show all deco settings | 1278 global TFT_surface_decosettings ; Show all deco settings |
1708 TFT_surface_decosettings: | 1279 TFT_surface_decosettings: |
1709 ; Deco Mode | 1280 ; Deco Mode |
1710 call TFT_standard_color | 1281 call TFT_standard_color |