Changes between Version 5 and Version 6 of epics/bbb/debian/thermometer/ft260


Ignore:
Timestamp:
09/06/17 11:56:59 (8 years ago)
Author:
Tetsuya Michikawa
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TabularUnified epics/bbb/debian/thermometer/ft260

    v5 v6  
    298298
    299299のダイアログボックスで{{{Program}}}すれば自動的にシリアル番号が生成されてEEPROMに書き込まれる。[[br]]
     300'''ここでの注意点は、プログラムのデフォルトのままだとvendoridが0403から0803に書き変わってしまうので、書き込み前にチェックすること。'''[[br]]
    300301書き込み実行後に再度デバイス情報を見てみると、今度は{{{ATTRS{serial}==}}}が設定されている。[[br]]
    301302
     
    339340}}}
    340341
     342デバイスを再接続後、pythonでアクセスしてみる。
     343
     344{{{
     345root@beaglebone:~# ipython --nosep
     346
     347In [1]: import hid
     348In [2]: h = hid.device()
     349In [3]: h.open(0x0403, 0x6030, "FT27KQDF")
     350---------------------------------------------------------------------------
     351TypeError                                 Traceback (most recent call last)
     352<ipython-input-3-1e0fc914f0ab> in <module>()
     353----> 1 h.open(0x0403, 0x6030, "FT27KQDF")
     354
     355TypeError: Argument 'serial_number' has incorrect type (expected unicode, got str)
     356
     357In [4]: h.open(0x0403, 0x6030, u"FT27KQDF")
     358}}}
     359
     360シリアル番号をunicodeで設定したら、オープンできたので、大丈夫そう。[[br]]