~ubuntu-branches/ubuntu/saucy/argyll/saucy

« back to all changes in this revision

Viewing changes to spectro/ss_imp.c

  • Committer: Package Import Robot
  • Author(s): Christian Marillat
  • Date: 2012-04-25 07:46:07 UTC
  • mfrom: (1.2.2) (13.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20120425074607-yjqadetw8kum9skc
Tags: 1.4.0-4
Should Build-Depends on libusb-dev (Closes: #670329).

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
#include "copyright.h"
47
47
#include "aconfig.h"
48
48
#include "numlib.h"
49
 
#endif /* !SALONEINSTLIB */
 
49
#else /* SALONEINSTLIB */
 
50
#include "sa_config.h"
 
51
#include "numsup.h"
 
52
#endif /* SALONEINSTLIB */
50
53
#include "xspect.h"
51
54
#include "insttypes.h"
52
55
#include "icoms.h"
335
338
        if (chrspace(p, 2 * len))
336
339
                return;
337
340
        for (i = 0; i < len; i++) {
338
 
                t[i] = (h2b(p, p->rbuf[2 * i + 0]) << 4)
339
 
                     | (h2b(p, p->rbuf[2 * i + 1]) << 0);
 
341
                t[i] = (char)((h2b(p, p->rbuf[2 * i + 0]) << 4)
 
342
                            | (h2b(p, p->rbuf[2 * i + 1]) << 0));
340
343
        }
341
344
        t[i] = '\000';
342
345
        p->rbuf += 2 * len;
998
1001
        ss_add_soreq(p, ss_ExecRefMeasurement);
999
1002
        ss_add_1(p, 0x09);
1000
1003
        ss_add_1(p, mm);
1001
 
        ss_command(p, DF_TMO);
 
1004
        ss_command(p, 2.0 * DF_TMO);
1002
1005
        ss_sub_soans(p, ss_ExecError);
1003
1006
        ss_incorp_err(p, ss_sub_1(p));
1004
1007
        chended(p);
1040
1043
        }
1041
1044
#endif
1042
1045
        ss_add_soreq(p, ss_ExecMeasurement);
1043
 
        ss_command(p, DF_TMO);
 
1046
        ss_command(p, 2.0 * DF_TMO);
1044
1047
        ss_sub_soans(p, ss_ExecError);
1045
1048
        ss_incorp_err(p, ss_sub_1(p));
1046
1049
        chended(p);
1489
1492
#endif
1490
1493
        ss_add_ssreq(p, ss_SetTableMode);
1491
1494
        ss_add_1(p, tm);
1492
 
        ss_command(p, DF_TMO);
 
1495
        ss_command(p, IT_TMO);
1493
1496
        ss_sub_ssans(p, ss_ErrorAnswer);
1494
1497
        ss_incorp_scanerr(p, ss_sub_1(p));
1495
1498
        chended(p);
1504
1507
inst_code ss_do_SetDeviceOnline(ss *p) {
1505
1508
#ifdef EMSST
1506
1509
        if (p->tmode != 0)
1507
 
                return inst_unsupported;
 
1510
                *((char *)0) = 55;
 
1511
//      return inst_unsupported;
1508
1512
#endif
1509
1513
        ss_add_ssreq(p, ss_SetDeviceOnline);
1510
1514
        ss_command(p, DF_TMO);
1520
1524
inst_code ss_do_SetDeviceOffline(ss *p) {
1521
1525
#ifdef EMSST
1522
1526
        if (p->tmode != 0)
1523
 
                return inst_unsupported;
 
1527
                *((char *)0) = 55;
1524
1528
#endif
1525
1529
        ss_add_ssreq(p, ss_SetDeviceOffline);
1526
1530
        ss_command(p, DF_TMO);
1565
1569
) {
1566
1570
#ifdef EMSST
1567
1571
        if (p->tmode != 0)
1568
 
                return inst_unsupported;
 
1572
                *((char *)0) = 55;
1569
1573
#endif
1570
1574
        ss_add_ssreq(p, ss_MoveAbsolut);
1571
1575
        ss_add_1(p, r);
1587
1591
) {
1588
1592
#ifdef EMSST
1589
1593
        if (p->tmode != 0)
1590
 
                return inst_unsupported;
 
1594
                *((char *)0) = 55;
1591
1595
#endif
1592
1596
        ss_add_ssreq(p, ss_MoveRelative);
1593
1597
        ss_add_2(p, (int)(x * 10 + 0.5));
1606
1610
) {
1607
1611
#ifdef EMSST
1608
1612
        if (p->tmode != 0)
1609
 
                return inst_unsupported;
 
1613
                *((char *)0) = 55;
1610
1614
#endif
1611
1615
        ss_add_ssreq(p, ss_MoveHome);
1612
1616
        ss_command(p, MV_TMO);
1623
1627
) {
1624
1628
#ifdef EMSST
1625
1629
        if (p->tmode != 0)
1626
 
                return inst_unsupported;
 
1630
                *((char *)0) = 55;
1627
1631
#endif
1628
1632
        ss_add_ssreq(p, ss_MoveUp);
1629
1633
        ss_command(p, MV_TMO);
1640
1644
) {
1641
1645
#ifdef EMSST
1642
1646
        if (p->tmode != 0)
1643
 
                return inst_unsupported;
 
1647
                *((char *)0) = 55;
1644
1648
#endif
1645
1649
        ss_add_ssreq(p, ss_MoveDown);
1646
1650
        ss_command(p, MV_TMO);
1662
1666
) {
1663
1667
#ifdef EMSST
1664
1668
        if (p->tmode != 0)
1665
 
                return inst_unsupported;
 
1669
                *((char *)0) = 55;
1666
1670
#endif
1667
1671
        ss_add_ssreq(p, ss_OutputActualPosition);
1668
1672
        ss_add_1(p, r);
1686
1690
) {
1687
1691
#ifdef EMSST
1688
1692
        if (p->tmode != 0)
1689
 
                return inst_unsupported;
 
1693
                *((char *)0) = 55;
1690
1694
#endif
1691
1695
        ss_add_ssreq(p, ss_MoveToWhiteRefPos);
1692
1696
        ss_add_1(p, wrp);
1755
1759
        if (p->tmode != 0)
1756
1760
                return inst_ok;
1757
1761
        else
1758
 
                return inst_unsupported;
 
1762
                *((char *)0) = 55;
1759
1763
#endif
1760
1764
        ss_add_ssreq(p, ss_SetLightLevel);
1761
1765
        ss_add_1(p, ll);
1781
1785
                p->sby = y;
1782
1786
                return inst_ok;
1783
1787
        } else {
1784
 
                return inst_unsupported;
 
1788
                *((char *)0) = 55;
1785
1789
        }
1786
1790
#endif
1787
1791
        ss_add_ssreq(p, ss_SetTransmStandbyPos);