ストロベリー・リナックスUSB温度計USBRHを使った温度計 by Qt
Revision | 9e971ec08553fed308e37a8ad0fc8c2e564e8e7f (tree) |
---|---|
Zeit | 2013-03-19 00:22:01 |
Autor | alucky4416 <alucky4416@user...> |
Commiter | alucky4416 |
BUG: usbrh.h #define const move to usbrh.cpp
@@ -16,6 +16,20 @@ | ||
16 | 16 | //#include <string.h> |
17 | 17 | #include "usbrh.h" |
18 | 18 | |
19 | +#define USBRH_VENDOR 0x1774 | |
20 | +#define USBRH_PRODUCT 0x1001 | |
21 | + | |
22 | +// parameter | |
23 | +// http://www.sensirion.com/en/pdf/product_information/Data_Sheet_humidity_sensor_SHT1x_SHT7x_E.pdf | |
24 | +// http://www.syscom-inc.co.jp/pdf/sht_datasheet_j.pdf | |
25 | +#define d1 -40.00 | |
26 | +#define d2 0.01 | |
27 | +#define c1 -4 | |
28 | +#define c2 0.0405 | |
29 | +#define c3 -0.0000028 | |
30 | +#define t1 0.01 | |
31 | +#define t2 0.00008 | |
32 | + | |
19 | 33 | // --------------------------------------------------------------------------------------- |
20 | 34 | |
21 | 35 | double usbrh::convert_temp(int in) |
@@ -8,20 +8,6 @@ | ||
8 | 8 | #include <usb.h> |
9 | 9 | #endif |
10 | 10 | |
11 | -#define USBRH_VENDOR 0x1774 | |
12 | -#define USBRH_PRODUCT 0x1001 | |
13 | - | |
14 | -// parameter | |
15 | -// http://www.sensirion.com/en/pdf/product_information/Data_Sheet_humidity_sensor_SHT1x_SHT7x_E.pdf | |
16 | -// http://www.syscom-inc.co.jp/pdf/sht_datasheet_j.pdf | |
17 | -#define d1 -40.00 | |
18 | -#define d2 0.01 | |
19 | -#define c1 -4 | |
20 | -#define c2 0.0405 | |
21 | -#define c3 -0.0000028 | |
22 | -#define t1 0.01 | |
23 | -#define t2 0.00008 | |
24 | - | |
25 | 11 | class usbrh |
26 | 12 | { |
27 | 13 |