libphidget-cvs-commits Mailing List for Phidget Library (Page 3)
Status: Alpha
Brought to you by:
jstrohm
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(66) |
Oct
|
Nov
|
Dec
(73) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(9) |
Jul
(5) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
|
From: Jack S. <js...@us...> - 2002-12-16 21:26:33
|
Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv24177/libphidget
Added Files:
SoftPhidget.h
Log Message:
Sorry, forgot to add this file
--- NEW FILE: SoftPhidget.h ---
int SOFT_SERVO8_SIZE=7510;
const unsigned char SOFT_SERVO8_CODE[7510] = {0x53,
0x1d,0x6e,0x2,0x0,0xe,0x2,0x10,0xcb,0x0,0x0,0x0,0x0,0x0,0x2,0x11,0x8d,0x75,0x81,0x7a,0x78,0x7a,0x76,0x0,0xd8,0xfc,
0x90,0x0,0x0,0xae,0x83,0xaf,0x82,0x90,0x0,0x0,0x12,0x0,0x4c,0x60,0x5,0xe4,0xf0,0xa3,0x80,0xf6,0x90,0x0,0xaa,0x12,0x0,
0x55,0x90,0x0,0xae,0x12,0x0,0x55,0x90,0x0,0xb2,0x12,0x0,0x73,0x90,0x0,0xb8,0x12,0x0,0x73,0x75,0xd0,0x0,0x12,0x11,0xad,
0x2,0x0,0xbe,0xef,0x65,0x82,0x70,0x3,0xee,0x65,0x83,0x22,0xe4,0x93,0xf8,0x74,0x1,0x93,0xf9,0x74,0x2,0x93,0xfe,0x74,0x3,
0x93,0xf5,0x82,0x8e,0x83,0xe8,0x69,0x70,0x1,0x22,0xe4,0x93,0xf6,0xa3,0x8,0x80,0xf4,0xe4,0x93,0xfc,0x74,0x1,0x93,0xfd,0x74,
0x2,0x93,0xfe,0x74,0x3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54,0x8,0x64,0x8,0x60,0x14,0x90,0xff,0xf0,0xe0,0x54,0x20,0x60,0xa,0x90,0xff,0xf0,0xe0,0x44,
0x20,0xf0,0x7f,0x1,0x22,0x80,0xe2,0x7f,0x0,0x22,0x78,0x32,0xa6,0x7,0x90,0xff,0xf0,0xe0,0x54,0xfc,0xf0,0x78,0x35,0xe6,0x8,
0x46,0x70,0x3,0x7f,0x0,0x22,0x78,0x63,0xe6,0x14,0x70,0xe,0x78,0x34,0xe6,0xc3,0x33,0x44,0x1,0x90,0xff,0xf3,0xf0,0x2,0x7,
0x65,0x78,0x32,0xe6,0x54,0x7,0x78,0x30,0xf6,0x78,0x30,0xe6,0xc3,0x33,0xf6,0x78,0x30,0xe6,0x44,0xa0,0xf6,0x78,0x63,0xe6,0x64,
0x2,0x70,0x21,0x78,0x33,0xe6,0xd3,0x94,0x0,0x40,0x19,0x78,0x33,0xe6,0x7e,0x0,0x54,0x7,0x78,0x31,0xf6,0x78,0x31,0xe6,0xc3,
0x33,0xf6,0x78,0x31,0x86,0x7,0x78,0x30,0xe6,0x4f,0xf6,0x78,0x30,0xe6,0x90,0xff,0xf3,0xf0,0x78,0x63,0xe6,0x64,0x3,0x70,0x12,
0x78,0x33,0xe6,0x7e,0x0,0x90,0xff,0xf1,0xf0,0x12,0x6,0xa4,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x34,0xe6,0x54,0xff,0x90,0xff,
0xf1,0xf0,0x12,0x6,0xa4,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x30,0xe6,0x44,0x1,0x90,0xff,0xf3,0xf0,0x90,0xff,0xf1,0xe4,0xf0,
0xd3,0x78,0x36,0xe6,0x94,0x1,0x18,0xe6,0x94,0x0,0x40,0x48,0xd3,0x78,0x36,0xe6,0x94,0x1,0x18,0xe6,0x94,0x0,0x40,0x3a,0x12,
0x6,0x83,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x36,0xe6,0x64,0x2,0x18,0x46,0x70,0x7,0x90,0xff,0xf0,0xe0,0x44,0x2,0xf0,0x78,
0x39,0x6,0xe6,0x18,0x86,0x2,0x70,0x1,0x6,0x14,0x18,0x86,0x1,0xfb,0x90,0xff,0xf2,0xe0,0xff,0x12,0x5,0x7e,0x78,0x36,0xe6,
0x16,0x18,0x70,0x1,0x16,0x80,0xba,0x80,0x7,0x90,0xff,0xf0,0xe0,0x44,0x2,0xf0,0x12,0x6,0x83,0xef,0x60,0x3,0x7f,0x1,0x22,
0x90,0xff,0xf2,0xe0,0xff,0x78,0x39,0x86,0x3,0x18,0x86,0x2,0x18,0x86,0x1,0x12,0x5,0x7e,0x7f,0x0,0x22,0x78,0x44,0xa6,0x7,
0x90,0xff,0xf0,0xe0,0x54,0xfc,0xf0,0x78,0x47,0xe6,0x8,0x46,0x70,0x3,0x7f,0x0,0x22,0x78,0x63,0xe6,0x14,0x70,0xb,0x78,0x46,
0xe6,0xc3,0x33,0x90,0xff,0xf3,0xf0,0x80,0x6e,0x78,0x44,0xe6,0x54,0x7,0x78,0x42,0xf6,0x78,0x42,0xe6,0xc3,0x33,0xf6,0x78,0x42,
0xe6,0x44,0xa0,0xf6,0x78,0x63,0xe6,0x64,0x2,0x70,0x21,0x78,0x45,0xe6,0xd3,0x94,0x0,0x40,0x19,0x78,0x45,0xe6,0x7e,0x0,0x54,
0x7,0x78,0x43,0xf6,0x78,0x43,0xe6,0xc3,0x33,0xf6,0x78,0x43,0x86,0x7,0x78,0x42,0xe6,0x4f,0xf6,0x78,0x42,0xe6,0x90,0xff,0xf3,
0xf0,0x78,0x63,0xe6,0x64,0x3,0x70,0x12,0x78,0x45,0xe6,0x7e,0x0,0x90,0xff,0xf1,0xf0,0x12,0x6,0xa4,0xef,0x60,0x3,0x7f,0x1,
0x22,0x78,0x46,0xe6,0x54,0xff,0x90,0xff,0xf1,0xf0,0x12,0x6,0xa4,0xef,0x60,0x3,0x7f,0x1,0x22,0xd3,0x78,0x48,0xe6,0x94,0x1,
0x18,0xe6,0x94,0x0,0x40,0x2a,0x78,0x4b,0x6,0xe6,0x18,0x86,0x2,0x70,0x1,0x6,0x14,0x18,0x86,0x1,0xfb,0x12,0x5,0xd7,0x90,
0xff,0xf1,0xef,0xf0,0x12,0x6,0xa4,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x48,0xe6,0x16,0x18,0x70,0x1,0x16,0x80,0xca,0x90,0xff,
0xf0,0xe0,0x44,0x1,0xf0,0x78,0x4b,0x86,0x3,0x18,0x86,0x2,0x18,0x86,0x1,0x12,0x5,0xd7,0x90,0xff,0xf1,0xef,0xf0,0x12,0x6,
0xa4,0xef,0x60,0x3,0x7f,0x1,0x22,0x7f,0x0,0x22,0x78,0x75,0xe6,0x4,0x70,0x3,0x2,0x9,0x52,0x78,0x75,0xe6,0xc3,0x94,0x9,
0x40,0xc,0x78,0x30,0x76,0x8,0x78,0x75,0xe6,0x24,0xf8,0xf6,0x80,0x28,0x78,0x75,0xe6,0xc3,0x94,0x8,0x50,0xc,0x78,0x75,0xe6,
0x78,0x30,0xf6,0x78,0x75,0x76,0xff,0x80,0x14,0x78,0x30,0x76,0x8,0x78,0x76,0xe6,0x14,0x70,0x6,0x78,0x75,0x76,0x0,0x80,0x4,
0x78,0x75,0x76,0xff,0x78,0x31,0x76,0x0,0x78,0x31,0xe6,0xc3,0x78,0x30,0x96,0x50,0x25,0x78,0x7a,0x6,0xe6,0x18,0x86,0x2,0x70,
0x1,0x6,0x14,0x18,0x86,0x1,0xfb,0x12,0x5,0xd7,0x78,0x31,0xe6,0x24,0xf8,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xef,0xf0,0x78,
0x31,0x6,0x80,0xd2,0x78,0x30,0xe6,0x54,0x7f,0x90,0xff,0x81,0xf0,0x22,0x78,0x78,0xa6,0x5,0x8,0xa6,0x6,0x8,0xa6,0x7,0x90,
0xff,0x7,0xe0,0x60,0xb,0x90,0xff,0x7,0xe4,0xf0,0x90,0xff,0x6,0x74,0xfe,0xf0,0x90,0xff,0x6,0xe0,0xc3,0x78,0x75,0x96,0x50,
0x7,0x90,0xff,0x6,0xe0,0x78,0x75,0xf6,0x90,0xff,0x6,0xe0,0xd3,0x78,0x75,0x96,0x40,0x6,0x78,0x76,0x76,0x1,0x80,0x4,0x78,
0x76,0x76,0x0,0x12,0x8,0xd2,0x22,0x78,0x78,0xe4,0xf6,0x8,0xf6,0x8,0xf6,0x78,0x75,0xf6,0x12,0x8,0xd2,0x22,0x90,0xff,0x80,
0xe0,0x44,0x8,0xf0,0xa3,0xa3,0xe0,0x44,0x8,0xf0,0x22,0x90,0xff,0x0,0xe0,0x54,0x80,0x60,0x10,0x78,0x40,0x76,0x0,0x8,0x76,
0x1,0x90,0xff,0xfc,0xe0,0x44,0x1,0xf0,0x80,0xd,0x78,0x40,0xe4,0xf6,0x8,0xf6,0x90,0xff,0xfc,0xe0,0x54,0xfe,0xf0,0x90,0xff,
0xfc,0xe0,0x44,0x2,0xf0,0x90,0xff,0x80,0xe0,0x54,0xf7,0xf0,0xa3,0xa3,0xe0,0x54,0xf7,0xf0,0x78,0x3d,0x76,0x0,0x78,0x3e,0x76,
0x0,0x78,0x3f,0x76,0x0,0x90,0xff,0x0,0xe0,0x54,0x60,0xff,0x60,0x3,0x2,0xf,0x2f,0x90,0xff,0x5,0xe0,0x60,0x4,0x12,0x9,
0xa6,0x22,0x90,0xff,0x1,0xe0,0xff,0x12,0x5,0x11,0xa,0x3c,0x0,0xb,0x6c,0x1,0xc,0x35,0x3,0xc,0xec,0x5,0xd,0x3d,0x6,
0xf,0x28,0x7,0xd,0xeb,0x8,0xe,0x3c,0x9,0xe,0x8d,0xa,0xe,0xde,0xb,0xf,0x28,0xc,0x0,0x0,0xf,0x28,0x78,0x40,0xe6,
0x8,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x3,0xe0,0x70,0x6,0x90,0xff,0x2,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,
0xff,0x6,0xe0,0x64,0x2,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x83,0xe4,0xf0,0x90,0xff,0x0,0xe0,0x54,
0x1f,0xff,0x12,0x5,0x11,0xa,0x86,0x0,0xa,0xae,0x1,0xa,0xc8,0x2,0xb,0x64,0x3,0x0,0x0,0xb,0x64,0x90,0xff,0x4,0xe0,
0x60,0x4,0x12,0x9,0xa6,0x22,0x78,0x75,0x76,0x2,0x90,0xff,0xfc,0xe0,0x54,0x4,0x64,0x4,0x70,0x4,0x78,0x3d,0x76,0x1,0x7d,
0x0,0x7e,0x0,0x7f,0x3d,0x12,0x9,0x53,0x2,0xb,0x69,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x78,0x75,0x76,0x2,
0x7d,0x0,0x7e,0x0,0x7f,0x3d,0x12,0x9,0x53,0x2,0xb,0x69,0x90,0xff,0x4,0xe0,0x54,0xf,0x78,0x3a,0xf6,0x78,0x3a,0xe6,0x70,
0x1e,0x90,0xff,0x4,0xe0,0x54,0x80,0x60,0xb,0x90,0xff,0x80,0xe0,0x54,0x8,0x78,0x3d,0xf6,0x80,0x9,0x90,0xff,0x82,0xe0,0x54,
0x8,0x78,0x3d,0xf6,0x80,0x59,0x78,0x3a,0xe6,0xc3,0x94,0x4,0x40,0x4,0x12,0x9,0xa6,0x22,0x78,0x3a,0x16,0x90,0xff,0x4,0xe0,
0x54,0x80,0x60,0x22,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x48,0xf5,0x82,
0xef,0x34,0xff,0xf5,0x83,0xe0,0x54,0x8,0x78,0x3d,0xf6,0x80,0x20,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,
0xcf,0x33,0xde,0xf9,0xcf,0x24,0x8,0xf5,0x82,0xef,0x34,0xff,0xf5,0x83,0xe0,0x54,0x8,0x78,0x3d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,0xff,0x6,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,0x4,0x12,
0x9,0xa6,0x22,0x90,0xff,0x82,0xe0,0x44,0x8,0xf0,0x90,0xff,0x0,0xe0,0x54,0x1f,0xff,0x12,0x5,0x11,0xc,0xe4,0x0,0xc,0xe4,
0x1,0xc,0x70,0x2,0xc,0xe4,0x3,0x0,0x0,0xc,0xe4,0x90,0xff,0x2,0xe0,0x70,0x65,0x90,0xff,0x4,0xe0,0x54,0xf,0x78,0x3a,
0xf6,0x78,0x3a,0xe6,0x60,0x55,0x78,0x3a,0xe6,0xc3,0x94,0x4,0x40,0x4,0x12,0x9,0xa6,0x22,0x78,0x3a,0x16,0x90,0xff,0x4,0xe0,
0x54,0x80,0x60,0x20,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x48,0xf5,0x82,
0xef,0x34,0xff,0xf5,0x83,0xe0,0x44,0x8,0xf0,0x80,0x1e,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,
0xde,0xf9,0xcf,0x24,0x8,0xf5,0x82,0xef,0x34,0xff,0xf5,0x83,0xe0,0x44,0x8,0xf0,0x80,0x4,0x12,0x9,0xa6,0x22,0x12,0x9,0x97,
0x80,0x5,0x12,0x9,0xa6,0x80,0x0,0x2,0xf,0x2c,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x6,
0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x78,0x41,0xe6,0x14,
0x18,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x82,0xe0,0x44,0x8,0xf0,0x90,0xff,0x2,0xe0,0x33,0x40,0xd,0x90,0xff,0x2,
0xe0,0x90,0xff,0xff,0xf0,0x12,0x9,0x97,0x80,0x3,0x12,0x9,0xa6,0x2,0xf,0x2c,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,
0x9,0xa6,0x22,0x78,0x40,0xe6,0x8,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x6,0xe0,0xff,0xa3,0xe0,0x4f,0x70,0x4,0x12,
0x9,0xa6,0x22,0x90,0xff,0x83,0xe4,0xf0,0x90,0xff,0x3,0xe0,0xff,0x12,0x5,0x11,0xd,0x82,0x1,0xd,0x91,0x2,0xd,0xa0,0x3,
0xd,0xe4,0x4,0xd,0xe4,0x5,0x0,0x0,0xd,0xe4,0x78,0x75,0x76,0x12,0x7f,0x82,0x7e,0xfe,0x7d,0x1,0x12,0x9,0x53,0x80,0x57,
0x78,0x75,0x76,0x20,0x7f,0x94,0x7e,0xfe,0x7d,0x1,0x12,0x9,0x53,0x80,0x48,0x90,0xff,0x2,0xe0,0x14,0x70,0xf,0x78,0x75,0x76,
0x1c,0x7d,0x2,0x7e,0x1c,0x7f,0xed,0x12,0x9,0x53,0x80,0x32,0x90,0xff,0x2,0xe0,0x64,0x2,0x70,0xf,0x78,0x75,0x76,0x2a,0x7d,
0x2,0x7e,0x1d,0x7f,0x9,0x12,0x9,0x53,0x80,0x1b,0x90,0xff,0x2,0xe0,0x64,0x3,0x70,0x0,0x78,0x75,0x76,0x2a,0x7d,0x2,0x7e,
0x1d,0x7f,0x9,0x12,0x9,0x53,0x80,0x4,0x12,0x9,0xa6,0x22,0x2,0xf,0x2c,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,0x9,
0xa6,0x22,0x78,0x40,0xe6,0x8,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,
0x2,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x6,0xe0,0x14,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,
0xa6,0x22,0x90,0xff,0x83,0xe4,0xf0,0x78,0x75,0x76,0x1,0xfd,0xfe,0x7f,0x77,0x12,0x9,0x53,0x2,0xf,0x2c,0x90,0xff,0x0,0xe0,
0x54,0x1f,0x60,0x4,0x12,0x9,0xa6,0x22,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x4,0xe0,0x60,
0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x7,0xe0,0x70,0x6,0x90,0xff,0x6,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x82,0xe0,
0x44,0x8,0xf0,0x90,0xff,0x2,0xe0,0xc3,0x94,0x2,0x40,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x2,0xe0,0x78,0x77,0xf6,0x12,0x9,
0x97,0x22,0x90,0xff,0x0,0xe0,0x54,0x1f,0x14,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,
0x78,0x40,0xe6,0x8,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x2,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,
0x90,0xff,0x6,0xe0,0x14,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x83,0xe4,0xf0,0x78,0x75,0x76,0x1,0xfd,
0xfe,0x7f,0x3d,0x12,0x9,0x53,0x80,0x4e,0x90,0xff,0x0,0xe0,0x54,0x1f,0x14,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x4,0xe0,
0x60,0x4,0x12,0x9,0xa6,0x22,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x6,0xe0,0x70,0x4,0xa3,
0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x2,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x82,0xe0,
0x44,0x8,0xf0,0x12,0x9,0x97,0x22,0x12,0x9,0xa6,0x22,0x2,0xf,0xd0,0xef,0x64,0x20,0x70,0x3,0x2,0xf,0xb5,0xef,0x64,0x40,
0x60,0x3,0x2,0xf,0xcc,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,0x1,0xe0,0xff,0x64,0x92,0x70,
0x5d,0x90,0xff,0x4,0xe0,0xff,0x7e,0x0,0xa3,0xe0,0xfb,0x7a,0x0,0x8b,0x2,0xe4,0x78,0x3c,0x2f,0xf6,0xee,0x3a,0x18,0xf6,0x7f,
0x2,0x12,0x6,0x71,0x7f,0x0,0x12,0x6,0x5c,0x78,0x3c,0xe6,0x18,0x86,0x6,0x78,0x33,0xa6,0x6,0x8,0xf6,0x8,0x76,0x0,0x8,
0x76,0x1,0x8,0x76,0x0,0x8,0x76,0x0,0x8,0x76,0x3d,0x90,0xff,0x3,0xe0,0x54,0x7,0xff,0x12,0x6,0xc5,0xef,0x70,0xf,0x78,
0x75,0x76,0x1,0x7d,0x0,0x7e,0x0,0x7f,0x3d,0x12,0x9,0x53,0x80,0x3,0x12,0x9,0xa6,0x80,0x4,0x12,0x9,0xa6,0x22,0x90,0xff,
0x0,0xe0,0x64,0x21,0x70,0xd,0xa3,0xe0,0x70,0x9,0x90,0xff,0x82,0x74,0xa2,0xf0,0xa3,0xe4,0xf0,0x80,0x4,0x12,0x9,0xa6,0x22,
0x22,0x90,0xff,0xff,0xe4,0xf0,0x78,0x75,0x76,0xff,0x78,0x78,0xf6,0x8,0xf6,0x8,0xf6,0x78,0x77,0xf6,0x90,0xff,0x80,0x74,0x84,
0xf0,0xa3,0xa3,0xf0,0x90,0xff,0xfd,0x4,0xf0,0x90,0xff,0x9,0x74,0xc4,0xf0,0x90,0xff,0xd,0xf0,0xa3,0xa3,0x74,0x40,0xf0,0x90,
0xff,0x8,0x74,0x84,0xf0,0x90,0xff,0x51,0x74,0xcc,0xf0,0x90,0xff,0x55,0xf0,0xa3,0xa3,0x74,0x20,0xf0,0x90,0xff,0x50,0x74,0x84,
0xf0,0x90,0xff,0xa,0xe4,0xf0,0x90,0xff,0xe,0xf0,0x90,0xff,0x52,0x74,0x80,0xf0,0x90,0xff,0x56,0xf0,0x22,0x90,0xff,0xfc,0xe4,
0xf0,0x78,0x4c,0xf6,0x78,0x4c,0xe6,0xc3,0x94,0x12,0x50,0x22,0x78,0x4c,0xe6,0x24,0xdb,0xf5,0x82,0xe4,0x34,0x1c,0xf5,0x83,0xe4,
0x93,0xff,0x78,0x4c,0xe6,0x24,0x82,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xef,0xf0,0x78,0x4c,0x6,0x80,0xd6,0x78,0x4c,0x76,0x0,
0x78,0x4c,0xe6,0xc3,0x94,0x20,0x50,0x22,0x78,0x4c,0xe6,0x24,0x33,0xf5,0x82,0xe4,0x34,0x1d,0xf5,0x83,0xe4,0x93,0xff,0x78,0x4c,
0xe6,0x24,0x94,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xef,0xf0,0x78,0x4c,0x6,0x80,0xd6,0x90,0xff,0x8,0xe4,0xf0,0x7f,0x1,0x12,
0x6,0x5c,0x90,0xff,0x90,0xe0,0x44,0x80,0xf0,0x22,0x78,0x75,0x76,0xff,0x78,0x78,0xe4,0xf6,0x8,0xf6,0x8,0xf6,0x12,0x9,0xb4,
0x22,0x90,0xff,0x83,0xe4,0xf0,0x78,0x75,0xe6,0x4,0x70,0x9,0x90,0xff,0x80,0xe0,0x44,0x8,0xf0,0x80,0x3,0x12,0x8,0xd2,0x22,
0x22,0xc0,0xd0,0xc0,0xe0,0xc0,0x83,0xc0,0x82,0xc0,0xf0,0xc0,0x0,0xc0,0x1,0xc0,0x2,0xc0,0x3,0xc0,0x4,0xc0,0x5,0xc0,0x6,
0xc0,0x7,0xc2,0xaf,0x90,0xff,0x92,0xe0,0xff,0x12,0x5,0x11,0x11,0x4f,0x12,0x11,0x60,0x14,0x11,0x59,0x24,0x11,0x67,0x26,0x11,
0x1f,0x30,0x11,0x2f,0x32,0x11,0x3f,0x3c,0x11,0x15,0x44,0x11,0xe,0x46,0x0,0x0,0x11,0x6e,0x90,0xff,0x92,0xe4,0xf0,0x80,0x5b,
0x90,0xff,0x92,0xe4,0xf0,0x12,0x10,0xb2,0x80,0x51,0x12,0x10,0xa2,0x90,0xff,0xfe,0x74,0x1,0xf0,0x90,0xff,0x92,0x14,0xf0,0x80,
0x41,0x12,0x10,0xa2,0x90,0xff,0xfe,0x74,0x4,0xf0,0x90,0xff,0x92,0xe4,0xf0,0x80,0x31,0x12,0xf,0xd1,0x90,0xff,0xfe,0x74,0x80,
0xf0,0x90,0xff,0x92,0xe4,0xf0,0x80,0x21,0x12,0x10,0xca,0x90,0xff,0x92,0xe4,0xf0,0x80,0x17,0x90,0xff,0x92,0xe4,0xf0,0x80,0x10,
0x90,0xff,0x92,0xe4,0xf0,0x80,0x9,0x90,0xff,0x92,0xe4,0xf0,0x80,0x2,0x80,0x0,0xd2,0xaf,0xd0,0x7,0xd0,0x6,0xd0,0x5,0xd0,
0x4,0xd0,0x3,0xd0,0x2,0xd0,0x1,0xd0,0x0,0xd0,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0xd0,0xd0,0x32,0xc0,0xe0,0xc0,0x83,0xc0,
0x82,0xc0,0x0,0xc2,0xaf,0x78,0x67,0x6,0x75,0x8c,0xcf,0x90,0xff,0x92,0xe4,0xf0,0xd2,0xaf,0xd0,0x0,0xd0,0x82,0xd0,0x83,0xd0,
0xe0,0x32,0x43,0x87,0x80,0xc2,0x99,0x75,0x99,0xaa,0x75,0x90,0x0,0x75,0xa0,0xff,0x12,0x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d,0xfc,0x74,0xc,
0x12,0x5,0x96,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,
0xff,0xee,0x34,0xfd,0xfe,0x7d,0x1,0x8f,0x3,0x8e,0x2,0x8d,0x1,0x7f,0x6f,0x7e,0x12,0x7d,0x83,0x7c,0x3a,0x74,0x10,0x12,0x5,
0x96,0x78,0x4d,0x6,0x2,0x11,0xe9,0x78,0x68,0xe6,0x78,0x67,0x66,0x70,0x2,0x80,0xf6,0x78,0x68,0x6,0x78,0x62,0xe6,0x44,0x1,
0xf5,0x90,0x75,0x80,0x0,0x75,0x80,0x2,0x78,0x4d,0x76,0x0,0x78,0x4d,0xe6,0xc3,0x94,0xf,0x50,0x55,0x78,0x60,0xe6,0x54,0x40,
0xfe,0xe4,0x4e,0x60,0x5,0x75,0x80,0x3,0x80,0x3,0x75,0x80,0x2,0x75,0xb0,0xff,0x75,0xb0,0x0,0x75,0xb0,0xff,0x75,0xb0,0x0,
0x78,0x62,0xe6,0x44,0x1,0x44,0x2,0xf5,0x90,0x75,0xb0,0xff,0x75,0xb0,0x0,0x75,0xb0,0xff,0x75,0xb0,0x0,0x75,0xb0,0xff,0x75,
0xb0,0x0,0x78,0x62,0xe6,0x44,0x1,0xf5,0x90,0x75,0xb0,0xff,0x75,0xb0,0x0,0x78,0x61,0xe6,0xc3,0x33,0xf6,0x18,0xe6,0x33,0xf6,
0x78,0x4d,0x6,0x80,0xa3,0x75,0x80,0x0,0x78,0x62,0xe6,0x24,0x20,0xf6,0x78,0x62,0xe6,0x75,0xf0,0x20,0x84,0x78,0x4d,0xf6,0x78,
0x5f,0x76,0x2,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,
0xfb,0xee,0x34,0xfd,0xfa,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7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,
0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0x10,0x12,0x5,0xf9,0x78,0x5e,0x86,0x3,0x18,0x86,0x2,0x18,0x86,
0x1,0x18,0x86,0x0,0x74,0x3,0x12,0x4,0xcf,0x60,0x3,0x2,0x15,0x51,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,
0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0x10,0x12,0x5,0xf9,0x78,0x5a,
0x86,0x3,0x18,0x86,0x2,0x18,0x86,0x1,0x18,0x86,0x0,0x74,0x3,0x12,0x4,0xcf,0x70,0x74,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,
0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xff,0xee,0x34,0xfd,0xfe,0x7d,0x1,0x8f,0x3,0x8e,
0x2,0x8d,0x1,0xe4,0xff,0xfe,0xfd,0xfc,0x74,0x4,0x12,0x5,0x96,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,
0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0xc,0x12,0x5,0xf9,0x78,0x4d,0xe6,
0xfb,0x7a,0x0,0xeb,0x75,0xf0,0x14,0xa4,0xca,0xab,0xf0,0x75,0xf0,0x14,0xa4,0x2b,0xca,0x24,0x80,0xfb,0xea,0x34,0xfd,0xfa,0x79,
0x1,0x74,0x8,0x12,0x5,0x96,0x2,0x1a,0x16,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0x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,0xfb,0xfa,0xf9,0xf8,0x74,0x7,0x12,0x4,0xcf,0x70,0x6,0x78,0x5f,0x76,0x1,0x80,0x40,0x78,0x4d,0xe6,0xff,
0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,
0x74,0x10,0x12,0x5,0xf9,0x78,0x52,0x86,0x3,0x18,0x86,0x2,0x18,0x86,0x1,0x18,0x86,0x0,0x74,0xb,0x12,0x4,0xcf,0x70,0x6,
0x78,0x5f,0x76,0x0,0x80,0x4,0x78,0x5f,0x76,0x1,0x78,0x56,0x86,0x7,0x18,0x86,0x6,0x18,0x86,0x5,0x18,0x86,0x4,0xe4,0xfb,
0xfa,0xf9,0xf8,0x74,0xb,0x12,0x4,0xcf,0x70,0x74,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,
0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0x4,0x12,0x5,0xf9,0xe4,0xfb,0xfa,0xf9,0xf8,0x74,
0xb,0x12,0x4,0xcf,0x70,0x6,0x78,0x5f,0x76,0x0,0x80,0x40,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,
0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0x10,0x12,0x5,0xf9,0x78,0x52,0x86,0x3,
0x18,0x86,0x2,0x18,0x86,0x1,0x18,0x86,0x0,0x74,0xb,0x12,0x4,0xcf,0x70,0x6,0x78,0x5f,0x76,0x1,0x80,0x4,0x78,0x5f,0x76,
0x0,0x78,0x5f,0xe6,0x60,0x3,0x2,0x17,0xcd,0x78,0x4d,0xe6,0xff,0x7e,0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0,0x75,0xf0,
0x14,0xa4,0x2f,0xce,0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0x4,0x12,0x5,0xf9,0x78,0x4d,0xe6,0xfb,0x7a,0x0,0xeb,
0x75,0xf0,0x14,0xa4,0xca,0xab,0xf0,0x75,0xf0,0x14,0xa4,0x2b,0xca,0x24,0x80,0xfb,0xea,0x34,0xfd,0xfa,0x79,0x1,0x90,0x3,0x41,
0x74,0x8,0x12,0x5,0x37,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,
0x24,0x80,0xfb,0xee,0x34,0xfd,0xfa,0x79,0x1,0x74,0x8,0x12,0x5,0xf9,0x7b,0x0,0x7a,0x0,0x79,0xfe,0x78,0x42,0x12,0x0,0xc0,
0x12,0x4,0x42,0x78,0x61,0x74,0xc8,0x2f,0xf6,0xee,0x34,0xa,0x18,0xf6,0x90,0xff,0xa,0xe0,0x54,0x80,0x70,0x3,0x2,0x1c,0xd0,
0x90,0xfe,0x20,0xe0,0x54,0x7,0x78,0x4e,0xf6,0x78,0x4d,0x76,0x0,0x78,0x4e,0xe6,0x54,0x2,0x60,0x6,0x78,0x4d,0xe6,0x44,0x2,
0xf6,0x78,0x4e,0xe6,0x54,0x1,0x60,0x6,0x78,0x4d,0xe6,0x44,0x4,0xf6,0x78,0x4e,0xe6,0x54,0x4,0x60,0x6,0x78,0x4d,0xe6,0x44,
0x1,0xf6,0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xff,
0xee,0x34,0xfd,0xfe,0x7d,0x1,0x8f,0x3,0x8e,0x2,0x8d,0x1,0x90,0xfe,0x27,0xe0,0xff,0x74,0xc,0x12,0x5,0x79,0x78,0x4d,0xe6,
0xff,0x7e,0x0,0xef,0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0x78,0x4d,0xe6,0xff,0x7e,0x0,0xef,0x75,0xf0,0x14,
0xa4,0xce,0xaf,0xf0,0x75,0xf0,0x14,0xa4,0x2f,0xce,0x24,0x80,0xff,0xee,0x34,0xfd,0xfe,0x7d,0x1,0x7b,0x10,0x7a,0x0,0x74,0x1,
0x12,0x6,0x4a,0x8d,0x1,0x90,0xfe,0x2c,0xe0,0xff,0x74,0x3,0x12,0x5,0x79,0x78,0x4d,0xe6,0x24,0x6c,0xf8,0x76,0x1,0x90,0xff,
0xa,0xe4,0xf0,0xe5,0xa0,0x54,0x80,0x70,0x2,0x80,0xf8,0x2,0x12,0xde,0x12,0x1,0x10,0x1,0x0,0x0,0x0,0x8,0xc2,0x6,0x3b,
0x0,0x0,0x1,0x1,0x2,0x3,0x1,0x1c,0x3,0x50,0x0,0x68,0x0,0x69,0x0,0x64,0x0,0x67,0x0,0x65,0x0,0x74,0x0,0x73,0x0,
0x20,0x0,0x49,0x0,0x6e,0x0,0x63,0x0,0x2e,0x0,0x2a,0x3,0x50,0x0,0x68,0x0,0x69,0x0,0x64,0x0,0x67,0x0,0x65,0x0,0x74,
0x0,0x41,0x0,0x64,0x0,0x76,0x0,0x61,0x0,0x6e,0x0,0x63,0x0,0x65,0x0,0x64,0x0,0x53,0x0,0x65,0x0,0x72,0x0,0x76,0x0,
0x6f,0x0,0x9,0x2,0x20,0x0,0x1,0x1,0x0,0x80,0x32,0x9,0x4,0x0,0x0,0x2,0xff,0x0,0xff,0x0,0x7,0x5,0x1,0x2,0x40,
0x0,0x0,0x7,0x5,0x82,0x2,0x20,0x0,0x0,};
int SOFT_INTER_32_SIZE=4321;
const unsigned char SOFT_INTER_32[4321] = {0xde,
0x10,0x79,0x2,0x0,0x6,0x2,0xc,0x14,0x75,0x81,0x6a,0x78,0x6a,0x76,0x0,0xd8,0xfc,0x90,0x0,0x0,0xae,0x83,0xaf,0x82,0x90,
0x0,0x0,0x12,0x0,0x44,0x60,0x5,0xe4,0xf0,0xa3,0x80,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0x83,0x8b,0x82,0xe0,0xff,
0x22,0xb9,0x2,0x8,0x8a,0x83,0x8b,0x82,0xe4,0x93,0xff,0x22,0xeb,0xf8,0xe2,0xff,0x22,0xef,0x14,0x70,0x9,0x90,0xff,0xf0,0xe0,
0x44,0x10,0xf0,0x80,0x7,0x90,0xff,0xf0,0xe0,0x54,0xef,0xf0,0x22,0x78,0x30,0xa6,0x7,0xef,0xc3,0x94,0x4,0x40,0x1,0x22,0x78,
0x30,0xe6,0x78,0x4f,0xf6,0x22,0x90,0xff,0xf0,0xe0,0x54,0x80,0x64,0x80,0x60,0x14,0x90,0xff,0xf0,0xe0,0x54,0x20,0x60,0xa,0x90,
0xff,0xf0,0xe0,0x44,0x20,0xf0,0x7f,0x1,0x22,0x80,0xe2,0x7f,0x0,0x22,0x90,0xff,0xf0,0xe0,0x54,0x8,0x64,0x8,0x60,0x14,0x90,
0xff,0xf0,0xe0,0x54,0x20,0x60,0xa,0x90,0xff,0xf0,0xe0,0x44,0x20,0xf0,0x7f,0x1,0x22,0x80,0xe2,0x7f,0x0,0x22,0x78,0x32,0xa6,
0x7,0x90,0xff,0xf0,0xe0,0x54,0xfc,0xf0,0x78,0x35,0xe6,0x8,0x46,0x70,0x3,0x7f,0x0,0x22,0x78,0x4f,0xe6,0x14,0x70,0xe,0x78,
0x34,0xe6,0xc3,0x33,0x44,0x1,0x90,0xff,0xf3,0xf0,0x2,0x2,0x2b,0x78,0x32,0xe6,0x54,0x7,0x78,0x30,0xf6,0x78,0x30,0xe6,0xc3,
0x33,0xf6,0x78,0x30,0xe6,0x44,0xa0,0xf6,0x78,0x4f,0xe6,0x64,0x2,0x70,0x21,0x78,0x33,0xe6,0xd3,0x94,0x0,0x40,0x19,0x78,0x33,
0xe6,0x7e,0x0,0x54,0x7,0x78,0x31,0xf6,0x78,0x31,0xe6,0xc3,0x33,0xf6,0x78,0x31,0x86,0x7,0x78,0x30,0xe6,0x4f,0xf6,0x78,0x30,
0xe6,0x90,0xff,0xf3,0xf0,0x78,0x4f,0xe6,0x64,0x3,0x70,0x12,0x78,0x33,0xe6,0x7e,0x0,0x90,0xff,0xf1,0xf0,0x12,0x1,0x6a,0xef,
0x60,0x3,0x7f,0x1,0x22,0x78,0x34,0xe6,0x54,0xff,0x90,0xff,0xf1,0xf0,0x12,0x1,0x6a,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x30,
0xe6,0x44,0x1,0x90,0xff,0xf3,0xf0,0x90,0xff,0xf1,0xe4,0xf0,0xd3,0x78,0x36,0xe6,0x94,0x1,0x18,0xe6,0x94,0x0,0x40,0x48,0xd3,
0x78,0x36,0xe6,0x94,0x1,0x18,0xe6,0x94,0x0,0x40,0x3a,0x12,0x1,0x49,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x36,0xe6,0x64,0x2,
0x18,0x46,0x70,0x7,0x90,0xff,0xf0,0xe0,0x44,0x2,0xf0,0x78,0x39,0x6,0xe6,0x18,0x86,0x2,0x70,0x1,0x6,0x14,0x18,0x86,0x1,
0xfb,0x90,0xff,0xf2,0xe0,0xff,0x12,0x0,0xe3,0x78,0x36,0xe6,0x16,0x18,0x70,0x1,0x16,0x80,0xba,0x80,0x7,0x90,0xff,0xf0,0xe0,
0x44,0x2,0xf0,0x12,0x1,0x49,0xef,0x60,0x3,0x7f,0x1,0x22,0x90,0xff,0xf2,0xe0,0xff,0x78,0x39,0x86,0x3,0x18,0x86,0x2,0x18,
0x86,0x1,0x12,0x0,0xe3,0x7f,0x0,0x22,0x78,0x44,0xa6,0x7,0x90,0xff,0xf0,0xe0,0x54,0xfc,0xf0,0x78,0x47,0xe6,0x8,0x46,0x70,
0x3,0x7f,0x0,0x22,0x78,0x4f,0xe6,0x14,0x70,0xb,0x78,0x46,0xe6,0xc3,0x33,0x90,0xff,0xf3,0xf0,0x80,0x6e,0x78,0x44,0xe6,0x54,
0x7,0x78,0x42,0xf6,0x78,0x42,0xe6,0xc3,0x33,0xf6,0x78,0x42,0xe6,0x44,0xa0,0xf6,0x78,0x4f,0xe6,0x64,0x2,0x70,0x21,0x78,0x45,
0xe6,0xd3,0x94,0x0,0x40,0x19,0x78,0x45,0xe6,0x7e,0x0,0x54,0x7,0x78,0x43,0xf6,0x78,0x43,0xe6,0xc3,0x33,0xf6,0x78,0x43,0x86,
0x7,0x78,0x42,0xe6,0x4f,0xf6,0x78,0x42,0xe6,0x90,0xff,0xf3,0xf0,0x78,0x4f,0xe6,0x64,0x3,0x70,0x12,0x78,0x45,0xe6,0x7e,0x0,
0x90,0xff,0xf1,0xf0,0x12,0x1,0x6a,0xef,0x60,0x3,0x7f,0x1,0x22,0x78,0x46,0xe6,0x54,0xff,0x90,0xff,0xf1,0xf0,0x12,0x1,0x6a,
0xef,0x60,0x3,0x7f,0x1,0x22,0xd3,0x78,0x48,0xe6,0x94,0x1,0x18,0xe6,0x94,0x0,0x40,0x2a,0x78,0x4b,0x6,0xe6,0x18,0x86,0x2,
0x70,0x1,0x6,0x14,0x18,0x86,0x1,0xfb,0x12,0x1,0x0,0x90,0xff,0xf1,0xef,0xf0,0x12,0x1,0x6a,0xef,0x60,0x3,0x7f,0x1,0x22,
0x78,0x48,0xe6,0x16,0x18,0x70,0x1,0x16,0x80,0xca,0x90,0xff,0xf0,0xe0,0x44,0x1,0xf0,0x78,0x4b,0x86,0x3,0x18,0x86,0x2,0x18,
0x86,0x1,0x12,0x1,0x0,0x90,0xff,0xf1,0xef,0xf0,0x12,0x1,0x6a,0xef,0x60,0x3,0x7f,0x1,0x22,0x7f,0x0,0x22,0x78,0x65,0xe6,
0x4,0x70,0x3,0x2,0x4,0x18,0x78,0x65,0xe6,0xc3,0x94,0x9,0x40,0xc,0x78,0x30,0x76,0x8,0x78,0x65,0xe6,0x24,0xf8,0xf6,0x80,
0x28,0x78,0x65,0xe6,0xc3,0x94,0x8,0x50,0xc,0x78,0x65,0xe6,0x78,0x30,0xf6,0x78,0x65,0x76,0xff,0x80,0x14,0x78,0x30,0x76,0x8,
0x78,0x66,0xe6,0x14,0x70,0x6,0x78,0x65,0x76,0x0,0x80,0x4,0x78,0x65,0x76,0xff,0x78,0x31,0x76,0x0,0x78,0x31,0xe6,0xc3,0x78,
0x30,0x96,0x50,0x25,0x78,0x6a,0x6,0xe6,0x18,0x86,0x2,0x70,0x1,0x6,0x14,0x18,0x86,0x1,0xfb,0x12,0x1,0x0,0x78,0x31,0xe6,
0x24,0xf8,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xef,0xf0,0x78,0x31,0x6,0x80,0xd2,0x78,0x30,0xe6,0x54,0x7f,0x90,0xff,0x81,0xf0,
0x22,0x78,0x68,0xa6,0x5,0x8,0xa6,0x6,0x8,0xa6,0x7,0x90,0xff,0x7,0xe0,0x60,0xb,0x90,0xff,0x7,0xe4,0xf0,0x90,0xff,0x6,
0x74,0xfe,0xf0,0x90,0xff,0x6,0xe0,0xc3,0x78,0x65,0x96,0x50,0x7,0x90,0xff,0x6,0xe0,0x78,0x65,0xf6,0x90,0xff,0x6,0xe0,0xd3,
0x78,0x65,0x96,0x40,0x6,0x78,0x66,0x76,0x1,0x80,0x4,0x78,0x66,0x76,0x0,0x12,0x3,0x98,0x22,0x78,0x68,0xe4,0xf6,0x8,0xf6,
0x8,0xf6,0x78,0x65,0xf6,0x12,0x3,0x98,0x22,0x90,0xff,0x80,0xe0,0x44,0x8,0xf0,0xa3,0xa3,0xe0,0x44,0x8,0xf0,0x22,0x90,0xff,
0x0,0xe0,0x54,0x80,0x60,0x10,0x78,0x40,0x76,0x0,0x8,0x76,0x1,0x90,0xff,0xfc,0xe0,0x44,0x1,0xf0,0x80,0xd,0x78,0x40,0xe4,
0xf6,0x8,0xf6,0x90,0xff,0xfc,0xe0,0x54,0xfe,0xf0,0x90,0xff,0xfc,0xe0,0x44,0x2,0xf0,0x90,0xff,0x80,0xe0,0x54,0xf7,0xf0,0xa3,
0xa3,0xe0,0x54,0xf7,0xf0,0x78,0x3d,0x76,0x0,0x78,0x3e,0x76,0x0,0x78,0x3f,0x76,0x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x9,0x90,0xff,0x82,0xe0,0x54,0x8,0x78,0x3d,0xf6,0x80,0x59,0x78,0x3a,0xe6,0xc3,0x94,0x4,0x40,
0x4,0x12,0x4,0x6c,0x22,0x78,0x3a,0x16,0x90,0xff,0x4,0xe0,0x54,0x80,0x60,0x22,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,
0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x48,0xf5,0x82,0xef,0x34,0xff,0xf5,0x83,0xe0,0x54,0x8,0x78,0x3d,0xf6,0x80,0x20,
0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x8,0xf5,0x82,0xef,0x34,0xff,0xf5,
0x83,0xe0,0x54,0x8,0x78,0x3d,0xf6,0x78,0x3d,0xe6,0x75,0xf0,0x8,0x84,0xf6,0x78,0x65,0x76,0x2,0x7d,0x0,0x7e,0x0,0x7f,0x3d,
0x12,0x4,0x19,0x80,0x5,0x12,0x4,0x6c,0x80,0x0,0x2,0x9,0xf2,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,0x4,0x12,0x4,0x6c,0x22,
0x90,0xff,0x6,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x82,0xe0,0x44,0x8,0xf0,0x90,0xff,0x0,0xe0,
0x54,0x1f,0xff,0x12,0x0,0xb8,0x6,0xf3,0x0,0x6,0xf3,0x1,0x6,0x6d,0x2,0x6,0xf3,0x3,0x0,0x0,0x6,0xf3,0x90,0xff,0x2,
0xe0,0x60,0x3,0x2,0x6,0xea,0x90,0xff,0x4,0xe0,0x54,0xf,0x78,0x3a,0xf6,0x78,0x3a,0xe6,0x60,0x57,0x78,0x3a,0xe6,0xc3,0x94,
0x4,0x40,0x4,0x12,0x4,0x6c,0x22,0x78,0x3a,0x16,0x90,0xff,0x4,0xe0,0x54,0x80,0x60,0x20,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,
0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x48,0xf5,0x82,0xef,0x34,0xff,0xf5,0x83,0xe0,0x54,0xf7,0xf0,0x80,0x1e,
0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x8,0xf5,0x82,0xef,0x34,0xff,0xf5,
0x83,0xe0,0x54,0xf7,0xf0,0x80,0xd,0x90,0xff,0x80,0xe0,0x54,0xf7,0xf0,0xa3,0xa3,0xe0,0x54,0xf7,0xf0,0x80,0x4,0x12,0x4,0x6c,
0x22,0x12,0x4,0x5d,0x80,0x5,0x12,0x4,0x6c,0x80,0x0,0x2,0x9,0xf2,0x90,0xff,0x6,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,
0x4,0x6c,0x22,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x82,0xe0,0x44,0x8,0xf0,0x90,0xff,0x0,
0xe0,0x54,0x1f,0xff,0x12,0x0,0xb8,0x7,0xaa,0x0,0x7,0xaa,0x1,0x7,0x36,0x2,0x7,0xaa,0x3,0x0,0x0,0x7,0xaa,0x90,0xff,
0x2,0xe0,0x70,0x65,0x90,0xff,0x4,0xe0,0x54,0xf,0x78,0x3a,0xf6,0x78,0x3a,0xe6,0x60,0x55,0x78,0x3a,0xe6,0xc3,0x94,0x4,0x40,
0x4,0x12,0x4,0x6c,0x22,0x78,0x3a,0x16,0x90,0xff,0x4,0xe0,0x54,0x80,0x60,0x20,0x78,0x3a,0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,
0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x48,0xf5,0x82,0xef,0x34,0xff,0xf5,0x83,0xe0,0x44,0x8,0xf0,0x80,0x1e,0x78,0x3a,
0xe6,0xff,0x7e,0x0,0xee,0x7e,0x3,0xcf,0xc3,0x33,0xcf,0x33,0xde,0xf9,0xcf,0x24,0x8,0xf5,0x82,0xef,0x34,0xff,0xf5,0x83,0xe0,
0x44,0x8,0xf0,0x80,0x4,0x12,0x4,0x6c,0x22,0x12,0x4,0x5d,0x80,0x5,0x12,0x4,0x6c,0x80,0x0,0x2,0x9,0xf2,0x90,0xff,0x0,
0xe0,0x54,0x1f,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x6,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,
0x4,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x82,0xe0,0x44,
0x8,0xf0,0x90,0xff,0x2,0xe0,0x33,0x40,0xd,0x90,0xff,0x2,0xe0,0x90,0xff,0xff,0xf0,0x12,0x4,0x5d,0x80,0x3,0x12,0x4,0x6c,
0x2,0x9,0xf2,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,0x4,0x6c,0x22,0x78,0x40,0xe6,0x8,0x46,0x70,0x4,0x12,0x4,0x6c,
0x22,0x90,0xff,0x6,0xe0,0xff,0xa3,0xe0,0x4f,0x70,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x83,0xe4,0xf0,0x90,0xff,0x3,0xe0,0xff,
0x12,0x0,0xb8,0x8,0x48,0x1,0x8,0x57,0x2,0x8,0x66,0x3,0x8,0xaa,0x4,0x8,0xaa,0x5,0x0,0x0,0x8,0xaa,0x78,0x65,0x76,
0x12,0x7f,0x82,0x7e,0xfe,0x7d,0x1,0x12,0x4,0x19,0x80,0x57,0x78,0x65,0x76,0x20,0x7f,0x94,0x7e,0xfe,0x7d,0x1,0x12,0x4,0x19,
0x80,0x48,0x90,0xff,0x2,0xe0,0x14,0x70,0xf,0x78,0x65,0x76,0x1c,0x7d,0x2,0x7e,0x10,0x7f,0x1a,0x12,0x4,0x19,0x80,0x32,0x90,
0xff,0x2,0xe0,0x64,0x2,0x70,0xf,0x78,0x65,0x76,0x28,0x7d,0x2,0x7e,0x10,0x7f,0x36,0x12,0x4,0x19,0x80,0x1b,0x90,0xff,0x2,
0xe0,0x64,0x3,0x70,0x0,0x78,0x65,0x76,0x28,0x7d,0x2,0x7e,0x10,0x7f,0x36,0x12,0x4,0x19,0x80,0x4,0x12,0x4,0x6c,0x22,0x2,
0x9,0xf2,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,0x4,0x6c,0x22,0x78,0x40,0xe6,0x8,0x46,0x70,0x4,0x12,0x4,0x6c,0x22,
0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x2,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,
0xff,0x6,0xe0,0x14,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x83,0xe4,0xf0,0x78,0x65,0x76,0x1,0xfd,0xfe,
0x7f,0x67,0x12,0x4,0x19,0x2,0x9,0xf2,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,0x12,0x4,0x6c,0x22,0x78,0x41,0xe6,0x14,0x18,
0x46,0x70,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x7,0xe0,0x70,0x6,0x90,0xff,
0x6,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x82,0xe0,0x44,0x8,0xf0,0x90,0xff,0x2,0xe0,0xc3,0x94,0x2,0x40,0x4,0x12,
0x4,0x6c,0x22,0x90,0xff,0x2,0xe0,0x78,0x67,0xf6,0x12,0x4,0x5d,0x22,0x90,0xff,0x0,0xe0,0x54,0x1f,0x14,0x60,0x4,0x12,0x4,
0x6c,0x22,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x78,0x40,0xe6,0x8,0x46,0x70,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,
0x2,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x6,0xe0,0x14,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,
0x6c,0x22,0x90,0xff,0x83,0xe4,0xf0,0x78,0x65,0x76,0x1,0xfd,0xfe,0x7f,0x3d,0x12,0x4,0x19,0x80,0x4e,0x90,0xff,0x0,0xe0,0x54,
0x1f,0x14,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x4,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x78,0x41,0xe6,0x14,0x18,0x46,0x70,
0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x6,0xe0,0x70,0x4,0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x2,0xe0,0x70,0x4,
0xa3,0xe0,0x60,0x4,0x12,0x4,0x6c,0x22,0x90,0xff,0x82,0xe0,0x44,0x8,0xf0,0x12,0x4,0x5d,0x22,0x12,0x4,0x6c,0x22,0x2,0xa,
0xa5,0xef,0x64,0x20,0x70,0x3,0x2,0xa,0x8a,0xef,0x64,0x40,0x60,0x3,0x2,0xa,0xa1,0x90,0xff,0x0,0xe0,0x54,0x1f,0x60,0x4,
0x12,0x4,0x6c,0x22,0x90,0xff,0x1,0xe0,0xff,0x64,0x92,0x70,0x6c,0x90,0xff,0x4,0xe0,0xff,0x7e,0x0,0xa3,0xe0,0xfb,0x7a,0x0,
0x8b,0x2,0xe4,0x78,0x3c,0x2f,0xf6,0xee,0x3a,0x18,0xf6,0x7f,0x2,0x12,0x1,0x37,0x90,0xff,0x2,0xe0,0x54,0x80,0x60,0x7,0x7f,
0x1,0x12,0x1,0x22,0x80,0x5,0x7f,0x0,0x12,0x1,0x22,0x78,0x3c,0xe6,0x18,0x86,0x6,0x78,0x33,0xa6,0x6,0x8,0xf6,0x8,0x76,
0x0,0x8,0x76,0x1,0x8,0x76,0x0,0x8,0x76,0x0,0x8,0x76,0x3d,0x90,0xff,0x3,0xe0,0x54,0x7,0xff,0x12,0x1,0x8b,0xef,0x70,
0xf,0x78,0x65,0x76,0x1,0x7d,0x0,0x7e,0x0,0x7f,0x3d,0x12,0x4,0x19,0x80,0x3,0x12,0x4,0x6c,0x80,0x4,0x12,0x4,0x6c,0x22,
0x90,0xff,0x0,0xe0,0x64,0x21,0x70,0xd,0xa3,0xe0,0x70,0x9,0x90,0xff,0x82,0x74,0xa2,0xf0,0xa3,0xe4,0xf0,0x80,0x4,0x12,0x4,
0x6c,0x22,0x22,0x90,0xff,0xff,0xe4,0xf0,0x78,0x65,0x76,0xff,0x78,0x68,0xf6,0x8,0xf6,0x8,0xf6,0x78,0x67,0xf6,0x90,0xff,0x80,
0x74,0x84,0xf0,0xa3,0xa3,0xf0,0x90,0xff,0xfd,0x4,0xf0,0x90,0xff,0x9,0x74,0xb0,0xf0,0x90,0xff,0xd,0x74,0xb8,0xf0,0xa3,0xa3,
0x74,0x40,0xf0,0x90,0xff,0x8,0x74,0x84,0xf0,0x90,0xff,0x51,0x74,0xc0,0xf0,0x90,0xff,0x55,0x74,0xc8,0xf0,0xa3,0xa3,0x74,0x40,
0xf0,0x90,0xff,0x50,0x74,0x84,0xf0,0x90,0xff,0xa,0xe4,0xf0,0x90,0xff,0xe,0xf0,0x90,0xff,0x52,0x74,0x80,0xf0,0x90,0xff,0x56,
0xf0,0x22,0x90,0xff,0xfc,0xe4,0xf0,0x78,0x4c,0xf6,0x78,0x4c,0xe6,0xc3,0x94,0x12,0x50,0x22,0x78,0x4c,0xe6,0x24,0x8,0xf5,0x82,
0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0xff,0x78,0x4c,0xe6,0x24,0x82,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xef,0xf0,0x78,0x4c,0x6,
0x80,0xd6,0x78,0x4c,0x76,0x0,0x78,0x4c,0xe6,0xc3,0x94,0x20,0x50,0x22,0x78,0x4c,0xe6,0x24,0x5e,0xf5,0x82,0xe4,0x34,0x10,0xf5,
0x83,0xe4,0x93,0xff,0x78,0x4c,0xe6,0x24,0x94,0xf5,0x82,0xe4,0x34,0xfe,0xf5,0x83,0xef,0xf0,0x78,0x4c,0x6,0x80,0xd6,0x90,0xff,
0x8,0xe4,0xf0,0x7f,0x1,0x12,0x1,0x22,0x90,0xff,0x90,0xe0,0x44,0x80,0xf0,0x22,0x78,0x65,0x76,0xff,0x78,0x68,0xe4,0xf6,0x8,
0xf6,0x8,0xf6,0x12,0x4,0x7a,0x22,0x90,0xff,0x83,0xe4,0xf0,0x78,0x65,0xe6,0x4,0x70,0x9,0x90,0xff,0x80,0xe0,0x44,0x8,0xf0,
0x80,0x3,0x12,0x3,0x98,0x22,0x78,0x50,0x76,0x0,0x78,0x50,0xe6,0xc3,0x94,0x20,0x50,0x5b,0x78,0x50,0xe6,0x75,0xf0,0x8,0x84,
0x24,0x80,0xf5,0x82,0xe4,0x34,0xfd,0xf5,0x83,0xe0,0xff,0x78,0x50,0xe6,0x54,0x7,0xfb,0x74,0x1,0xb,0x80,0x2,0xc3,0x33,0xdb,
0xfc,0x5f,0x60,0x1a,0x78,0x31,0x76,0x1,0x78,0x50,0xe6,0x54,0x1f,0x24,0xbe,0xf5,0x82,0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0xff,
0x12,0xd,0xa8,0x80,0x18,0x78,0x31,0x76,0x0,0x78,0x50,0xe6,0x54,0x1f,0x24,0xbe,0xf5,0x82,0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,
0xff,0x12,0xd,0xa8,0x78,0x50,0x6,0x80,0x9d,0x90,0xff,0xa,0xe4,0xf0,0x90,0xff,0xe,0xf0,0x22,0xc0,0xd0,0xc0,0xe0,0xc0,0x83,
0xc0,0x82,0xc0,0xf0,0xc0,0x0,0xc0,0x1,0xc0,0x2,0xc0,0x3,0xc0,0x4,0xc0,0x5,0xc0,0x6,0xc0,0x7,0xc2,0xaf,0x90,0xff,0x92,
0xe0,0xff,0x12,0x0,0xb8,0xc,0x98,0x12,0xc,0xa9,0x14,0xc,0xa2,0x24,0xc,0xb0,0x26,0xc,0x68,0x30,0xc,0x78,0x32,0xc,0x88,
0x3c,0xc,0x5e,0x44,0xc,0x57,0x46,0x0,0x0,0xc,0xb7,0x90,0xff,0x92,0xe4,0xf0,0x80,0x5b,0x90,0xff,0x92,0xe4,0xf0,0x12,0xb,
0x8b,0x80,0x51,0x12,0xb,0x7b,0x90,0xff,0xfe,0x74,0x1,0xf0,0x90,0xff,0x92,0x14,0xf0,0x80,0x41,0x12,0xb,0x7b,0x90,0xff,0xfe,
0x74,0x4,0xf0,0x90,0xff,0x92,0xe4,0xf0,0x80,0x31,0x12,0xa,0xa6,0x90,0xff,0xfe,0x74,0x80,0xf0,0x90,0xff,0x92,0xe4,0xf0,0x80,
0x21,0x12,0xb,0xa3,0x90,0xff,0x92,0xe4,0xf0,0x80,0x17,0x90,0xff,0x92,0xe4,0xf0,0x80,0x10,0x90,0xff,0x92,0xe4,0xf0,0x80,0x9,
0x90,0xff,0x92,0xe4,0xf0,0x80,0x2,0x80,0x0,0xd2,0xaf,0xd0,0x7,0xd0,0x6,0xd0,0x5,0xd0,0x4,0xd0,0x3,0xd0,0x2,0xd0,0x1,
0xd0,0x0,0xd0,0xf0,0xd0,0x82,0xd0,0x83,0xd0,0xe0,0xd0,0xd0,0x32,0x78,0x57,0x76,0x0,0x78,0x58,0x76,0x0,0x78,0x59,0x76,0x0,
0x78,0x5a,0x76,0x0,0x78,0x4c,0x76,0x0,0x78,0x4c,0xe6,0xc3,0x94,0x8,0x50,0x53,0x78,0x4c,0xe6,0x54,0x7,0x44,0xf8,0xf5,0xb0,
0x78,0x4c,0xe6,0x54,0x7,0x44,0xf8,0xf5,0x90,0x78,0x4c,0xe6,0xc3,0x13,0x24,0x53,0xf8,0xe6,0xc3,0x13,0xc3,0x13,0xf6,0xe5,0xb0,
0x54,0xc0,0xff,0x78,0x4c,0xe6,0xc3,0x13,0x24,0x53,0xf8,0xe6,0x4f,0xf6,0x78,0x4c,0xe6,0xc3,0x13,0x24,0x53,0xf8,0xe6,0xc3,0x13,
0xc3,0x13,0xf6,0xe5,0x90,0x54,0xc0,0xff,0x78,0x4c,0xe6,0xc3,0x13,0x24,0x53,0xf8,0xe6,0x4f,0xf6,0x78,0x4c,0x6,0x80,0xa5,0x78,
0x4c,0x76,0x0,0x78,0x4c,0xe6,0xc3,0x94,0x20,0x50,0x56,0x78,0x4c,0xe6,0x75,0xf0,0x8,0x84,0x24,0x53,0xf8,0xe6,0xff,0x78,0x4c,
0xe6,0x54,0x7,0xfb,0x74,0x1,0xb,0x80,0x2,0xc3,0x33,0xdb,0xfc,0x5f,0x60,0x33,0x78,0x4c,0xe6,0x24,0x7e,0xf5,0x82,0xe4,0x34,
0x10,0xf5,0x83,0xe4,0x93,0x54,0x7,0xff,0x74,0x1,0xf,0x80,0x2,0xc3,0x33,0xdf,0xfc,0xff,0x78,0x4c,0xe6,0x24,0x7e,0xf5,0x82,
0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0x75,0xf0,0x8,0x84,0x24,0x57,0xf8,0xe6,0x4f,0xf6,0x78,0x4c,0x6,0x80,0xa2,0x22,0x78,0x30,
0xa6,0x7,0xef,0x54,0x7,0x44,0xf0,0x78,0x62,0xf6,0x78,0x31,0xe6,0x60,0x6,0x78,0x62,0xe6,0x44,0x8,0xf6,0x78,0x62,0x86,0xa0,
0x78,0x30,0xe6,0x54,0x18,0x70,0x8,0x78,0x62,0xe6,0x54,0xef,0x78,0x62,0xf6,0x78,0x30,0xe6,0x54,0x18,0x64,0x8,0x70,0x8,0x78,
0x62,0xe6,0x54,0xdf,0x78,0x62,0xf6,0x78,0x30,0xe6,0x54,0x18,0x64,0x10,0x70,0x8,0x78,0x62,0xe6,0x54,0xbf,0x78,0x62,0xf6,0x78,
0x30,0xe6,0x54,0x18,0x64,0x18,0x70,0x8,0x78,0x62,0xe6,0x54,0x7f,0x78,0x62,0xf6,0x78,0x62,0x86,0xa0,0x78,0x62,0xe6,0x44,0xf0,
0xf5,0xa0,0x22,0x78,0x4c,0xa6,0x7,0xef,0x54,0x7,0x44,0xf8,0xf5,0xb0,0xf5,0x90,0x78,0x4c,0xe6,0xc3,0x94,0x10,0x50,0x39,0x78,
0x4c,0xe6,0x54,0x7,0x44,0xe8,0x78,0x63,0xf6,0x78,0x4d,0xe6,0x60,0x6,0x78,0x63,0xe6,0x44,0x10,0xf6,0x78,0x4c,0xe6,0x54,0x8,
0x70,0x8,0x78,0x63,0xe6,0x54,0xf7,0xf6,0x80,0x8,0x78,0x63,0xe6,0x54,0xdf,0x78,0x63,0xf6,0x78,0x63,0x86,0xb0,0x78,0x63,0xe6,
0x44,0xe8,0xf5,0xb0,0x80,0x37,0x78,0x4c,0xe6,0x54,0x7,0x44,0xd8,0x78,0x61,0xf6,0x78,0x4d,0xe6,0x60,0x6,0x78,0x61,0xe6,0x44,
0x20,0xf6,0x78,0x4c,0xe6,0x54,0x8,0x70,0x8,0x78,0x61,0xe6,0x54,0xf7,0xf6,0x80,0x8,0x78,0x61,0xe6,0x54,0xef,0x78,0x61,0xf6,
0x78,0x61,0x86,0x90,0x78,0x61,0xe6,0x44,0xd8,0xf5,0x90,0x22,0x78,0x4c,0xe4,0xf6,0x8,0xf6,0xc3,0x78,0x4d,0xe6,0x94,0xff,0x18,
0xe6,0x94,0x3,0x50,0xa,0x78,0x4d,0x6,0xe6,0x18,0x70,0x1,0x6,0x80,0xea,0x22,0x75,0x89,0x20,0x43,0x87,0x80,0x75,0x8d,0xf3,
0x75,0x98,0x40,0xc2,0x99,0x75,0x99,0xaa,0xd2,0x8e,0x75,0x90,0xff,0x75,0xa0,0xff,0x75,0xb0,0xff,0x75,0x80,0xff,0x78,0x64,0x76,
0x1,0x78,0x51,0x76,0x0,0x12,0xb,0x9,0x12,0xa,0xa6,0x78,0x4e,0x76,0x0,0x78,0x4e,0xe6,0xc3,0x94,0x20,0x50,0x31,0x78,0x31,
0x76,0x0,0x78,0x4e,0xe6,0x24,0xbe,0xf5,0x82,0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0xff,0x12,0xd,0xa8,0x78,0x4d,0x76,0x0,0x78,
0x4e,0xe6,0x24,0x9e,0xf5,0x82,0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0xff,0x12,0xe,0x11,0x78,0x4e,0x6,0x80,0xc7,0xd2,0xaf,0xd2,
0xa8,0x90,0xff,0xfc,0xe0,0x44,0x80,0xf0,0x12,0xc,0xd6,0x78,0x4e,0x76,0x0,0x78,0x4e,0xe6,0xc3,0x94,0x20,0x50,0x51,0x78,0x4e,
0xe6,0x75,0xf0,0x8,0x84,0x24,0x57,0xf8,0xe6,0xff,0x78,0x4e,0xe6,0x54,0x7,0xfb,0x74,0x1,0xb,0x80,0x2,0xc3,0x33,0xdb,0xfc,
0x5f,0x60,0x18,0x78,0x4d,0x76,0x1,0x78,0x4e,0xe6,0x24,0x9e,0xf5,0x82,0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0xff,0x12,0xe,0x11,
0x80,0x16,0x78,0x4d,0x76,0x0,0x78,0x4e,0xe6,0x24,0x9e,0xf5,0x82,0xe4,0x34,0x10,0xf5,0x83,0xe4,0x93,0xff,0x12,0xe,0x11,0x78,
0x4e,0x6,0x80,0xa7,0x78,0x4e,0x76,0x0,0x78,0x4e,0xe6,0xc3,0x94,0x4,0x50,0x1b,0x78,0x4e,0xe6,0x24,0x57,0xf8,0xe6,0xff,0x78,
0x4e,0xe6,0x24,0x5b,0xf8,0xe6,0x6f,0x60,0x4,0x78,0x64,0x76,0x1,0x78,0x4e,0x6,0x80,0xdd,0x78,0x64,0xe6,0x14,0x70,0x4c,0x90,
0xff,0x52,0xe0,0x54,0x80,0x60,0x44,0x78,0x4e,0x76,0x0,0x78,0x4e,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,0x1d,0x1a,0x1b,0x1c,0x1f,0x18,0x1a,0x1e,0x18,0x1c,0x1b,0x1f,0x19,0x1d,0x1,0x0,0x13,0x14,
0x12,0x15,0x7,0x16,0xd,0x9,0xf,0xb,0xc,0x8,0xe,0xa,0x5,0x4,0x3,0x6,0x10,0x2,0x11,0x17,};
int SOFT_INTER_256_SIZE=3735;
const unsigned char SOFT_INTER_256[3735] = {0x94,
0xe, 0x3c, 0x2, 0x0, 0x6, 0x2, 0xb, 0xa3, 0x75, 0x81, 0x9f, 0x78, 0x9f, 0x76, 0x0, 0xd8, 0xfc, 0x90, 0x0, 0x0,
0xae, 0x83, 0xaf, 0x82, 0x90, 0x0, 0x0, 0x12, 0x0, 0x44, 0x60, 0x5, 0xe4, 0xf0, 0xa3, 0x80, 0xf6, 0x90, 0x0, 0xa2,
0x12, 0x0, 0x4d, 0x90, 0x0, 0xa6, 0x12, 0x0, 0x4d, 0x90, 0x0, 0xaa, 0x12, 0x0, 0x6b, 0x90, 0x0, 0xb0, 0x12, 0x0,
0x6b, 0x75, 0xd0, 0x0, 0x12, 0xd, 0x4e, 0x2, 0x0, 0xb6, 0xef, 0x65, 0x82, 0x70, 0x3, 0xee, 0x65, 0x83, 0x22, 0xe4,
0x93, 0xf8, 0x74, 0x1, 0x93, 0xf9, 0x74, 0x2, 0x93, 0xfe, 0x74, 0x3, 0x93, 0xf5, 0x82, 0x8e, 0x83, 0xe8, 0x69, 0x70,
0x1, 0x22, 0xe4, 0x93, 0xf6, 0xa3, 0x8, 0x80, 0xf4, 0xe4, 0x93, 0xfc, 0x74, 0x1, 0x93, 0xfd, 0x74, 0x2, 0x93, 0xfe,
0x74, 0x3, 0x93, 0xff, 0x74, 0x4, 0x93, 0xf8, 0x74, 0x5, 0x93, 0xf5, 0x82, 0x88, 0x83, 0x12, 0x0, 0x44, 0x70, 0x1,
0x22, 0xe4, 0x93, 0xa3, 0xa8, 0x83, 0xa9, 0x82, 0x8c, 0x83, 0x8d, 0x82, 0xf0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e0, 0x54, 0x20, 0x60, 0xa, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x7f, 0x1, 0x22, 0x80,
0xe2, 0x7f, 0x0, 0x22, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0x8, 0x64, 0x8, 0x60, 0x14, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0x20,
0x60, 0xa, 0x90, 0xff, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x7f, 0x1, 0x22, 0x80, 0xe2, 0x7f, 0x0, 0x22, 0x78, 0x32, 0xa6,
0x7, 0x90, 0xff, 0xf0, 0xe0, 0x54, 0xfc, 0xf0, 0x78, 0x35, 0xe6, 0x8, 0x46, 0x70, 0x3, 0x7f, 0x0, 0x22, 0x78, 0x54,
0xe6,...
[truncated message content] |
|
From: Jack S. <js...@us...> - 2002-12-16 04:54:59
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv13753/examples
Modified Files:
phidget_cpp.cc
Log Message:
TextLCD doesn't automatically turn on or off now. example program has more features and a few bug fixes
Index: phidget_cpp.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_cpp.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** phidget_cpp.cc 15 Dec 2002 23:41:55 -0000 1.11
--- phidget_cpp.cc 16 Dec 2002 04:54:56 -0000 1.12
***************
*** 334,360 ****
}
- void sendText(const string & parm)
- {
- CTextLCD text(workingUID);
-
- printf("Sending text to %s\n", parm.c_str());
-
- text.sendText(parm.c_str(),0,0);
-
- sleep(1);
- }
-
void help()
{
printf("Arguments:\n\n");
! printf(" -l (default) list all phidets \n");
! printf(" -u {UID} set the working UID\n");
! printf(" -q query the working UID\n");
! printf(" -h help\n");
! printf(" -p {percent} adjust the position of a servo referenced by UID\n");
! printf(" -t {string} send a string to a Text LCD phidget\n");
! printf(" -do {id} {on/off} turn digital output ID on or off\n");
! printf(" -di {id} read digital input ID\n");
! printf(" -ai {id} read analog input ID\n");
printf("\n");
}
--- 334,351 ----
}
void help()
{
printf("Arguments:\n\n");
! printf(" -l (default) list all phidets \n");
! printf(" -u {UID} set the working UID\n");
! printf(" -q query the working UID\n");
! printf(" -h help\n");
! printf(" -p {percent} adjust the position of a servo referenced by UID\n");
! printf(" -t {row} {col} {string} send a string to a Text LCD phidget\n");
! printf(" -do {id} {on/off} turn digital output ID on or off\n");
! printf(" -di {id} read digital input ID\n");
! printf(" -ai {id} read analog input ID\n");
! printf(" -ton text display on\n");
! printf(" -toff text display on\n");
printf("\n");
}
***************
*** 380,408 ****
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-q")
{
query();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-h")
{
help();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-l")
{
phidgets_ls();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-t")
{
! if (argn < 2)
! throw runtime_error("Expected argument after -t");
! string parm = argv[1];
! sendText(parm);
! return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-p")
{
if (argn < 2)
--- 371,420 ----
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-q") // query
{
query();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-h") // help
{
help();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-l") // list all phidgets
{
phidgets_ls();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-t") // Send text
{
! if (argn < 4)
! throw runtime_error("Expected arguments after -t");
! int row=atoi(argv[1]);
! int col=atoi(argv[2]);
! string parm = argv[3];
! {
! CTextLCD text(workingUID);
! text.sendText(parm.c_str(),row,col);
! }
! return (processArgs(argn - 4, argv + 4));
} else
! if (arg == "-ton")
! {
! {
! CTextLCD text(workingUID);
! text.on();
! }
! return (processArgs(argn - 1, argv + 1));
! } else
! if (arg == "-toff")
! {
! {
! CTextLCD text(workingUID);
! text.off();
! }
! return (processArgs(argn - 1, argv + 1));
! } else
! if (arg == "-p") // percentage to move servo
{
if (argn < 2)
***************
*** 413,417 ****
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-do")
{
if (argn < 3)
--- 425,429 ----
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-do") // digital output
{
if (argn < 3)
***************
*** 421,438 ****
string value= argv[2];
! CInterfaceKit kit(workingUID);
! CDigitalOut *out=kit.digitalOut(id);
! if (value=="on")
! out->value(true);
! else
! if (value=="off")
! out->value(false);
! else
! throw runtime_error("Invalid state to set output");
return (processArgs(argn - 3, argv + 3));
} else
! if (arg == "-di")
{
if (argn < 2)
--- 433,452 ----
string value= argv[2];
! {
! CInterfaceKit kit(workingUID);
! CDigitalOut *out=kit.digitalOut(id);
! if (value=="on")
! out->value(true);
! else
! if (value=="off")
! out->value(false);
! else
! throw runtime_error("Invalid state to set output");
! }
return (processArgs(argn - 3, argv + 3));
} else
! if (arg == "-di") // Digital input
{
if (argn < 2)
***************
*** 441,453 ****
int id= atoi(argv[1]);
! CInterfaceKit kit(workingUID);
! CDigitalIn *in=kit.digitalIn(id);
! kit.update();
! printf("Value:%d\n",in->value());
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-ai")
{
if (argn < 2)
--- 455,469 ----
int id= atoi(argv[1]);
! {
! CInterfaceKit kit(workingUID);
! CDigitalIn *in=kit.digitalIn(id);
! kit.update();
! printf("%d\n",in->value());
! }
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-ai") // analog input
{
if (argn < 2)
***************
*** 456,464 ****
int id= atoi(argv[1]);
! CInterfaceKit kit(workingUID);
! CAnalogIn *in=kit.analogIn(id);
! kit.update();
! printf("Value:%f\n",in->value());
return (processArgs(argn - 2, argv + 2));
--- 472,482 ----
int id= atoi(argv[1]);
! {
! CInterfaceKit kit(workingUID);
! CAnalogIn *in=kit.analogIn(id);
! kit.update();
! printf("%f\n",in->value());
! }
return (processArgs(argn - 2, argv + 2));
***************
*** 467,475 ****
throw runtime_error("Invalid argument:" + arg);
- /*
- printf(" -do {id} {on/off} turn digital output ID on or off\n");
- printf(" -di {id} read digital input ID\n");
- printf(" -ai {id} read analog input ID\n");
- */
}
--- 485,488 ----
***************
*** 484,496 ****
adjusted_version[strlen(revision)-11-2]=0;
- // What we are
- printf("phidgets: a command line interface utility\n");
-
- // Get the version number
- printf("Version %s\n",adjusted_version);
// No arguments
if (argn <= 1)
{
phidgets_ls();
return (0);
--- 497,510 ----
adjusted_version[strlen(revision)-11-2]=0;
// No arguments
if (argn <= 1)
{
+ // What we are
+ printf("phidgets: a command line interface utility\n");
+
+ // Get the version number
+ printf("Version %s\n",adjusted_version);
+
phidgets_ls();
return (0);
|
|
From: Jack S. <js...@us...> - 2002-12-16 04:54:59
|
Update of /cvsroot/libphidget/libphidget/src/phidget++
In directory sc8-pr-cvs1:/tmp/cvs-serv13753/phidget++
Modified Files:
CTextLCD.cc CTextLCD.h
Log Message:
TextLCD doesn't automatically turn on or off now. example program has more features and a few bug fixes
Index: CTextLCD.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CTextLCD.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CTextLCD.cc 15 Dec 2002 05:05:28 -0000 1.1
--- CTextLCD.cc 16 Dec 2002 04:54:56 -0000 1.2
***************
*** 22,26 ****
throw runtime_error("Can't initialize a CTextLCD with a phidget that is not a text lcd");
- phidgetTextLCDOn(device());
METHOD_UNGUARD;
--- 22,25 ----
***************
*** 30,34 ****
{
METHOD_GUARD;
- phidgetTextLCDOff(device());
METHOD_UNGUARD;
}
--- 29,32 ----
***************
*** 50,52 ****
--- 48,60 ----
{
error(phidgetTextLCDWrite(device(), row,col,text.c_str()));
+ }
+
+ void CTextLCD::on()
+ {
+ phidgetTextLCDOn(device());
+ }
+
+ void CTextLCD::off()
+ {
+ phidgetTextLCDOff(device());
}
Index: CTextLCD.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CTextLCD.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CTextLCD.h 15 Dec 2002 05:05:28 -0000 1.1
--- CTextLCD.h 16 Dec 2002 04:54:56 -0000 1.2
***************
*** 36,39 ****
--- 36,41 ----
}
void sendText(string text, int row, int col);
+ void on();
+ void off();
};
|
|
From: Jack S. <js...@us...> - 2002-12-15 23:41:58
|
Update of /cvsroot/libphidget/libphidget/src/phidget++
In directory sc8-pr-cvs1:/tmp/cvs-serv28636/phidget++
Modified Files:
CAnalogIn.h CDigitalIn.h CInterfaceKit.cc CInterfaceKit.h
CPhidgetManager.cc CUniqueDevice.cc
Log Message:
phidget_cpp now shows examples of digital IO and analog input. Digital IO and Analog input now work in phidget++. Renumbered the digital inputs in libphidget. Hope these are correct
Index: CAnalogIn.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CAnalogIn.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CAnalogIn.h 15 Dec 2002 20:40:11 -0000 1.5
--- CAnalogIn.h 15 Dec 2002 23:41:55 -0000 1.6
***************
*** 36,39 ****
--- 36,45 ----
CAnalogIn (CInterfaceKit *interfacekit, int id);
+ void setValue(float value)
+ {
+ _lastValue=_value;
+ _value=value;
+ }
+
public:
Index: CDigitalIn.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CDigitalIn.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CDigitalIn.h 15 Dec 2002 20:40:11 -0000 1.5
--- CDigitalIn.h 15 Dec 2002 23:41:55 -0000 1.6
***************
*** 27,31 ****
friend class CInterfaceKit;
! // This is the only real data for the servo
bool _value;
bool _lastValue;
--- 27,31 ----
friend class CInterfaceKit;
! // This is the only real data for the interface kit
bool _value;
bool _lastValue;
***************
*** 33,36 ****
--- 33,42 ----
CDigitalIn (CInterfaceKit *interfacekit, int id);
+ void setValue(bool value)
+ {
+ _lastValue=value;
+ _value=value;
+ }
+
public:
/**
***************
*** 45,49 ****
* value is only updates when CPhidgetManager->checkForEvents()
* is called.
! */ bool value() const
{
return (_value);
--- 51,56 ----
* value is only updates when CPhidgetManager->checkForEvents()
* is called.
! */
! bool value() const
{
return (_value);
***************
*** 51,56 ****
/**
! * No devices are contained in this device
! */ CDigitalIn *find(const CUID &uid)
{
return (NULL);
--- 58,64 ----
/**
! * No devices are contained in this device
! */
! CDigitalIn *find(const CUID &uid)
{
return (NULL);
Index: CInterfaceKit.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CInterfaceKit.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CInterfaceKit.cc 15 Dec 2002 20:40:11 -0000 1.6
--- CInterfaceKit.cc 15 Dec 2002 23:41:55 -0000 1.7
***************
*** 178,188 ****
void CInterfaceKit::update()
{
! // Do nothing, we can't test this yet
! //phidgetInterfaceKit488Write(_interfaceKit->device(),
! //int dout[_digitalOutCount];
! //for (int t=0;t<< _digitallOutCount;t++)
! //{
! //}
}
--- 178,216 ----
void CInterfaceKit::update()
{
! // Read from the device depending on the device
! if (classType() == LP_INTERFACE_KIT_488)
! {
! float analog[4];
! int digital[8];
! phidgetInterfaceKit488Read(device(),analog,digital);
!
! for (int t=0;t<_digitalInCount;t++)
! if (_digitalIns[t].second!=NULL)
! _digitalIns[t].second->setValue(digital[t]);
!
! for (int t=0;t<_analogInCount;t++)
! if (_analogIns[t].second!=NULL)
! _analogIns[t].second->setValue(analog[t]);
!
! return;
! }
!
! if (classType() == LP_INTERFACE_KIT_880)
! {
! float analog[8];
! int digital[8];
! phidgetInterfaceKit880Read(device(),analog,digital);
!
! for (int t=0;t<_digitalInCount;t++)
! if (_digitalIns[t].second!=NULL)
! _digitalIns[t].second->setValue(digital[t]);
!
! for (int t=0;t<_analogInCount;t++)
! if (_analogIns[t].second!=NULL)
! _analogIns[t].second->setValue(analog[t]);
!
! return;
! }
}
Index: CInterfaceKit.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CInterfaceKit.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CInterfaceKit.h 15 Dec 2002 20:40:11 -0000 1.5
--- CInterfaceKit.h 15 Dec 2002 23:41:55 -0000 1.6
***************
*** 71,77 ****
virtual ~CInterfaceKit ();
- /**
- * Resends servo information to the controller
- */
void update();
--- 71,74 ----
Index: CPhidgetManager.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CPhidgetManager.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** CPhidgetManager.cc 15 Dec 2002 20:40:11 -0000 1.11
--- CPhidgetManager.cc 15 Dec 2002 23:41:55 -0000 1.12
***************
*** 123,128 ****
tp == LP_PHIDGET ||
tp == LP_TEXT_LCD ||
! tp == LP_SERVO_CONTROLLER
! /*|| tp == LP_INTERFACE_KIT*/)
{
int phidget_count;
--- 123,130 ----
tp == LP_PHIDGET ||
tp == LP_TEXT_LCD ||
! tp == LP_SERVO_CONTROLLER ||
! tp == LP_INTERFACE_KIT_488 ||
! tp == LP_INTERFACE_KIT_880
! )
{
int phidget_count;
***************
*** 136,144 ****
(tp == LP_ALL) ||
(tp == LP_TEXT_LCD) ||
! (tp == LP_SERVO_CONTROLLER && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_SERVO_CONTROLLER) /*||
(tp == LP_INTERFACE_KIT && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_INTERFACE_KIT)*/ )
{
CUID temp_uid(error(phidgetSerial(phidgets[t])));
devices.insert(temp_uid);
}
--- 138,150 ----
(tp == LP_ALL) ||
(tp == LP_TEXT_LCD) ||
! (tp == LP_SERVO_CONTROLLER && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_SERVO_CONTROLLER) ||
! (tp == LP_INTERFACE_KIT_488) ||
! (tp == LP_INTERFACE_KIT_880)
! /*||
(tp == LP_INTERFACE_KIT && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_INTERFACE_KIT)*/ )
{
CUID temp_uid(error(phidgetSerial(phidgets[t])));
+ printf("found\n");
devices.insert(temp_uid);
}
***************
*** 147,151 ****
// Ask each known device if it knows about any devices that match the type we are searching for
! if (tp == LP_ALL || tp == LP_SERVO || tp == LP_DIGITAL_IN || tp == LP_DIGITAL_OUT || tp == LP_TEXT_LCD)
{
for (int t = 0; t < _uniqueDevices.size(); t++)
--- 153,157 ----
// Ask each known device if it knows about any devices that match the type we are searching for
! //if (tp == LP_ALL || tp == LP_SERVO || tp == LP_DIGITAL_IN || tp == LP_DIGITAL_OUT || tp == LP_TEXT_LCD)
{
for (int t = 0; t < _uniqueDevices.size(); t++)
Index: CUniqueDevice.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CUniqueDevice.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CUniqueDevice.cc 16 Sep 2002 06:43:33 -0000 1.5
--- CUniqueDevice.cc 15 Dec 2002 23:41:55 -0000 1.6
***************
*** 6,10 ****
{
METHOD_GUARD;
! CPhidgetManager::getInstance()->registerDevice(this);
METHOD_UNGUARD;
}
--- 6,10 ----
{
METHOD_GUARD;
! CPhidgetManager::getInstance()->registerDevice(this);
METHOD_UNGUARD;
}
***************
*** 13,17 ****
{
METHOD_GUARD;
! CPhidgetManager::getInstance()->unregisterDevice(this);
METHOD_UNGUARD;
}
--- 13,17 ----
{
METHOD_GUARD;
! CPhidgetManager::getInstance()->unregisterDevice(this);
METHOD_UNGUARD;
}
|
|
From: Jack S. <js...@us...> - 2002-12-15 23:41:58
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv28636/examples
Modified Files:
phidget_cpp.cc
Log Message:
phidget_cpp now shows examples of digital IO and analog input. Digital IO and Analog input now work in phidget++. Renumbered the digital inputs in libphidget. Hope these are correct
Index: phidget_cpp.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_cpp.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** phidget_cpp.cc 15 Dec 2002 22:55:24 -0000 1.10
--- phidget_cpp.cc 15 Dec 2002 23:41:55 -0000 1.11
***************
*** 433,436 ****
--- 433,466 ----
return (processArgs(argn - 3, argv + 3));
+ } else
+ if (arg == "-di")
+ {
+ if (argn < 2)
+ throw runtime_error("Need 1 argument for -di");
+
+ int id= atoi(argv[1]);
+
+ CInterfaceKit kit(workingUID);
+ CDigitalIn *in=kit.digitalIn(id);
+
+ kit.update();
+ printf("Value:%d\n",in->value());
+
+ return (processArgs(argn - 2, argv + 2));
+ } else
+ if (arg == "-ai")
+ {
+ if (argn < 2)
+ throw runtime_error("Need 1 argument for -ai");
+
+ int id= atoi(argv[1]);
+
+ CInterfaceKit kit(workingUID);
+ CAnalogIn *in=kit.analogIn(id);
+
+ kit.update();
+ printf("Value:%f\n",in->value());
+
+ return (processArgs(argn - 2, argv + 2));
}
|
|
From: Jack S. <js...@us...> - 2002-12-15 23:41:58
|
Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv28636/libphidget
Modified Files:
phidget.c
Log Message:
phidget_cpp now shows examples of digital IO and analog input. Digital IO and Analog input now work in phidget++. Renumbered the digital inputs in libphidget. Hope these are correct
Index: phidget.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** phidget.c 15 Dec 2002 22:55:25 -0000 1.24
--- phidget.c 15 Dec 2002 23:41:55 -0000 1.25
***************
*** 1389,1400 ****
return(_error(err));
! digital[0]=(buffer[0] & 1)==1;
! digital[1]=(buffer[0] & 2)==2;
! digital[2]=(buffer[0] & 4)==4;
! digital[3]=(buffer[0] & 8)==8;
! digital[4]=(buffer[0] & 16)==16;
! digital[5]=(buffer[0] & 32)==32;
! digital[6]=(buffer[0] & 64)==64;
! digital[7]=(buffer[0] & 128)==128;
analog[0]=((unsigned char)buffer[3]+((unsigned char)buffer[2] & 0x0f) * 256);
--- 1389,1400 ----
return(_error(err));
! digital[4]=!((buffer[0] & 1)==1);
! digital[5]=!((buffer[0] & 2)==2);
! digital[6]=!((buffer[0] & 4)==4);
! digital[7]=!((buffer[0] & 8)==8);
! digital[3]=!((buffer[0] & 16)==16);
! digital[2]=!((buffer[0] & 32)==32);
! digital[1]=!((buffer[0] & 64)==64);
! digital[0]=!((buffer[0] & 128)==128);
analog[0]=((unsigned char)buffer[3]+((unsigned char)buffer[2] & 0x0f) * 256);
***************
*** 1440,1447 ****
{
// Packet 0
! digital[0]=(buffer[0] & 16)==16;
! digital[1]=(buffer[0] & 32)==32;
! digital[2]=(buffer[0] & 64)==64;
! digital[3]=(buffer[0] & 128)==128;
analog[7]=((unsigned char)buffer[1]+((unsigned char)buffer[2] & 0x0f) * 256);
--- 1440,1447 ----
{
// Packet 0
! digital[4]=!((buffer[0] & 16)==16);
! digital[5]=!((buffer[0] & 32)==32);
! digital[6]=!((buffer[0] & 64)==64);
! digital[7]=!((buffer[0] & 128)==128);
analog[7]=((unsigned char)buffer[1]+((unsigned char)buffer[2] & 0x0f) * 256);
***************
*** 1453,1460 ****
{
// Packet 1
! digital[4]=(buffer[0] & 16)==16;
! digital[5]=(buffer[0] & 32)==32;
! digital[6]=(buffer[0] & 64)==64;
! digital[7]=(buffer[0] & 128)==128;
analog[3]=((unsigned char)buffer[1]+((unsigned char)buffer[2] & 0x0f) * 256);
--- 1453,1460 ----
{
// Packet 1
! digital[0]=!((buffer[0] & 16)==16);
! digital[1]=!((buffer[0] & 32)==32);
! digital[2]=!((buffer[0] & 64)==64);
! digital[3]=!((buffer[0] & 128)==128);
analog[3]=((unsigned char)buffer[1]+((unsigned char)buffer[2] & 0x0f) * 256);
|
|
From: Jack S. <js...@us...> - 2002-12-15 22:55:28
|
Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv15921/libphidget
Modified Files:
phidget.c phidget.h
Log Message:
Minor bug fix for interface kit in phidget++
Index: phidget.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** phidget.c 14 Dec 2002 23:38:13 -0000 1.23
--- phidget.c 15 Dec 2002 22:55:25 -0000 1.24
***************
*** 1409,1413 ****
* Helper function to turn the Text LCD on and configure it
*/
! enum ELPError phidgetInterfaceKit488Write(struct phidget *phidgetDevice, int index, int value)
{
char buffer[4];
--- 1409,1413 ----
* Helper function to turn the Text LCD on and configure it
*/
! enum ELPError phidgetInterfaceKitWrite(struct phidget *phidgetDevice, int index, int value)
{
char buffer[4];
Index: phidget.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** phidget.h 14 Dec 2002 23:38:13 -0000 1.15
--- phidget.h 15 Dec 2002 22:55:25 -0000 1.16
***************
*** 215,220 ****
enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice);
enum ELPError phidgetInterfaceKit488Read(struct phidget *phidgetDevice, float analog[4], int digital[8]);
- enum ELPError phidgetInterfaceKit488Write(struct phidget *phidgetDevice, int index, int value);
enum ELPError phidgetInterfaceKit880Read(struct phidget *phidgetDevice, float analog[8], int digital[8]);
enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str);
enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice);
--- 215,220 ----
enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice);
enum ELPError phidgetInterfaceKit488Read(struct phidget *phidgetDevice, float analog[4], int digital[8]);
enum ELPError phidgetInterfaceKit880Read(struct phidget *phidgetDevice, float analog[8], int digital[8]);
+ enum ELPError phidgetInterfaceKitWrite(struct phidget *phidgetDevice, int index, int value);
enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str);
enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice);
|
|
From: Jack S. <js...@us...> - 2002-12-15 22:55:28
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv15921/examples
Modified Files:
phidget_c.c phidget_cpp.cc
Log Message:
Minor bug fix for interface kit in phidget++
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** phidget_c.c 15 Dec 2002 20:40:10 -0000 1.16
--- phidget_c.c 15 Dec 2002 22:55:24 -0000 1.17
***************
*** 200,204 ****
{
printf("Turning output %d on\n",t+1);
! phidgetInterfaceKit488Write(dev,t,1);
sleep(1);
}
--- 200,204 ----
{
printf("Turning output %d on\n",t+1);
! phidgetInterfaceKitWrite(dev,t,1);
sleep(1);
}
***************
*** 206,210 ****
{
printf("Turning output %d off\n",t+1);
! phidgetInterfaceKit488Write(dev,t,0);
}
printf("Finished\n");
--- 206,210 ----
{
printf("Turning output %d off\n",t+1);
! phidgetInterfaceKitWrite(dev,t,0);
}
printf("Finished\n");
Index: phidget_cpp.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_cpp.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** phidget_cpp.cc 15 Dec 2002 20:40:11 -0000 1.9
--- phidget_cpp.cc 15 Dec 2002 22:55:24 -0000 1.10
***************
*** 425,436 ****
if (value=="on")
- {
out->value(true);
- }
else
if (value=="off")
- {
out->value(false);
- }
else
throw runtime_error("Invalid state to set output");
--- 425,432 ----
|
|
From: Jack S. <js...@us...> - 2002-12-15 22:55:28
|
Update of /cvsroot/libphidget/libphidget/src/phidget++
In directory sc8-pr-cvs1:/tmp/cvs-serv15921/phidget++
Modified Files:
CDigitalOut.cc
Log Message:
Minor bug fix for interface kit in phidget++
Index: CDigitalOut.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CDigitalOut.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CDigitalOut.cc 15 Dec 2002 20:40:11 -0000 1.6
--- CDigitalOut.cc 15 Dec 2002 22:55:25 -0000 1.7
***************
*** 23,29 ****
_value = val;
if (_value)
! phidgetInterfaceKit488Write(_interfaceKit->device(),UID().id(),true);
else
! phidgetInterfaceKit488Write(_interfaceKit->device(),UID().id(),false);
}
--- 23,31 ----
_value = val;
+ int temp=_interfaceKit->getDigitalInCount();
+
if (_value)
! phidgetInterfaceKitWrite(_interfaceKit->device(),UID().id()-temp,true);
else
! phidgetInterfaceKitWrite(_interfaceKit->device(),UID().id()-temp,false);
}
|
|
From: Jack S. <js...@us...> - 2002-12-15 20:40:16
|
Update of /cvsroot/libphidget/libphidget/src/phidget++
In directory sc8-pr-cvs1:/tmp/cvs-serv825/phidget++
Modified Files:
CAnalogIn.cc CAnalogIn.h CDigitalIn.cc CDigitalIn.h
CDigitalOut.cc CDigitalOut.h CInterfaceKit.cc CInterfaceKit.h
CPhidget.h CPhidgetManager.cc CServo.cc CServo.h
CServoController.h CUID.h CUniqueDevice.h Makefile.am
Log Message:
Starting to re-add the interface kit to phidget++
Index: CAnalogIn.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CAnalogIn.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CAnalogIn.cc 14 Sep 2002 01:51:31 -0000 1.5
--- CAnalogIn.cc 15 Dec 2002 20:40:11 -0000 1.6
***************
*** 8,19 ****
*/
- /*
#include "CAnalogIn.h"
#include "CInterfaceKit.h"
! CAnalogIn::CAnalogIn (CInterfaceKit *interfacekit, int id):CUniqueDevice (interfacekit, id),
! _interfaceKit(interfacekit), _value(0),
! _lastValue(0)
{
}
- */
--- 8,17 ----
*/
#include "CAnalogIn.h"
#include "CInterfaceKit.h"
! CAnalogIn::CAnalogIn (CInterfaceKit *interfacekit, int id) : CUniqueDevice (interfacekit, id),
! _interfaceKit(interfacekit), _value(0),
! _lastValue(0)
{
}
Index: CAnalogIn.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CAnalogIn.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CAnalogIn.h 12 Sep 2002 00:24:29 -0000 1.4
--- CAnalogIn.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 22,61 ****
* is when the CPhidgetManager function is called.
*/
! class CAnalogIn:CUniqueDevice
{
! private:
! friend class CInterfaceKit;
! CInterfaceKit *_interfaceKit;
! // This is the only real data for the servo
! float _value;
! float _lastValue;
! CAnalogIn (CInterfaceKit *interfacekit, int id);
! public:
/**
! * Empty virtual constructor
! */
! virtual ~ CAnalogIn ()
! {
! }
/**
* Return the current value of the analog input, this
* value is only updates when CPhidgetManager->checkForEvents()
* is called.
! */ float value() const
! {
! return (_value);
! }
/**
* No devices are contained in this device
! */ CAnalogIn *find(const CUID &uid)
! {
! return (NULL);
! }
};
--- 22,65 ----
* is when the CPhidgetManager function is called.
*/
! class CAnalogIn : CUniqueDevice
{
! private:
! friend class CInterfaceKit;
! CInterfaceKit *_interfaceKit;
! // This is the only real data for the servo
! float _value;
! float _lastValue;
! CAnalogIn (CInterfaceKit *interfacekit, int id);
! public:
/**
! * Empty virtual constructor
! */
! virtual ~ CAnalogIn ()
! {
! }
!
/**
* Return the current value of the analog input, this
* value is only updates when CPhidgetManager->checkForEvents()
* is called.
! */
! float value() const
! {
! return (_value);
! }
!
/**
* No devices are contained in this device
! */
! CAnalogIn *find(const CUID &uid)
! {
! return (NULL);
! }
};
Index: CDigitalIn.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CDigitalIn.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CDigitalIn.cc 14 Sep 2002 01:51:31 -0000 1.5
--- CDigitalIn.cc 15 Dec 2002 20:40:11 -0000 1.6
***************
*** 8,18 ****
*/
- /*
#include "CDigitalIn.h"
#include "CInterfaceKit.h"
! CDigitalIn::CDigitalIn (CInterfaceKit *interfacekit, int id):CUniqueDevice (interfacekit, id), _value(false),
! _lastValue(false)
{
}
- */
--- 8,18 ----
*/
#include "CDigitalIn.h"
#include "CInterfaceKit.h"
! CDigitalIn::CDigitalIn (CInterfaceKit *interfacekit, int id) :
! CUniqueDevice (interfacekit, id),
! _value(false),
! _lastValue(false)
{
}
Index: CDigitalIn.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CDigitalIn.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CDigitalIn.h 12 Sep 2002 00:24:29 -0000 1.4
--- CDigitalIn.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 24,58 ****
class CDigitalIn:public CUniqueDevice
{
! private:
! friend class CInterfaceKit;
!
! // This is the only real data for the servo
! bool _value;
! bool _lastValue;
! CDigitalIn (CInterfaceKit *interfacekit, int id);
! public:
/**
! * Standard virtual destructor
! */
! virtual ~ CDigitalIn ()
! {
! }
/**
! * Return the current value of the digital input, this
! * value is only updates when CPhidgetManager->checkForEvents()
! * is called.
! */ bool value() const
! {
! return (_value);
! }
/**
! * No devices are contained in this device
! */ CDigitalIn *find(const CUID &uid)
! {
! return (NULL);
! }
};
--- 24,59 ----
class CDigitalIn:public CUniqueDevice
{
! private:
! friend class CInterfaceKit;
+ // This is the only real data for the servo
+ bool _value;
+ bool _lastValue;
! CDigitalIn (CInterfaceKit *interfacekit, int id);
! public:
/**
! * Standard virtual destructor
! */
! virtual ~ CDigitalIn ()
! {
! }
!
/**
! * Return the current value of the digital input, this
! * value is only updates when CPhidgetManager->checkForEvents()
! * is called.
! */ bool value() const
! {
! return (_value);
! }
!
/**
! * No devices are contained in this device
! */ CDigitalIn *find(const CUID &uid)
! {
! return (NULL);
! }
};
Index: CDigitalOut.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CDigitalOut.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CDigitalOut.cc 14 Sep 2002 01:51:31 -0000 1.5
--- CDigitalOut.cc 15 Dec 2002 20:40:11 -0000 1.6
***************
*** 8,17 ****
*/
- /*
#include "CDigitalOut.h"
#include "CInterfaceKit.h"
! CDigitalOut::CDigitalOut (CInterfaceKit *interfacekit, int id):CUniqueDevice (interfacekit, id),
! _value(false)
{
}
--- 8,19 ----
*/
#include "CDigitalOut.h"
#include "CInterfaceKit.h"
! CDigitalOut::CDigitalOut (CInterfaceKit *interfaceKit, int id) :
! CUniqueDevice (interfaceKit, id),
! _interfaceKit(interfaceKit),
! _value(false),
! _systemManaged(true)
{
}
***************
*** 21,31 ****
_value = val;
! // Tell the interface kit our value has changed, so it
! // sends it to the servo immediately
! CUniqueDevice *temp1 = parent();
!
! CInterfaceKit *temp2 = dynamic_cast < CInterfaceKit *>(temp1);
!
! temp2->update();
}
- */
--- 23,29 ----
_value = val;
! if (_value)
! phidgetInterfaceKit488Write(_interfaceKit->device(),UID().id(),true);
! else
! phidgetInterfaceKit488Write(_interfaceKit->device(),UID().id(),false);
}
Index: CDigitalOut.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CDigitalOut.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CDigitalOut.h 12 Sep 2002 00:24:29 -0000 1.4
--- CDigitalOut.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 24,56 ****
class CDigitalOut:CUniqueDevice
{
! private:
friend class CInterfaceKit;
! CInterfaceKit *_interfaceKit;
! // This is the only real data for the servo
! bool _value;
! CDigitalOut (CInterfaceKit *interfacekit, int id);
! public:
/**
* Standard empty virtual destructor
*/
! virtual ~ CDigitalOut ()
! {
! }
/**
* Sends a value to the interface kit
! */ void value(bool val);
/**
* No devices are contained in this device
*/
! CDigitalOut *find(const CUID &uid)
! {
! return (NULL);
! }
};
--- 24,59 ----
class CDigitalOut:CUniqueDevice
{
! private:
friend class CInterfaceKit;
! CInterfaceKit *_interfaceKit;
! // This is the only real data for the servo
! bool _value;
! bool _systemManaged;
! CDigitalOut (CInterfaceKit *interfacekit, int id);
! public:
/**
* Standard empty virtual destructor
*/
! virtual ~CDigitalOut ()
! {
! }
!
/**
* Sends a value to the interface kit
! */
! void value(bool val);
/**
* No devices are contained in this device
*/
! CDigitalOut *find(const CUID &uid)
! {
! return (NULL);
! }
};
Index: CInterfaceKit.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CInterfaceKit.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CInterfaceKit.cc 14 Sep 2002 01:51:31 -0000 1.5
--- CInterfaceKit.cc 15 Dec 2002 20:40:11 -0000 1.6
***************
*** 8,12 ****
*/
- /*
#include "CInterfaceKit.h"
#include "CDigitalIn.h"
--- 8,11 ----
***************
*** 16,128 ****
#include <stdexcept>
#include <phidget.h>
! CInterfaceKit::CInterfaceKit (phidget *device):CPhidget (device)
{
! if (classType() != INTERFACE_KIT)
! throw runtime_error("Can't initialize a CInterfaceKit with a phidget that is not an interface kit");
! switch (productID()) {
! default:
{
! char temp[128];
! sprintf(temp, "Unknown type of interface kit Vendor ID:0x0%x Product ID:0x0%x\n", vendorID(), productID());
! throw runtime_error(temp);
}
- }
}
void CInterfaceKit::setDigitalInCount(int num)
{
! if (_digitalIns.size() != 0)
! throw runtime_error("You can only call this function once");
! for (int t = 0; t < num; t++)
! _digitalIns.push_back(new CDigitalIn (this, t));
}
void CInterfaceKit::setDigitalOutCount(int num)
{
! if (_digitalOuts.size() != 0)
! throw runtime_error("You can only call this function once");
! for (int t = 0; t < num; t++)
! _digitalOuts.push_back(new CDigitalOut (this, t));
}
void CInterfaceKit::setAnalogInCount(int num)
{
! if (_analogIns.size() != 0)
! throw runtime_error("You can only call this function once");
! for (int t = 0; t < num; t++)
! _analogIns.push_back(new CAnalogIn (this, t));
}
! CInterfaceKit::CInterfaceKit (CInterfaceKit *orig):CPhidget (orig)
{
! for (int t = 0; t < orig->_digitalIns.size(); t++)
! _digitalIns.push_back(new CDigitalIn (this, t));
! for (int t = 0; t < orig->_digitalOuts.size(); t++)
! _digitalOuts.push_back(new CDigitalOut (this, t));
! for (int t = 0; t < orig->_analogIns.size(); t++)
! _analogIns.push_back(new CAnalogIn (this, t));
}
CInterfaceKit::~CInterfaceKit ()
{
! for (int t = 0; t < _digitalIns.size(); t++)
! delete _digitalIns[t];
! for (int t = 0; t < _digitalOuts.size(); t++)
! delete _digitalOuts[t];
! for (int t = 0; t < _analogIns.size(); t++)
! delete _analogIns[t];
}
void CInterfaceKit::update()
{
! // Do nothing, we can't test this yet
}
const vector <CDigitalIn *>&CInterfaceKit::digitalIns() const
{
! return (_digitalIns);
}
const vector <CDigitalOut *>&CInterfaceKit::digitalOuts() const
{
! return (_digitalOuts);
}
const vector <CAnalogIn *>&CInterfaceKit::analogIns() const
{
! return (_analogIns);
}
! CUniqueDevice *CInterfaceKit::find(const CUID &uid)
{
! CUniqueDevice *temp;
! for (int t = 0; t < _digitalIns.size(); t++) {
! temp = _digitalIns[t]->find(uid);
! if (temp != NULL)
! return (temp);
! }
! for (int t = 0; t < _digitalOuts.size(); t++) {
! temp = _digitalOuts[t]->find(uid);
! if (temp != NULL)
! return (temp);
! }
! for (int t = 0; t < _analogIns.size(); t++) {
! temp = _analogIns[t]->find(uid);
! if (temp != NULL)
! return (temp);
! }
! return (NULL);
}
- */
--- 15,296 ----
#include <stdexcept>
#include <phidget.h>
+ #include "helper.h"
! //CInterfaceKit::CInterfaceKit (phidget *device) :
! //CPhidget (device)
! CInterfaceKit::CInterfaceKit (const CUID &uid) :
! CPhidget (uid)
{
! //if (classType() != INTERFACE_KIT)
! //throw runtime_error("Can't initialize a CInterfaceKit with a phidget that is not an interface kit");
! if (classType() == LP_INTERFACE_KIT_488)
{
! setAnalogInCount(4);
! setDigitalInCount(8);
! setDigitalOutCount(8);
! return;
! }
! if (classType() == LP_INTERFACE_KIT_880)
! {
! setAnalogInCount(8);
! setDigitalInCount(8);
! setDigitalOutCount(0);
! return;
! }
!
!
!
! switch (productID())
! {
! default:
! {
! char temp[128];
!
! sprintf(temp, "Unknown type of interface kit Vendor ID:0x0%x Product ID:0x0%x\n", vendorID(), productID());
! throw runtime_error(temp);
! }
}
}
+ /*
void CInterfaceKit::setDigitalInCount(int num)
{
! if (_digitalIns.size() != 0)
! throw runtime_error("You can only call this function once");
! for (int t = 0; t < num; t++)
! _digitalIns.push_back(new CDigitalIn (this, t));
}
+ */
+ void CInterfaceKit::setDigitalInCount(int num)
+ {
+ METHOD_GUARD;
+ _digitalInCount = num;
+ _digitalIns = new pair < bool, CDigitalIn *>[_digitalInCount];
+
+ for (int t = 0; t < _digitalInCount; t++)
+ {
+ _digitalIns[t].first = true;
+ _digitalIns[t].second = NULL;
+ }
+
+ METHOD_UNGUARD;
+ }
+
+ /*
void CInterfaceKit::setDigitalOutCount(int num)
{
! if (_digitalOuts.size() != 0)
! throw runtime_error("You can only call this function once");
! for (int t = 0; t < num; t++)
! _digitalOuts.push_back(new CDigitalOut (this, t));
! }
! */
! void CInterfaceKit::setDigitalOutCount(int num)
! {
! METHOD_GUARD;
! _digitalOutCount = num;
!
! _digitalOuts = new pair < bool, CDigitalOut *>[_digitalOutCount];
!
! for (int t = 0; t < _digitalOutCount; t++)
! {
! _digitalOuts[t].first = true;
! _digitalOuts[t].second = NULL;
! }
!
! METHOD_UNGUARD;
}
+ /*
void CInterfaceKit::setAnalogInCount(int num)
{
! if (_analogIns.size() != 0)
! throw runtime_error("You can only call this function once");
! for (int t = 0; t < num; t++)
! _analogIns.push_back(new CAnalogIn (this, t));
}
+ */
+ void CInterfaceKit::setAnalogInCount(int num)
+ {
+ METHOD_GUARD;
+ _analogInCount = num;
! _analogIns = new pair < bool, CAnalogIn *>[_analogInCount];
!
! for (int t = 0; t < _analogInCount; t++)
! {
! _analogIns[t].first = true;
! _analogIns[t].second = NULL;
! }
!
! METHOD_UNGUARD;
! }
!
! /*
! CInterfaceKit::CInterfaceKit (CInterfaceKit *orig) : CPhidget (orig)
{
! for (int t = 0; t < orig->_digitalIns.size(); t++)
! _digitalIns.push_back(new CDigitalIn (this, t));
!
! for (int t = 0; t < orig->_digitalOuts.size(); t++)
! _digitalOuts.push_back(new CDigitalOut (this, t));
!
! for (int t = 0; t < orig->_analogIns.size(); t++)
! _analogIns.push_back(new CAnalogIn (this, t));
}
+ */
CInterfaceKit::~CInterfaceKit ()
{
! /*
! for (int t = 0; t < _digitalIns.size(); t++)
! delete _digitalIns[t];
! for (int t = 0; t < _digitalOuts.size(); t++)
! delete _digitalOuts[t];
! for (int t = 0; t < _analogIns.size(); t++)
! delete _analogIns[t];
! */
!
! for (int t = 0; t < _digitalInCount; t++)
! if (_digitalIns[t].first)
! delete _digitalIns[t].second;
! delete[] _digitalIns;
!
! for (int t = 0; t < _digitalOutCount; t++)
! if (_digitalOuts[t].first)
! delete _digitalOuts[t].second;
! delete[] _digitalOuts;
!
! for (int t = 0; t < _analogInCount; t++)
! if (_analogIns[t].first)
! delete _analogIns[t].second;
! delete[] _analogIns;
}
void CInterfaceKit::update()
{
! // Do nothing, we can't test this yet
! //phidgetInterfaceKit488Write(_interfaceKit->device(),
!
! //int dout[_digitalOutCount];
! //for (int t=0;t<< _digitallOutCount;t++)
! //{
! //}
}
+ /*
const vector <CDigitalIn *>&CInterfaceKit::digitalIns() const
{
! return (_digitalIns);
}
+ */
+ CDigitalIn *CInterfaceKit::digitalIn(const int id, bool create)
+ {
+ METHOD_GUARD;
+ if (id < 0 || id >= _digitalInCount)
+ throw runtime_error("Invalid digital in id");
+
+ if (create && _digitalIns[id].second == NULL)
+ {
+ _digitalIns[id].first = true;
+ _digitalIns[id].second = new CDigitalIn(this, id);
+ }
+ return (_digitalIns[id].second);
+ METHOD_UNGUARD;
+ }
+
+ /*
const vector <CDigitalOut *>&CInterfaceKit::digitalOuts() const
{
! return (_digitalOuts);
}
+ */
+ CDigitalOut *CInterfaceKit::digitalOut(const int id, bool create)
+ {
+ METHOD_GUARD;
+ if (id < 0 || id >= _digitalOutCount)
+ throw runtime_error("Invalid digital out id");
+ if (create && _digitalOuts[id].second == NULL)
+ {
+ _digitalOuts[id].first = true;
+ _digitalOuts[id].second = new CDigitalOut(this, id+_digitalInCount);
+ }
+
+ return (_digitalOuts[id].second);
+ METHOD_UNGUARD;
+ }
+
+ /*
const vector <CAnalogIn *>&CInterfaceKit::analogIns() const
{
! return (_analogIns);
}
+ */
+ CAnalogIn *CInterfaceKit::analogIn(const int id, bool create)
+ {
+ METHOD_GUARD;
+ if (id < 0 || id >= _analogInCount)
+ throw runtime_error("Invalid servo id");
! if (create && _analogIns[id].second == NULL)
! {
! _analogIns[id].first = true;
! _analogIns[id].second = new CAnalogIn(this, id+_digitalInCount+_digitalOutCount);
! }
!
! return (_analogIns[id].second);
! METHOD_UNGUARD;
! }
!
! CUniqueDevice *CInterfaceKit::find(const CUID &uid, bool create)
{
! METHOD_GUARD;
! CUniqueDevice *temp;
! if (uid.serial() == UID().serial() && uid.id() >= 0 && uid.id() < _digitalInCount)
! return (digitalIn(uid.id(), create));
! if (uid.serial() == UID().serial() && uid.id() >= _digitalInCount && uid.id() < (_digitalInCount+_digitalOutCount))
! return (digitalOut(uid.id()-_digitalInCount, create));
! if (uid.serial() == UID().serial() && uid.id() >= (_digitalInCount+_digitalOutCount) && uid.id() < (_digitalInCount+_digitalOutCount+_analogInCount))
! return (analogIn(uid.id()-_digitalInCount-_digitalOutCount, create));
! return (CPhidget::find(uid));
!
! /*
! for (int t = 0; t < _digitalIns.size(); t++)
! {
! temp = _digitalIns[t]->find(uid);
! if (temp != NULL)
! return (temp);
! }
!
! for (int t = 0; t < _digitalOuts.size(); t++)
! {
! temp = _digitalOuts[t]->find(uid);
! if (temp != NULL)
! return (temp);
! }
!
! for (int t = 0; t < _analogIns.size(); t++)
! {
! temp = _analogIns[t]->find(uid);
! if (temp != NULL)
! return (temp);
! }
!
! return (NULL);
! */
! METHOD_UNGUARD;
}
Index: CInterfaceKit.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CInterfaceKit.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CInterfaceKit.h 12 Sep 2002 00:24:29 -0000 1.4
--- CInterfaceKit.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 26,43 ****
class CInterfaceKit:public CPhidget
{
! private:
friend class CPhidgetManager;
! vector <CDigitalIn *>_digitalIns;
! vector <CDigitalOut *>_digitalOuts;
! vector <CAnalogIn *>_analogIns;
! void setDigitalInCount(int num);
! void setDigitalOutCount(int num);
! void setAnalogInCount(int num);
- CInterfaceKit (phidget *device);
! public:
/**
* Constructor to be used when a user derives from this phidget, the user must
--- 26,60 ----
class CInterfaceKit:public CPhidget
{
! private:
friend class CPhidgetManager;
+ friend class CDigitalIn;
+ friend class CDigitalOut;
+ friend class CAnalogIn;
! int _digitalInCount;
! int _digitalOutCount;
! int _analogInCount;
! pair < bool, CDigitalIn *> *_digitalIns;
! pair < bool, CDigitalOut *> *_digitalOuts;
! pair < bool, CAnalogIn *> *_analogIns;
! //vector <CDigitalIn *>_digitalIns;
! //vector <CDigitalOut *>_digitalOuts;
! //vector <CAnalogIn *>_analogIns;
!
! void setDigitalInCount(int num);
! void setDigitalOutCount(int num);
! void setAnalogInCount(int num);
!
! CInterfaceKit(phidget *device);
!
! public:
!
! int getDigitalInCount() const {return(_digitalInCount);}
! int getDigitalOutCount() const {return(_digitalOutCount);}
! int getAnalogInCount() const {return(_analogInCount);}
!
/**
* Constructor to be used when a user derives from this phidget, the user must
***************
*** 45,49 ****
* pass it to this constructor, in the constructor of his derived type.
*/
! CInterfaceKit (CInterfaceKit *orig);
/**
--- 62,67 ----
* pass it to this constructor, in the constructor of his derived type.
*/
! //CInterfaceKit(CInterfaceKit *orig);
! CInterfaceKit(const CUID &uid);
/**
***************
*** 51,80 ****
* back into the manager and notify it of the current state of the device
*/
! virtual ~ CInterfaceKit ();
/**
* Resends servo information to the controller
*/
! void update();
/**
* Returns a vector of digital in's that are controlled by this object
*/
! const vector <CDigitalIn *>&digitalIns() const;
/**
* Returns a vector of digital out's that are controlled by this object
*/
! const vector <CDigitalOut *>&digitalOuts() const;
/**
* Returns a vector of analog in's that are controlled by this object
*/
! const vector <CAnalogIn *>&analogIns() const;
/**
*
*/
! CUniqueDevice *find(const CUID &uid);
};
--- 69,102 ----
* back into the manager and notify it of the current state of the device
*/
! virtual ~CInterfaceKit ();
/**
* Resends servo information to the controller
*/
! void update();
/**
* Returns a vector of digital in's that are controlled by this object
*/
! //const vector <CDigitalIn *>&digitalIns() const;
/**
* Returns a vector of digital out's that are controlled by this object
*/
! //const vector <CDigitalOut *>&digitalOuts() const;
/**
* Returns a vector of analog in's that are controlled by this object
*/
! //const vector <CAnalogIn *>&analogIns() const;
/**
*
*/
! CUniqueDevice *find(const CUID &uid, bool create);
!
! CDigitalIn *digitalIn(const int id, bool create=true);
! CDigitalOut *digitalOut(const int id, bool create=true);
! CAnalogIn *analogIn(const int id, bool create=true);
};
Index: CPhidget.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CPhidget.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** CPhidget.h 16 Sep 2002 06:43:33 -0000 1.5
--- CPhidget.h 15 Dec 2002 20:40:11 -0000 1.6
***************
*** 22,36 ****
class CPhidget:public CUniqueDevice
{
! private:
! //bool _last_wasAttached;
! //bool _userConstructed;
! //CPhidget *_replace;
! struct phidget *_device;
! // Some friends of phidget
! friend class CServoController;
! friend class CInterfaceKit;
/**
--- 22,36 ----
class CPhidget:public CUniqueDevice
{
! private:
! //bool _last_wasAttached;
! //bool _userConstructed;
! //CPhidget *_replace;
! struct phidget *_device;
! // Some friends of phidget
! friend class CServoController;
! friend class CInterfaceKit;
/**
***************
*** 38,63 ****
* derives from CPhidget (ex. CServoController)
*/
! CPhidget (phidget *device /*!< The libphidget phidget device handle */ );
! protected:
! friend class CPhidgetManager;
/**
* The device that this CPhidget uses
*/
! struct phidget *device()
! {
! return (_device);
! }
/**
* This checks to see if the device status has change. In the case of the base phidget
* it checks if it is attached/detached. If a derived phidget overrides this method
* it must call the base class method.
! */ virtual void processEvents();
/**
* Was this phidget constructed by a user
*/
! //bool userConstructed() const {return(_userConstructed);}
/**
--- 38,65 ----
* derives from CPhidget (ex. CServoController)
*/
! CPhidget (phidget *device /*!< The libphidget phidget device handle */ );
! protected:
! friend class CPhidgetManager;
/**
* The device that this CPhidget uses
*/
! struct phidget *device()
! {
! return (_device);
! }
!
/**
* This checks to see if the device status has change. In the case of the base phidget
* it checks if it is attached/detached. If a derived phidget overrides this method
* it must call the base class method.
! */
! virtual void processEvents();
/**
* Was this phidget constructed by a user
*/
! //bool userConstructed() const {return(_userConstructed);}
/**
***************
*** 65,89 ****
* this will return NULL.
*/
! //CPhidget *getReplacement() {return(_replace);}
! public:
! //CPhidget(CPhidget *orig /*!< The \a CPhidget that we are replacing */); //!< Users can create phidgets, but must pass an already available phidget to them. We must be derived from the same type as the phidget that get's passed in.
! CPhidget (const CUID &uid);
! virtual ~ CPhidget (); //!< If it is user constructed, this destructor replaces the original phidget back in the manager
! int classType(); //!< Get the device class as defined in the libphidget documentation.
! const char *name(); //!< Get the device name as defined in the libphidget documentation.
! int vendorID(); //!< Get the vendor ID as defined by the USB standard.
! int productID(); //!< Get the product ID as defined by the USB standard.
! bool isAttached(); //!< Returns if this device is attached or not.
! virtual void onAttach(); //!<This method is called when the device is attached.
! virtual void onDetach(); //!<This method is called when the device is detached.
! virtual void query(const EDeviceClass tp, set < CUID >&devices)
! {
! CUniqueDevice::query(tp, devices);
! if (tp == LP_PHIDGET)
! devices.insert(UID());
! }
};
--- 67,91 ----
* this will return NULL.
*/
! //CPhidget *getReplacement() {return(_replace);}
! public:
! //CPhidget(CPhidget *orig /*!< The \a CPhidget that we are replacing */); //!< Users can create phidgets, but must pass an already available phidget to them. We must be derived from the same type as the phidget that get's passed in.
! CPhidget (const CUID &uid);
! virtual ~ CPhidget (); //!< If it is user constructed, this destructor replaces the original phidget back in the manager
! int classType(); //!< Get the device class as defined in the libphidget documentation.
! const char *name(); //!< Get the device name as defined in the libphidget documentation.
! int vendorID(); //!< Get the vendor ID as defined by the USB standard.
! int productID(); //!< Get the product ID as defined by the USB standard.
! bool isAttached(); //!< Returns if this device is attached or not.
! virtual void onAttach(); //!<This method is called when the device is attached.
! virtual void onDetach(); //!<This method is called when the device is detached.
! virtual void query(const EDeviceClass tp, set < CUID >&devices)
! {
! CUniqueDevice::query(tp, devices);
! if (tp == LP_PHIDGET)
! devices.insert(UID());
! }
};
Index: CPhidgetManager.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CPhidgetManager.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CPhidgetManager.cc 15 Dec 2002 05:05:28 -0000 1.10
--- CPhidgetManager.cc 15 Dec 2002 20:40:11 -0000 1.11
***************
*** 294,297 ****
--- 294,304 ----
break;
}
+ case LP_INTERFACE_KIT_488:
+ case LP_INTERFACE_KIT_880:
+ {
+ CInterfaceKit *ik = new CInterfaceKit (uid);
+ return(ik);
+ break;
+ }
default:
return(NULL); // unsupported device type
Index: CServo.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CServo.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CServo.cc 16 Sep 2002 06:43:33 -0000 1.6
--- CServo.cc 15 Dec 2002 20:40:11 -0000 1.7
***************
*** 28,34 ****
*/
! CServo::CServo (CServoController *controller, const int id):CUniqueDevice (controller, id),
! _controller(controller), _position(0),
! _systemManaged(true)
{
METHOD_GUARD;
--- 28,35 ----
*/
! CServo::CServo (CServoController *controller, const int id) :
! CUniqueDevice (controller, id),
! _controller(controller), _position(0),
! _systemManaged(true)
{
METHOD_GUARD;
Index: CServo.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CServo.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CServo.h 12 Sep 2002 00:24:29 -0000 1.4
--- CServo.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 23,82 ****
class CServo:public CUniqueDevice
{
! private:
! friend class CServoController;
!
! CServoController *_controller;
!
! // This is the only real data for the servo
! float _position;
! bool _systemManaged;
!
! //CServo(CServoController *controller,int id, CServo *orig=NULL);
! public:
! CServo (CServoController *controller, const int id);
! CServo (const CUID &uid);
! virtual ~ CServo ();
/**
* Set's the current position of this servo
*/
! void position(float percent //!< Percentage to turn this servo
! );
/**
* Return the last position sent to the servo
*/
! float position() const
! {
! return (_position);
! }
/**
* On controllers that support this it will return the real world
* position of this servo. If it doesn't, it returns the same
* as getPosition()
! */ float realPosition() const
! {
! return (position());
! }
/**
* Makes a copy of the servo, just the real data, not anything about
* which controller it is attached to or other information set in the
* constructor only
! */ const CServo &operator = (const CServo *a) {
! _position = a->_position;
- return (*this);
- }
/**
* No devices are contained in this device
*/ CServo *find(const CUID &uid)
! {
! return (NULL);
! }
};
--- 23,85 ----
class CServo:public CUniqueDevice
{
! private:
! friend class CServoController;
+ CServoController *_controller;
+ // This is the only real data for the servo
+ float _position;
+ bool _systemManaged;
! //CServo(CServoController *controller,int id, CServo *orig=NULL);
+ public:
+ CServo (CServoController *controller, const int id);
+ CServo (const CUID &uid);
! virtual ~CServo ();
/**
* Set's the current position of this servo
*/
! void position(float percent //!< Percentage to turn this servo
! );
/**
* Return the last position sent to the servo
*/
! float position() const
! {
! return (_position);
! }
!
/**
* On controllers that support this it will return the real world
* position of this servo. If it doesn't, it returns the same
* as getPosition()
! */
! float realPosition() const
! {
! return (position());
! }
!
/**
* Makes a copy of the servo, just the real data, not anything about
* which controller it is attached to or other information set in the
* constructor only
! */
! const CServo &operator = (const CServo *a)
! {
! _position = a->_position;
!
! return (*this);
! }
/**
* No devices are contained in this device
*/ CServo *find(const CUID &uid)
! {
! return (NULL);
! }
};
Index: CServoController.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CServoController.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CServoController.h 12 Sep 2002 00:24:29 -0000 1.4
--- CServoController.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 29,39 ****
//vector<CServo *> _servos;
! int _servoCount;
! void setServoCount(int num);
! pair < bool, CServo *>*_servos;
! void registerServo(CServo *, int id);
! void unregisterServo(const CUID &uid);
--- 29,39 ----
//vector<CServo *> _servos;
! int _servoCount;
! void setServoCount(int num);
! pair < bool, CServo *>*_servos;
! void registerServo(CServo *, int id);
! void unregisterServo(const CUID &uid);
Index: CUID.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CUID.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CUID.h 12 Sep 2002 00:24:29 -0000 1.4
--- CUID.h 15 Dec 2002 20:40:11 -0000 1.5
***************
*** 23,48 ****
class CUID
{
! private:
! // The serial number off of the phidget device
! int _serial;
! // Unique ID for the controller on the phidget, for example it would be 0-3 for the 4 servo controller
! int _id;
! public:
! CUID ();
/**
* Initialize a CUID for a phidget device
*/
! CUID (const int serial //!< The serial number of the phidget
! );
/**
* Initialize a CUID for a phidget device
*/
! CUID (const int serial, //!< The serial number of the phidget
! const int id);
/**
--- 23,48 ----
class CUID
{
! private:
! // The serial number off of the phidget device
! int _serial;
! // Unique ID for the controller on the phidget, for example it would be 0-3 for the 4 servo controller
! int _id;
! public:
! CUID ();
/**
* Initialize a CUID for a phidget device
*/
! CUID (const int serial //!< The serial number of the phidget
! );
/**
* Initialize a CUID for a phidget device
*/
! CUID (const int serial, //!< The serial number of the phidget
! const int id);
/**
***************
*** 50,89 ****
* Intialize a CUID for a device attached to a phidget
*/
! CUID (const CUniqueDevice *device, //!< The phidget that controls this device
! const int id //!< The id for the device attached to this phidget
! );
/**
* Copy constructor
*/
! CUID (const CUID &id);
! virtual ~ CUID ();
/**
* The serial number of the phidget
*/
! int serial() const;
/**
* The id of the device attached to the phidget, this is -1 if this is a phidget CUID
*/
! int id() const;
/**
* Comparision operator
*/
! const CUID &operator = (const CUID &id);
/**
* Copy operator
*/
! bool operator == (const CUID &id) const;
! bool operator < (const CUID &id) const;
! bool operator > (const CUID &id) const;
! string asString() const;
};
--- 50,89 ----
* Intialize a CUID for a device attached to a phidget
*/
! CUID (const CUniqueDevice *device, //!< The phidget that controls this device
! const int id //!< The id for the device attached to this phidget
! );
/**
* Copy constructor
*/
! CUID (const CUID &id);
! virtual ~CUID();
/**
* The serial number of the phidget
*/
! int serial() const;
/**
* The id of the device attached to the phidget, this is -1 if this is a phidget CUID
*/
! int id() const;
/**
* Comparision operator
*/
! const CUID &operator = (const CUID &id);
/**
* Copy operator
*/
! bool operator == (const CUID &id) const;
! bool operator < (const CUID &id) const;
! bool operator > (const CUID &id) const;
! string asString() const;
};
Index: CUniqueDevice.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CUniqueDevice.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CUniqueDevice.h 12 Sep 2002 00:24:29 -0000 1.4
--- CUniqueDevice.h 15 Dec 2002 20:40:12 -0000 1.5
***************
*** 18,65 ****
class CUniqueDevice
{
! private:
! CUID _uid;
! void init();
! public:
! CUniqueDevice (const CUniqueDevice *dev, const int id):_uid(dev, id)
! {
! init();
! }
! CUniqueDevice (const CUID &uid):_uid(uid)
! {
! init();
! }
! const CUID &UID() const
! {
! return (_uid);
! }
! virtual ~ CUniqueDevice ();
/**
! * Looks for the specified unique id device. Classes that derive from this should implement there own version to reveal
! * any objects they can may contain.
*/
! virtual CUniqueDevice *find(const CUID &uid, bool create = true) {
! if (uid == _uid)
! return (this);
- return (NULL);
- }
/**
* Queries for any unique id devices that may exists, or are known how to create.
*/ virtual void query(const EDeviceClass tp, set < CUID >&devices)
! {
! if (tp == LP_ALL)
! devices.insert(_uid);
! }
! virtual void processEvents()
! {
! }
};
--- 18,70 ----
class CUniqueDevice
{
! private:
! CUID _uid;
! void init();
! public:
! CUniqueDevice (const CUniqueDevice *dev, const int id) :
! _uid(dev, id)
! {
! init();
! }
+ CUniqueDevice (const CUID &uid) :
+ _uid(uid)
+ {
+ init();
+ }
! const CUID &UID() const
! {
! return (_uid);
! }
! virtual ~CUniqueDevice ();
/**
! * Looks for the specified unique id device. Classes that derive from this should
! * implement there own version to reveal any objects they can may contain.
*/
! virtual CUniqueDevice *find(const CUID &uid, bool create = true)
! {
! if (uid == _uid)
! return (this);
!
! return (NULL);
! }
/**
* Queries for any unique id devices that may exists, or are known how to create.
*/ virtual void query(const EDeviceClass tp, set < CUID >&devices)
! {
! if (tp == LP_ALL)
! devices.insert(_uid);
! }
!
! virtual void processEvents()
! {
! }
};
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** Makefile.am 15 Dec 2002 05:05:28 -0000 1.7
--- Makefile.am 15 Dec 2002 20:40:12 -0000 1.8
***************
*** 11,14 ****
--- 11,18 ----
CUID.h \
CUniqueDevice.h \
+ CInterfaceKit.h \
+ CAnalogIn.h \
+ CDigitalIn.h \
+ CDigitalOut.h \
TSingleton.h
***************
*** 20,23 ****
--- 24,31 ----
CTextLCD.cc \
CServoController.cc \
+ CInterfaceKit.cc \
+ CAnalogIn.cc \
+ CDigitalIn.cc \
+ CDigitalOut.cc \
CUID.cc \
CUniqueDevice.cc
***************
*** 25,36 ****
# These are not active yet
! # CAnalogIn.h
! # CDigitalIn.h
! # CDigitalOut.h
# lsphidget.cc
- # CAnalogIn.cc
- # CDigitalIn.cc
- # CDigitalOut.cc
- # CInterfaceKit.cc
--- 33,44 ----
# These are not active yet
! # // CAnalogIn.h
! # // CAnalogIn.cc
! # // CDigitalIn.h
! # // CDigitalIn.cc
! # // CDigitalOut.h
! # // CDigitalOut.cc
! # // CInterfaceKit.cc
# lsphidget.cc
|
|
From: Jack S. <js...@us...> - 2002-12-15 20:40:16
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv825/examples
Modified Files:
phidget_c.c phidget_cpp.cc
Log Message:
Starting to re-add the interface kit to phidget++
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** phidget_c.c 14 Dec 2002 23:38:13 -0000 1.15
--- phidget_c.c 15 Dec 2002 20:40:10 -0000 1.16
***************
*** 51,55 ****
printf("Phidget Name ID ID Serial#\n");
printf("-------------------------------- ------ ------- -------\n");
! printf ("%32s 0x0%x 0x0%x %06d\n",
phidgetTypeName (phidgetType (dev)),
phidgetTypeVendorID (phidgetType (dev)),
--- 51,55 ----
printf("Phidget Name ID ID Serial#\n");
printf("-------------------------------- ------ ------- -------\n");
! printf ("%32s 0x0%x 0x0%x %06d\n",
phidgetTypeName (phidgetType (dev)),
phidgetTypeVendorID (phidgetType (dev)),
Index: phidget_cpp.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_cpp.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** phidget_cpp.cc 15 Dec 2002 05:05:28 -0000 1.8
--- phidget_cpp.cc 15 Dec 2002 20:40:11 -0000 1.9
***************
*** 12,15 ****
--- 12,19 ----
#include "CPhidget.h"
#include "CServoController.h"
+ #include "CInterfaceKit.h"
+ #include "CDigitalOut.h"
+ #include "CDigitalIn.h"
+ #include "CAnalogIn.h"
#include "CTextLCD.h"
#include <unistd.h>
***************
*** 224,231 ****
--- 228,242 ----
CServoController *sc = dynamic_cast < CServoController *>(phidget);
+ CInterfaceKit *ik = dynamic_cast < CInterfaceKit *>(phidget);
if (sc != NULL)
printf("Servos: %d\n", sc->servoCount());
else
+ if (ik != NULL)
+ printf("DI: %d DO: %d AI:%d\n",
+ ik->getDigitalInCount(),
+ ik->getDigitalOutCount(),
+ ik->getAnalogInCount());
+ else
printf("Unsupported\n");
}
***************
*** 337,346 ****
{
printf("Arguments:\n\n");
! printf(" -l (default) list all phidets \n");
! printf(" -u {UID} set the working UID\n");
! printf(" -q query the working UID\n");
! printf(" -h help\n");
! printf(" -p {percent} adjust the position of a servo referenced by UID\n");
! printf(" -t {string} send a string to a Text LCD phidget\n");
printf("\n");
}
--- 348,360 ----
{
printf("Arguments:\n\n");
! printf(" -l (default) list all phidets \n");
! printf(" -u {UID} set the working UID\n");
! printf(" -q query the working UID\n");
! printf(" -h help\n");
! printf(" -p {percent} adjust the position of a servo referenced by UID\n");
! printf(" -t {string} send a string to a Text LCD phidget\n");
! printf(" -do {id} {on/off} turn digital output ID on or off\n");
! printf(" -di {id} read digital input ID\n");
! printf(" -ai {id} read analog input ID\n");
printf("\n");
}
***************
*** 366,380 ****
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-q")
{
query();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-h")
{
help();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-l")
{
phidgets_ls();
--- 380,394 ----
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-q")
{
query();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-h")
{
help();
return (processArgs(argn - 1, argv + 1));
} else
! if (arg == "-l")
{
phidgets_ls();
***************
*** 390,394 ****
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-p")
{
if (argn < 2)
--- 404,408 ----
return (processArgs(argn - 2, argv + 2));
} else
! if (arg == "-p")
{
if (argn < 2)
***************
*** 398,404 ****
--- 412,449 ----
moveServo(parm);
return (processArgs(argn - 2, argv + 2));
+ } else
+ if (arg == "-do")
+ {
+ if (argn < 3)
+ throw runtime_error("Need 2 arguments for -do");
+
+ int id= atoi(argv[1]);
+ string value= argv[2];
+
+ CInterfaceKit kit(workingUID);
+ CDigitalOut *out=kit.digitalOut(id);
+
+ if (value=="on")
+ {
+ out->value(true);
+ }
+ else
+ if (value=="off")
+ {
+ out->value(false);
+ }
+ else
+ throw runtime_error("Invalid state to set output");
+
+ return (processArgs(argn - 3, argv + 3));
}
throw runtime_error("Invalid argument:" + arg);
+
+ /*
+ printf(" -do {id} {on/off} turn digital output ID on or off\n");
+ printf(" -di {id} read digital input ID\n");
+ printf(" -ai {id} read analog input ID\n");
+ */
}
|
|
From: Jack S. <js...@us...> - 2002-12-15 17:32:50
|
Update of /cvsroot/libphidget/libphidget/src/phidget++
In directory sc8-pr-cvs1:/tmp/cvs-serv9906/phidget++
Modified Files:
CServoController.cc
Log Message:
Minor
Index: CServoController.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CServoController.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CServoController.cc 16 Sep 2002 06:43:33 -0000 1.6
--- CServoController.cc 15 Dec 2002 17:32:44 -0000 1.7
***************
*** 21,52 ****
{
METHOD_GUARD;
! // Make sure it was constructed properly
! if (classType() != LP_SERVO_CONTROLLER)
! throw runtime_error("Can't initialize a CServoController with a phidget that is not a servo controller");
! switch (productID()) {
! case 0x0038:
! {
! setServoCount(4);
! break;
! }
! case 0x0039:
! {
! setServoCount(1);
! break;
! }
! case 0x003B:
! {
! setServoCount(8);
! break;
! }
! default:
{
! char temp[128];
! sprintf(temp, "Unknown type of servo controller Vendor ID:0x0%x Product ID:0x0%x\n", vendorID(), productID());
! throw runtime_error(temp);
}
- }
METHOD_UNGUARD;
}
--- 21,53 ----
{
METHOD_GUARD;
! // Make sure it was constructed properly
! if (classType() != LP_SERVO_CONTROLLER)
! throw runtime_error("Can't initialize a CServoController with a phidget that is not a servo controller");
! switch (productID())
{
! case 0x0038:
! {
! setServoCount(4);
! break;
! }
! case 0x0039:
! {
! setServoCount(1);
! break;
! }
! //case 0x003B:
! //{
! //setServoCount(8);
! //break;
! //}
! default:
! {
! char temp[128];
! sprintf(temp, "Unknown type of servo controller Vendor ID:0x0%x Product ID:0x0%x\n", vendorID(), productID());
! throw runtime_error(temp);
! }
}
METHOD_UNGUARD;
}
***************
*** 55,63 ****
{
METHOD_GUARD;
! for (int t = 0; t < _servoCount; t++)
! if (_servos[t].first)
! delete _servos[t].second;
! delete[]_servos;
METHOD_UNGUARD;
}
--- 56,64 ----
{
METHOD_GUARD;
! for (int t = 0; t < _servoCount; t++)
! if (_servos[t].first)
! delete _servos[t].second;
! delete[]_servos;
METHOD_UNGUARD;
}
***************
*** 66,73 ****
{
METHOD_GUARD;
! if (uid.serial() == UID().serial() && uid.id() >= 0 && uid.id() < _servoCount)
! return (servo(uid.id(), create));
! return (CPhidget::find(uid));
METHOD_UNGUARD;
}
--- 67,74 ----
{
METHOD_GUARD;
! if (uid.serial() == UID().serial() && uid.id() >= 0 && uid.id() < _servoCount)
! return (servo(uid.id(), create));
! return (CPhidget::find(uid));
METHOD_UNGUARD;
}
***************
*** 76,88 ****
{
METHOD_GUARD;
! if (id < 0 || id >= _servoCount)
! throw runtime_error("Invalid servo id");
! if (create && _servos[id].second == NULL) {
! _servos[id].first = true;
! _servos[id].second = new CServo (this, id);
! }
! return (_servos[id].second);
METHOD_UNGUARD;
}
--- 77,90 ----
{
METHOD_GUARD;
! if (id < 0 || id >= _servoCount)
! throw runtime_error("Invalid servo id");
! if (create && _servos[id].second == NULL)
! {
! _servos[id].first = true;
! _servos[id].second = new CServo (this, id);
! }
! return (_servos[id].second);
METHOD_UNGUARD;
}
***************
*** 91,102 ****
{
METHOD_GUARD;
! if (id < 0 || id >= _servoCount)
! throw runtime_error("Invalid servo id");
! if (_servos[id].second != NULL)
! throw runtime_error("This servo id is already being used.");
! _servos[id].first = false;
! _servos[id].second = servo;
METHOD_UNGUARD;
}
--- 93,104 ----
{
METHOD_GUARD;
! if (id < 0 || id >= _servoCount)
! throw runtime_error("Invalid servo id");
! if (_servos[id].second != NULL)
! throw runtime_error("This servo id is already being used.");
! _servos[id].first = false;
! _servos[id].second = servo;
METHOD_UNGUARD;
}
***************
*** 105,119 ****
{
METHOD_GUARD;
! if ((uid.id() < 0 && uid.id() >= _servoCount)
! || uid.serial() != UID().serial())
! throw runtime_error("Invalid servo id");
!
!
! if (_servos[uid.id()].first)
! throw runtime_error("Can't unregister a system managed servo");
! _servos[uid.id()].first = true;
! _servos[uid.id()].second = NULL;
METHOD_UNGUARD;
}
--- 107,118 ----
{
METHOD_GUARD;
! if ((uid.id() < 0 && uid.id() >= _servoCount) || uid.serial() != UID().serial())
! throw runtime_error("Invalid servo id");
+ if (_servos[uid.id()].first)
+ throw runtime_error("Can't unregister a system managed servo");
! _servos[uid.id()].first = true;
! _servos[uid.id()].second = NULL;
METHOD_UNGUARD;
}
***************
*** 122,133 ****
{
METHOD_GUARD;
! _servoCount = num;
! _servos = new pair < bool, CServo *>[_servoCount];
! for (int t = 0; t < _servoCount; t++) {
! _servos[t].first = true;
! _servos[t].second = NULL;
! }
METHOD_UNGUARD;
}
--- 121,134 ----
{
METHOD_GUARD;
! _servoCount = num;
! _servos = new pair < bool, CServo *>[_servoCount];
! for (int t = 0; t < _servoCount; t++)
! {
! _servos[t].first = true;
! _servos[t].second = NULL;
! }
!
METHOD_UNGUARD;
}
***************
*** 208,225 ****
{
METHOD_GUARD;
! if (_servoCount) {
! float p1 = 0, p2 = 0, p3 = 0, p4 = 0;
! if (_servoCount >= 1 && _servos[0].second != NULL)
! p1 = _servos[0].second->position();
! if (_servoCount >= 2 && _servos[1].second != NULL)
! p2 = _servos[1].second->position();
! if (_servoCount >= 3 && _servos[2].second != NULL)
! p3 = _servos[2].second->position();
! if (_servoCount >= 4 && _servos[3].second != NULL)
! p4 = _servos[3].second->position();
! error(phidgetQuadServo(device(), p1, p2, p3, p4));
! }
METHOD_UNGUARD;
}
--- 209,230 ----
{
METHOD_GUARD;
! if (_servoCount)
! {
! float p1 = 0, p2 = 0, p3 = 0, p4 = 0;
! if (_servoCount >= 1 && _servos[0].second != NULL)
! p1 = _servos[0].second->position();
! if (_servoCount >= 2 && _servos[1].second != NULL)
! p2 = _servos[1].second->position();
!
! if (_servoCount >= 3 && _servos[2].second != NULL)
! p3 = _servos[2].second->position();
!
! if (_servoCount >= 4 && _servos[3].second != NULL)
! p4 = _servos[3].second->position();
!
! error(phidgetQuadServo(device(), p1, p2, p3, p4));
! }
METHOD_UNGUARD;
}
|
|
From: Jack S. <js...@us...> - 2002-12-15 05:05:31
|
Update of /cvsroot/libphidget/libphidget/src/phidget++
In directory sc8-pr-cvs1:/tmp/cvs-serv20168/phidget++
Modified Files:
CPhidgetManager.cc Makefile.am
Added Files:
CTextLCD.cc CTextLCD.h
Log Message:
Added support for TextLCD in the phidget++
--- NEW FILE: CTextLCD.cc ---
/*
* phidget++ library
* $Id: CTextLCD.cc,v 1.1 2002/12/15 05:05:28 jstrohm Exp $
*
* Copyright (c) 2002 Jack Strohm <js...@ja...>
*
* This library is covered by the LGPL, read LICENSE for details.
*/
#include "CTextLCD.h"
#include <stdio.h>
#include <stdexcept>
#include <phidget.h>
#include "helper.h"
CTextLCD::CTextLCD (const CUID &uid) :
CPhidget (uid)
{
METHOD_GUARD;
// Make sure it was constructed properly
if (classType() != LP_TEXT_LCD)
throw runtime_error("Can't initialize a CTextLCD with a phidget that is not a text lcd");
phidgetTextLCDOn(device());
METHOD_UNGUARD;
}
CTextLCD::~CTextLCD ()
{
METHOD_GUARD;
phidgetTextLCDOff(device());
METHOD_UNGUARD;
}
CUniqueDevice *CTextLCD::find(const CUID &uid, bool create)
{
METHOD_GUARD;
return (CPhidget::find(uid));
METHOD_UNGUARD;
}
void CTextLCD::update()
{
METHOD_GUARD;
METHOD_UNGUARD;
}
void CTextLCD::sendText(string text, int row, int col)
{
error(phidgetTextLCDWrite(device(), row,col,text.c_str()));
}
--- NEW FILE: CTextLCD.h ---
/*
* phidget++ library
* $Id: CTextLCD.h,v 1.1 2002/12/15 05:05:28 jstrohm Exp $
*
* Copyright (c) 2002 Jack Strohm <js...@ja...>
*
* This library is covered by the LGPL, read LICENSE for details.
*/
#ifndef __CTEXTLCD_H__
#define __CTEXTLCD_H__
#include "CPhidget.h"
#include <vector>
using namespace std;
/**
* Object that represents all text lcd's
*/
class CTextLCD : public CPhidget
{
private:
public:
CTextLCD (const CUID &uid);
virtual ~CTextLCD ();
void update();
CUniqueDevice *find(const CUID &uid, bool create);
virtual void query(const EDeviceClass tp, set < CUID >&devices)
{
CPhidget::query(tp, devices);
//if (tp == LP_TEXT_LCD || tp == LP_ALL)
//for (int t = 0; t < _servoCount; t++)
//devices.insert(CUID (UID().serial(), t));
}
void sendText(string text, int row, int col);
};
#endif
Index: CPhidgetManager.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/CPhidgetManager.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CPhidgetManager.cc 13 Dec 2002 22:53:57 -0000 1.9
--- CPhidgetManager.cc 15 Dec 2002 05:05:28 -0000 1.10
***************
*** 21,25 ****
{
METHOD_GUARD;
! _uniqueDevices.push_back(dev);
METHOD_UNGUARD;
}
--- 21,25 ----
{
METHOD_GUARD;
! _uniqueDevices.push_back(dev);
METHOD_UNGUARD;
}
***************
*** 28,40 ****
{
METHOD_GUARD;
! vector <CUniqueDevice *>::iterator i;
! for (i = _uniqueDevices.begin(); i != _uniqueDevices.end(); i++)
! if (*i == dev) {
! _uniqueDevices.erase(i, i);
! return;
}
! throw runtime_error("Can't unregister a device that wasn't registered.");
METHOD_UNGUARD;
}
--- 28,41 ----
{
METHOD_GUARD;
! vector <CUniqueDevice *>::iterator i;
! for (i = _uniqueDevices.begin(); i != _uniqueDevices.end(); i++)
! if (*i == dev)
! {
! _uniqueDevices.erase(i, i);
! return;
}
! throw runtime_error("Can't unregister a device that wasn't registered.");
METHOD_UNGUARD;
}
***************
*** 78,95 ****
error(phidgetInit(1));
! /*
! // Build classes to handle and open all devices
! int phidget_count;
! struct phidget **phidgets=phidget_get_phidgets(&phidget_count);
! for (int t=0;t<phidget_count;t++)
! {
! // We open this device
! addPossibleNewDevice(phidgets[t]);
! }
! for (int t=0;t<_phidgets.size();t++) _phidgets[t]->processEvents();
! */
METHOD_UNGUARD;
}
--- 79,96 ----
error(phidgetInit(1));
! /*
! // Build classes to handle and open all devices
! int phidget_count;
! struct phidget **phidgets=phidget_get_phidgets(&phidget_count);
! for (int t=0;t<phidget_count;t++)
! {
! // We open this device
! addPossibleNewDevice(phidgets[t]);
! }
! for (int t=0;t<_phidgets.size();t++) _phidgets[t]->processEvents();
! */
METHOD_UNGUARD;
}
***************
*** 98,112 ****
{
METHOD_GUARD;
! /*
! for (int t=0;t<_phidgets.size();t++)
! {
! if (_phidgets[t]->userConstructed())
! throw runtime_error("All user constructed phidgets must be deleted before the phidget manager is destroyed.");
! delete _phidgets[t];
! }
! */
! error(phidgetDeinit());
METHOD_UNGUARD;
}
--- 99,113 ----
{
METHOD_GUARD;
! /*
! for (int t=0;t<_phidgets.size();t++)
! {
! if (_phidgets[t]->userConstructed())
! throw runtime_error("All user constructed phidgets must be deleted before the phidget manager is destroyed.");
! delete _phidgets[t];
! }
! */
! error(phidgetDeinit());
METHOD_UNGUARD;
}
***************
*** 115,152 ****
{
METHOD_GUARD;
! set < CUID >devices;
! // Ask libphidget for any known phidgets
! if (tp == LP_ALL || tp == LP_PHIDGET || tp == LP_SERVO_CONTROLLER /*|| tp == LP_INTERFACE_KIT*/) {
! int phidget_count;
! struct phidget **phidgets = error(phidgetGetPhidgets(&phidget_count));
! for (int t = 0; t < phidget_count; t++)
! {
! if (
! (tp == LP_PHIDGET) ||
! (tp == LP_ALL) ||
! (tp == LP_SERVO_CONTROLLER && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_SERVO_CONTROLLER) /*||
! (tp == LP_INTERFACE_KIT && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_INTERFACE_KIT)*/ )
{
! CUID temp_uid(error(phidgetSerial(phidgets[t])));
! devices.insert(temp_uid);
}
}
- }
- // Ask each known device if it knows about any devices that match the type we are searching for
- if (tp == LP_ALL || tp == LP_SERVO || tp == LP_DIGITAL_IN || tp == LP_DIGITAL_OUT) {
- for (int t = 0; t < _uniqueDevices.size(); t++)
- _uniqueDevices[t]->query(tp, devices);
- }
- // get a vector of the CUID instead of a set
- vector <CUID >temp;
! for (set < CUID >::iterator i = devices.begin(); i != devices.end(); i++)
! temp.push_back(*i);
! return (temp);
METHOD_UNGUARD;
}
--- 116,163 ----
{
METHOD_GUARD;
! set < CUID >devices;
! // Ask libphidget for any known phidgets
! if (
! tp == LP_ALL ||
! tp == LP_PHIDGET ||
! tp == LP_TEXT_LCD ||
! tp == LP_SERVO_CONTROLLER
! /*|| tp == LP_INTERFACE_KIT*/)
! {
! int phidget_count;
! struct phidget **phidgets = error(phidgetGetPhidgets(&phidget_count));
! for (int t = 0; t < phidget_count; t++)
{
! if (
! (tp == LP_PHIDGET) ||
! (tp == LP_ALL) ||
! (tp == LP_TEXT_LCD) ||
! (tp == LP_SERVO_CONTROLLER && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_SERVO_CONTROLLER) /*||
! (tp == LP_INTERFACE_KIT && error(phidgetTypeDeviceClass(error(phidgetType(phidgets[t])))) == LP_INTERFACE_KIT)*/ )
! {
! CUID temp_uid(error(phidgetSerial(phidgets[t])));
! devices.insert(temp_uid);
! }
}
}
! // Ask each known device if it knows about any devices that match the type we are searching for
! if (tp == LP_ALL || tp == LP_SERVO || tp == LP_DIGITAL_IN || tp == LP_DIGITAL_OUT || tp == LP_TEXT_LCD)
! {
! for (int t = 0; t < _uniqueDevices.size(); t++)
! _uniqueDevices[t]->query(tp, devices);
! }
! // get a vector of the CUID instead of a set
! vector <CUID >temp;
!
! for (set < CUID >::iterator i = devices.begin(); i != devices.end(); i++)
! temp.push_back(*i);
!
! return (temp);
METHOD_UNGUARD;
}
***************
*** 156,173 ****
METHOD_GUARD;
! if (uid.id() != -1)
! throw runtime_error("invalid UID to find phidget. id must be -1");
! int phidget_count;
! struct phidget **phidgets = error(phidgetGetPhidgets(&phidget_count));
! for (int t = 0; t < phidget_count; t++) {
! // We open this device
! if (error(phidgetSerial(phidgets[t])) == uid.serial()) {
! return (error(phidgetOpen(phidgets[t])));
}
- }
! return (NULL);
METHOD_UNGUARD;
}
--- 167,186 ----
METHOD_GUARD;
! if (uid.id() != -1)
! throw runtime_error("invalid UID to find phidget. id must be -1");
! int phidget_count;
! struct phidget **phidgets = error(phidgetGetPhidgets(&phidget_count));
! for (int t = 0; t < phidget_count; t++)
! {
! // We open this device
! if (error(phidgetSerial(phidgets[t])) == uid.serial())
! {
! return (error(phidgetOpen(phidgets[t])));
! }
}
! return (NULL);
METHOD_UNGUARD;
}
***************
*** 188,200 ****
{
METHOD_GUARD;
! bool found = (error(phidgetEvents()) == 1);
! // Get the list of phidgets
! if (found) {
! for (int t = 0; t < _uniqueDevices.size(); t++)
! _uniqueDevices[t]->processEvents();
! }
! return (found);
METHOD_UNGUARD;
}
--- 201,214 ----
{
METHOD_GUARD;
! bool found = (error(phidgetEvents()) == 1);
! // Get the list of phidgets
! if (found)
! {
! for (int t = 0; t < _uniqueDevices.size(); t++)
! _uniqueDevices[t]->processEvents();
! }
! return (found);
METHOD_UNGUARD;
}
***************
*** 203,253 ****
{
METHOD_GUARD;
! CUniqueDevice *temp;
! bool isPhidget = false;
! // Is this a phidget or a phidget device we are trying to find?
! // Look at all known devices for this
! for (int t = 0; t < _uniqueDevices.size(); t++) {
! temp = _uniqueDevices[t]->find(uid, create);
! if (temp != NULL)
! return (temp);
! }
!
! // Wasn't found , so let's return because we were not asked to create this device
! if (!create)
! return (NULL);
! // Not found, is it a phidget? or a phidget device
! if (uid.id() == -1)
! isPhidget = true;
! // Make sure the phidget CUID(uid.serial()) exists
! CUID tempUID(uid.serial());
! bool devfound = false;
! if (!isPhidget)
! for (int t = 0; t < _uniqueDevices.size(); t++) {
! if (_uniqueDevices[t]->UID() == uid) {
! devfound = true;
! break;
! }
}
- // Device wasn't found, this is always true if isPhidget is true
- if (!devfound || isPhidget) {
- // Create tempUID, this is the tricky part.
- // How, without know about this phidget do we create it?
! temp = createPhidget(tempUID);
! if (isPhidget)
! return (temp);
! }
! // The base phidget should exists and can now create it for us.
! return (temp->find(uid, create));
METHOD_UNGUARD;
}
--- 217,271 ----
{
METHOD_GUARD;
! CUniqueDevice *temp;
! bool isPhidget = false;
! // Is this a phidget or a phidget device we are trying to find?
! // Look at all known devices for this
! for (int t = 0; t < _uniqueDevices.size(); t++)
! {
! temp = _uniqueDevices[t]->find(uid, create);
! if (temp != NULL)
! return (temp);
! }
! // Wasn't found , so let's return because we were not asked to create this device
! if (!create)
! return (NULL);
! // Not found, is it a phidget? or a phidget device
! if (uid.id() == -1)
! isPhidget = true;
+ // Make sure the phidget CUID(uid.serial()) exists
+ CUID tempUID(uid.serial());
! bool devfound = false;
! if (!isPhidget)
! for (int t = 0; t < _uniqueDevices.size(); t++)
! {
! if (_uniqueDevices[t]->UID() == uid)
! {
! devfound = true;
! break;
! }
}
! // Device wasn't found, this is always true if isPhidget is true
! if (!devfound || isPhidget)
! {
! // Create tempUID, this is the tricky part.
! // How, without know about this phidget do we create it?
+ temp = createPhidget(tempUID);
! if (isPhidget)
! return (temp);
! }
!
! // The base phidget should exists and can now create it for us.
! return (temp->find(uid, create));
METHOD_UNGUARD;
}
***************
*** 256,261 ****
{
METHOD_GUARD;
! // This device better not exists, we assume that has already been checked.
! if (uid.id() != -1)
throw runtime_error("Id must be -1 for all phidgets");
--- 274,279 ----
{
METHOD_GUARD;
! // This device better not exists, we assume that has already been checked.
! if (uid.id() != -1)
throw runtime_error("Id must be -1 for all phidgets");
***************
*** 272,276 ****
case LP_SERVO_CONTROLLER:
{
! CServoController *sc = new CServoController (uid);
return(sc);
break;
--- 290,294 ----
case LP_SERVO_CONTROLLER:
{
! CServoController *sc = new CServoController (uid);
return(sc);
break;
***************
*** 282,286 ****
! return (NULL);
METHOD_UNGUARD;
}
--- 300,304 ----
! return (NULL);
METHOD_UNGUARD;
}
Index: Makefile.am
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/phidget++/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Makefile.am 14 Sep 2002 18:59:21 -0000 1.6
--- Makefile.am 15 Dec 2002 05:05:28 -0000 1.7
***************
*** 7,10 ****
--- 7,11 ----
CPhidgetManager.h \
CServo.h \
+ CTextLCD.h \
CServoController.h \
CUID.h \
***************
*** 17,20 ****
--- 18,22 ----
CPhidgetManager.cc \
CServo.cc \
+ CTextLCD.cc \
CServoController.cc \
CUID.cc \
***************
*** 55,57 ****
@ @ECHO@ "*** Documentation is not created - install Doxygen"
endif
!
\ No newline at end of file
--- 57,59 ----
@ @ECHO@ "*** Documentation is not created - install Doxygen"
endif
!
|
|
From: Jack S. <js...@us...> - 2002-12-15 05:05:31
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv20168/examples
Modified Files:
phidget_cpp.cc
Log Message:
Added support for TextLCD in the phidget++
Index: phidget_cpp.cc
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_cpp.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** phidget_cpp.cc 13 Dec 2002 05:01:09 -0000 1.7
--- phidget_cpp.cc 15 Dec 2002 05:05:28 -0000 1.8
***************
*** 12,15 ****
--- 12,16 ----
#include "CPhidget.h"
#include "CServoController.h"
+ #include "CTextLCD.h"
#include <unistd.h>
***************
*** 242,404 ****
}
! void
! readUID(const string & arg)
{
! bool colon_found = false;
! string temp;
! char last_char;
! int serial = -1;
! int id = -1;
! for (int t = 0; t < arg.length(); t++) {
! last_char = arg[t];
! if (arg[t] == ':') {
! if (colon_found)
! throw runtime_error("More than one colon found in UID\n");
! colon_found = true;
! serial = atoi(temp.c_str());
! temp = "";
! } else if (arg[t] >= '0' && arg[t] <= '9') {
! temp += arg.substr(t, 1);
! } else
! throw runtime_error("Invalid character in UID:" + arg);
! }
! if (colon_found && temp.length() > 0 && last_char != ':')
! id = atoi(temp.c_str());
! else if (!colon_found)
! serial = atoi(temp.c_str());
! workingUID = CUID (serial, id);
}
! void
! query()
{
! if (workingUID.serial() == -1)
! throw runtime_error("Must use parameter -u with query command\n");
! CPhidgetManager *manager = CPhidgetManager::getInstance();
! CUniqueDevice *dev = manager->find(workingUID, true);
! printf("%-10s ", workingUID.asString().c_str());
! printf(">> ");
! // What type of device is this?
! CPhidget *phidget;
! if ((phidget = dynamic_cast < CPhidget *>(dev)) !=NULL) {
! printf("Phidget [%s] ", phidget->name());
! } else {
! if (dynamic_cast < CServo *>(dev) != NULL)
! printf("Servo ");
! }
! printf("\n");
}
! void
! moveServo(const string & parm)
{
! float p = atof(parm.c_str());
! CServo servo(workingUID);
! printf("Moving servo to position %f\n", p);
! servo.position(p);
! sleep(1);
}
! void
! help()
{
! printf("Arguments:\n\n");
! printf(" -l (default) list all phidets \n");
! printf(" -u {UID} set the working UID\n");
! printf(" -q query the working UID\n");
! printf(" -h help\n");
! printf(" -p {percent} adjust the position of a servo referenced by UID\n");
! printf("\n");
}
! int
! processArgs(int argn, char *argv[])
{
! if (argn == 0)
! return (0);
! // Read an argument
! string arg = argv[0];
! if (arg == "-u") // The unique device ID to work with
! {
! if (argn < 2)
! throw runtime_error("Expected argument after -u");
! string parm = argv[1];
! readUID(parm);
! return (processArgs(argn - 2, argv + 2));
! } else if (arg == "-q") {
! query();
! return (processArgs(argn - 1, argv + 1));
! } else if (arg == "-h") {
! help();
! return (processArgs(argn - 1, argv + 1));
! } else if (arg == "-l") {
! phidgets_ls();
! return (processArgs(argn - 1, argv + 1));
! } else if (arg == "-p") {
! if (argn < 2)
! throw runtime_error("Expected argument after -p");
! string parm = argv[1];
! moveServo(parm);
! return (processArgs(argn - 2, argv + 2));
! }
! throw runtime_error("Invalid argument:" + arg);
}
! int
! main(int argn, char *argv[])
! {
! try {
! char adjusted_version[64];
! memcpy(adjusted_version,revision+11,strlen(revision)-11-2);
! adjusted_version[strlen(revision)-11-2]=0;
! // What we are
! printf("phidgets: a command line interface utility\n");
! // Get the version number
! printf("Version %s\n",adjusted_version);
! // No arguments
! if (argn <= 1) {
! phidgets_ls();
! return (0);
}
- // Recursive argument parser, remove the executable name
- return (processArgs(argn - 1, argv + 1));
-
- }
- catch(const exception & e) {
- printf("Exception: %s\n", e.what());
- return (-1);
- }
! return (0);
}
--- 243,438 ----
}
! void readUID(const string & arg)
{
! bool colon_found = false;
! string temp;
! char last_char;
! int serial = -1;
! int id = -1;
! for (int t = 0; t < arg.length(); t++)
! {
! last_char = arg[t];
! if (arg[t] == ':')
! {
! if (colon_found)
! throw runtime_error("More than one colon found in UID\n");
! colon_found = true;
! serial = atoi(temp.c_str());
! temp = "";
! } else
! if (arg[t] >= '0' && arg[t] <= '9')
! {
! temp += arg.substr(t, 1);
! } else
! throw runtime_error("Invalid character in UID:" + arg);
! }
! if (colon_found && temp.length() > 0 && last_char != ':')
! id = atoi(temp.c_str());
! else
! if (!colon_found)
! serial = atoi(temp.c_str());
! workingUID = CUID (serial, id);
}
! void query()
{
! if (workingUID.serial() == -1)
! throw runtime_error("Must use parameter -u with query command\n");
! CPhidgetManager *manager = CPhidgetManager::getInstance();
! CUniqueDevice *dev = manager->find(workingUID, true);
! printf("%-10s ", workingUID.asString().c_str());
! printf(">> ");
! // What type of device is this?
! CPhidget *phidget;
! if ((phidget = dynamic_cast < CPhidget *>(dev)) !=NULL)
! {
! printf("Phidget [%s] ", phidget->name());
! }
! else
! {
! if (dynamic_cast < CServo *>(dev) != NULL)
! printf("Servo ");
! }
! printf("\n");
}
! void moveServo(const string & parm)
{
! float p = atof(parm.c_str());
! CServo servo(workingUID);
! printf("Moving servo to position %f\n", p);
! servo.position(p);
! sleep(1);
}
! void sendText(const string & parm)
{
! CTextLCD text(workingUID);
!
! printf("Sending text to %s\n", parm.c_str());
!
! text.sendText(parm.c_str(),0,0);
!
! sleep(1);
! }
!
! void help()
! {
! printf("Arguments:\n\n");
! printf(" -l (default) list all phidets \n");
! printf(" -u {UID} set the working UID\n");
! printf(" -q query the working UID\n");
! printf(" -h help\n");
! printf(" -p {percent} adjust the position of a servo referenced by UID\n");
! printf(" -t {string} send a string to a Text LCD phidget\n");
! printf("\n");
}
! int processArgs(int argn, char *argv[])
{
! if (argn == 0)
! return (0);
! // Read an argument
! string arg = argv[0];
! if (arg == "-u") // The unique device ID to work with
! {
! if (argn < 2)
! throw runtime_error("Expected argument after -u");
! string parm = argv[1];
! readUID(parm);
! return (processArgs(argn - 2, argv + 2));
! } else
! if (arg == "-q")
! {
! query();
! return (processArgs(argn - 1, argv + 1));
! } else
! if (arg == "-h")
! {
! help();
! return (processArgs(argn - 1, argv + 1));
! } else
! if (arg == "-l")
! {
! phidgets_ls();
! return (processArgs(argn - 1, argv + 1));
! } else
! if (arg == "-t")
! {
! if (argn < 2)
! throw runtime_error("Expected argument after -t");
! string parm = argv[1];
!
! sendText(parm);
! return (processArgs(argn - 2, argv + 2));
! } else
! if (arg == "-p")
! {
! if (argn < 2)
! throw runtime_error("Expected argument after -p");
! string parm = argv[1];
+ moveServo(parm);
+ return (processArgs(argn - 2, argv + 2));
+ }
! throw runtime_error("Invalid argument:" + arg);
}
+ int main(int argn, char *argv[])
+ {
+ try
+ {
+ char adjusted_version[64];
+ memcpy(adjusted_version,revision+11,strlen(revision)-11-2);
+ adjusted_version[strlen(revision)-11-2]=0;
! // What we are
! printf("phidgets: a command line interface utility\n");
! // Get the version number
! printf("Version %s\n",adjusted_version);
! // No arguments
! if (argn <= 1)
! {
! phidgets_ls();
! return (0);
! }
! // Recursive argument parser, remove the executable name
! return (processArgs(argn - 1, argv + 1));
! }
! catch(const exception & e)
! {
! printf("Exception: %s\n", e.what());
! return (-1);
}
! return (0);
}
|
|
From: Jack S. <js...@us...> - 2002-12-14 23:38:16
|
Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv16834/libphidget
Modified Files:
phidget.c phidget.h
Log Message:
Added digital output on the 488, should work on the 880 also.
Index: phidget.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** phidget.c 14 Dec 2002 18:23:06 -0000 1.22
--- phidget.c 14 Dec 2002 23:38:13 -0000 1.23
***************
*** 1406,1409 ****
--- 1406,1423 ----
}
+ /**
+ * Helper function to turn the Text LCD on and configure it
+ */
+ enum ELPError phidgetInterfaceKit488Write(struct phidget *phidgetDevice, int index, int value)
+ {
+ char buffer[4];
+
+ buffer[0] = index+(value << 3);
+ buffer[1] = 0;
+ buffer[2] = 0;
+ buffer[3] = 0;
+ phidgetWrite(phidgetDevice,buffer,4);
+ }
+
/**
* Helper function to read from an interface kit.
Index: phidget.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** phidget.h 14 Dec 2002 18:23:06 -0000 1.14
--- phidget.h 14 Dec 2002 23:38:13 -0000 1.15
***************
*** 214,219 ****
enum ELPError phidgetTextLCDOn(struct phidget *phidgetDevice);
enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice);
! enum ELPError phidgetInterfaceKit488(struct phidget *phidgetDevice, float analog[4], int digital[8]);
! enum ELPError phidgetInterfaceKit880(struct phidget *phidgetDevice, float analog[8], int digital[8]);
enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str);
enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice);
--- 214,220 ----
enum ELPError phidgetTextLCDOn(struct phidget *phidgetDevice);
enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice);
! enum ELPError phidgetInterfaceKit488Read(struct phidget *phidgetDevice, float analog[4], int digital[8]);
! enum ELPError phidgetInterfaceKit488Write(struct phidget *phidgetDevice, int index, int value);
! enum ELPError phidgetInterfaceKit880Read(struct phidget *phidgetDevice, float analog[8], int digital[8]);
enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str);
enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice);
|
|
From: Jack S. <js...@us...> - 2002-12-14 23:38:16
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv16834/examples
Modified Files:
phidget_c.c
Log Message:
Added digital output on the 488, should work on the 880 also.
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** phidget_c.c 14 Dec 2002 18:23:06 -0000 1.14
--- phidget_c.c 14 Dec 2002 23:38:13 -0000 1.15
***************
*** 63,66 ****
--- 63,67 ----
printf(" IK488 - test 488 interface kit\n");
printf(" IK880 - test 880 interface kit\n");
+ printf(" IKDIGITALWRITE - write data to the 488 or 880 interface kit\n");
printf(" TEXTLCD - test text lcd\n");
***************
*** 75,78 ****
--- 76,80 ----
int SERVO=0;
int IK488=0;
+ int IKDIGITALWRITE=0;
int IK880=0;
int TEXTLCD=0;
***************
*** 84,87 ****
--- 86,90 ----
if (strcmp(argv[1],"IK488")==0) IK488=1;
if (strcmp(argv[1],"IK880")==0) IK880=1;
+ if (strcmp(argv[1],"IKDIGITALWRITE")==0) IKDIGITALWRITE=1;
if (strcmp(argv[1],"TEXTLCD")==0) TEXTLCD=1;
***************
*** 151,155 ****
}
}
!
if (IK488)
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_488)
--- 154,158 ----
}
}
!
if (IK488)
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_488)
***************
*** 183,186 ****
--- 186,212 ----
}
+ }
+
+ if (IKDIGITALWRITE)
+ if (
+ (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_488) ||
+ (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_880)
+ )
+ {
+ int t,k;
+
+ printf("Start:\n");
+ for (t=0;t<8;t++)
+ {
+ printf("Turning output %d on\n",t+1);
+ phidgetInterfaceKit488Write(dev,t,1);
+ sleep(1);
+ }
+ for (t=0;t<8;t++)
+ {
+ printf("Turning output %d off\n",t+1);
+ phidgetInterfaceKit488Write(dev,t,0);
+ }
+ printf("Finished\n");
}
|
|
From: Jack S. <js...@us...> - 2002-12-14 18:23:09
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv576/examples
Modified Files:
phidget_c.c
Log Message:
Fully implemented writing strings to the Text LCD and added more commands, clear, on, and off. Example uses all of these
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** phidget_c.c 14 Dec 2002 06:49:43 -0000 1.13
--- phidget_c.c 14 Dec 2002 18:23:06 -0000 1.14
***************
*** 112,125 ****
{
int a,b,c;
! // Close that phidget
for (c=0;c<4;c++)
{
for (a=0;a<8;a++)
for (b=0;b<4;b++)
! phidgetTextLCDWrite(dev, 1+b, a," Tst ");
for (a=0;a<8;a++)
for (b=0;b<4;b++)
! phidgetTextLCDWrite(dev, 1+b, 8-a," Tst ");
}
}
--- 112,129 ----
{
int a,b,c;
!
! phidgetTextLCDOn(dev);
! phidgetTextLCDClear(dev);
for (c=0;c<4;c++)
{
for (a=0;a<8;a++)
for (b=0;b<4;b++)
! phidgetTextLCDWrite(dev, b, a," Test");
for (a=0;a<8;a++)
for (b=0;b<4;b++)
! phidgetTextLCDWrite(dev, b, 7-a,"Test ");
}
+ phidgetTextLCDClear(dev);
+ phidgetTextLCDOff(dev);
}
|
|
From: Jack S. <js...@us...> - 2002-12-14 18:23:09
|
Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv576/libphidget
Modified Files:
phidget.c phidget.h
Log Message:
Fully implemented writing strings to the Text LCD and added more commands, clear, on, and off. Example uses all of these
Index: phidget.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** phidget.c 14 Dec 2002 06:49:43 -0000 1.21
--- phidget.c 14 Dec 2002 18:23:06 -0000 1.22
***************
*** 1455,1574 ****
/**
! * Helper function to send data to a Text LCD
*/
! #include <stdio.h>
! enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str)
{
! {
! int t,i,j, len, buf_ptr;
! unsigned char form_buffer[30];
! unsigned char buffer[10];//={0,0,0,0,0,0,0,0,0,0};
!
! /* 0000 - 0
! * 0001 - 1
! * 0010 - 2
! * 0011 - 3
! * 0100 - 4
! * 0101 - 5
! * 0110 - 6
! * 0111 - 7
! * 1000 - 8
! * 1001 - 9
! * 1010 - A
! * 1011 - B
! * 1100 - C
! * 1101 - D
! * 1110 - E
! * 1111 - F
! */
!
! {
! // Initialize command mode
! buffer[0] = 0x69; // 0: 0 1 1 0 1 0 0 1 <- System Set, 4 lines, Use CGRAM
! buffer[1] = 0x31; // 0: 0 0 1 1 0 0 0 1 <- Display ON/OFF, Display ON
! buffer[2] = 0x42;//66; // 0: 0 1 0 0 0 0 1 0 <- Power Save, Oscillator Circuit ON
! buffer[3] = 0x57;//87; // 0: 0 1 0 1 0 1 1 1 <- RAM Address set to 010111 (23)
! buffer[4] = 0xB0; // Set the address pointer
! buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col;
! buffer[7] = 6; // testing - this makes it work, not sure why
! phidgetWrite(phidgetDevice,buffer,8);
!
! // Seems to be needed to flush data
! buffer[0]=0x02;
! buffer[1]=str[0];
! buffer[2]=str[1];
! buffer[3]=str[2];
! buffer[4]=str[3];
! buffer[5]=str[4];
! buffer[6]=1; // go back into command mode
! buffer[7]=7;
! phidgetWrite(phidgetDevice,buffer,8);
!
! }
! /*
! {
! // Initialize command mode
! buffer[0] = 0; // buffer[0] is a windows thing
! buffer[1] = 0x69; // 0: 0 1 1 0 1 0 0 1 <- System Set, 4 lines, Use CGRAM
! buffer[2] = 0x31; // 0: 0 0 1 1 0 0 0 1 <- Display ON/OFF, Display ON
! buffer[3] = 0x42;//66; // 0: 0 1 0 0 0 0 1 0 <- Power Save, Oscillator Circuit ON
! buffer[4] = 0x57;//87; // 0: 0 1 0 1 0 1 1 1 <- RAM Address set to 010111 (23)
! buffer[5] = 0xB0; // Set the address pointer
! buffer[8] = 0x05;
! phidgetWrite(phidgetDevice,buffer,9);
! //buffer[0]=0x02;
! //buffer[8]=1;
! //phidgetWrite(phidgetDevice,buffer,9);
! }
! */
! /*
! printf("1\n");fflush(stdout);
! len=strlen(str)/2;
! // Always
! buffer[0] = 0;
! // Set the address 0 0 1 1 0 0 0 0
! form_buffer[0] = 0x30 + (row - 1) * 0x10 + 0x80;
! // Switch to data mode
! form_buffer[1] = 0x02;
! buf_ptr = 2;
! for (i = 0; i<len; i++)
! {
! form_buffer[buf_ptr++] = (unsigned char)str[i];
! }
! for (i = 0; i < (12 - len); i++)
! {
! form_buffer[buf_ptr++] = 0x20;
! }
! // Back into command mode
! form_buffer[buf_ptr++] = 0x01;
! printf("2\n");fflush(stdout);
! for (i = 0; i<buf_ptr; i+=7)
{
! printf(">> %d of %d\n",i,buf_ptr);
! if ((buf_ptr - i) > 7)
! len = 7;
! else
! len = (buf_ptr - i);
!
! for (j = 0; j < len; j++)
! buffer[j + 1] = form_buffer[i + j];
!
! buffer[8] = len;
!
! phidgetWrite(phidgetDevice, buffer, 9);
!
}
!
! printf("3\n");fflush(stdout);
! */
}
--- 1455,1538 ----
/**
! * Helper function to clear the Text LCD
*/
! enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice)
{
! phidgetTextLCDWrite(phidgetDevice,0,0," ");
! phidgetTextLCDWrite(phidgetDevice,1,0," ");
! phidgetTextLCDWrite(phidgetDevice,2,0," ");
! phidgetTextLCDWrite(phidgetDevice,3,0," ");
! }
! /**
! * Helper function to turn the Text LCD on and configure it
! */
! enum ELPError phidgetTextLCDOn(struct phidget *phidgetDevice)
! {
! char buffer[8];
! buffer[0] = 0x69; // 0: 0 1 1 0 1 0 0 1 <- System Set, 4 lines, Use CGRAM
! buffer[1] = 0x31; // 0: 0 0 1 1 0 0 0 1 <- Display ON/OFF, Display ON
! buffer[2] = 0x42; // 0: 0 1 0 0 0 0 1 0 <- Power Save, Oscillator Circuit ON
! buffer[7] = 3;
! phidgetWrite(phidgetDevice,buffer,8);
! }
! /**
! * Helper function to turn the Text LCD off
! */
! enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice)
! {
! char buffer[8];
! buffer[0] = 0x30; // 0: 0 0 1 1 0 0 0 0 <- Display ON/OFF, Display ON
! buffer[1] = 0x40; // 0: 0 1 0 0 0 0 0 0 <- Power Save, Oscillator Circuit ON
! buffer[7] = 2;
! phidgetWrite(phidgetDevice,buffer,8);
! }
! /**
! * Helper function to send data to a Text LCD
! * 0 >= row < 4
! * 0 >= col < 12
! *
! * str can't be longer than 12 bytes, and no bounds checking.
! */
! enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str)
! {
! int pos=0,t,len,tc;
! unsigned char temp[256],buffer[10];
! //temp[pos++] = 0x69; // 0: 0 1 1 0 1 0 0 1 <- System Set, 4 lines, Use CGRAM
! //temp[pos++] = 0x31; // 0: 0 0 1 1 0 0 0 1 <- Display ON/OFF, Display ON
! //temp[pos++] = 0x42; // 0: 0 1 0 0 0 0 1 0 <- Power Save, Oscillator Circuit ON
! temp[pos++] = 0x57; // 0: 0 1 0 1 0 1 1 1 <- RAM Address set to 010111 (23)
! temp[pos++] = 0xB0; // Set the address pointer
! temp[pos++] = 0x30 + row * 0x10 + 0x80+col; // set position we write to
! temp[pos++] = 0x02; // Data mode
! // Write the string
! len=strlen(str);
! if (len>12) len=12;
! for (t=0;t<len;t++)
! temp[pos++]=str[t];
! temp[pos++] = 0x01; // back to command mode
! tc=0;
! for (t=0;t<pos;t++)
! {
! buffer[tc++]=temp[t];
! if (tc==7)
{
! buffer[7]=7;
! phidgetWrite(phidgetDevice,buffer,8);
! tc=0;
}
! }
! if (tc!=0)
! {
! buffer[7]=tc;
! phidgetWrite(phidgetDevice,buffer,8);
}
Index: phidget.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** phidget.h 14 Dec 2002 04:34:36 -0000 1.13
--- phidget.h 14 Dec 2002 18:23:06 -0000 1.14
***************
*** 212,218 ****
--- 212,221 ----
enum ELPError phidget8Servo(struct phidget *phidgetDevice, int id, float percent1, float maxvelocity, float acceleration);
+ enum ELPError phidgetTextLCDOn(struct phidget *phidgetDevice);
+ enum ELPError phidgetTextLCDOff(struct phidget *phidgetDevice);
enum ELPError phidgetInterfaceKit488(struct phidget *phidgetDevice, float analog[4], int digital[8]);
enum ELPError phidgetInterfaceKit880(struct phidget *phidgetDevice, float analog[8], int digital[8]);
enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str);
+ enum ELPError phidgetTextLCDClear(struct phidget *phidgetDevice);
/**
|
|
From: Jack S. <js...@us...> - 2002-12-14 06:49:47
|
Update of /cvsroot/libphidget/libphidget/src/libphidget In directory sc8-pr-cvs1:/tmp/cvs-serv5321/libphidget Modified Files: phidget.c Log Message: Cooler LCD text example Index: phidget.c =================================================================== RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** phidget.c 14 Dec 2002 06:42:44 -0000 1.20 --- phidget.c 14 Dec 2002 06:49:43 -0000 1.21 *************** *** 1491,1496 **** buffer[4] = 0xB0; // Set the address pointer buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col; ! buffer[6] = 0; // testing ! buffer[7] = 5; // testing - this makes it work, not sure why phidgetWrite(phidgetDevice,buffer,8); --- 1491,1495 ---- buffer[4] = 0xB0; // Set the address pointer buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col; ! buffer[7] = 6; // testing - this makes it work, not sure why phidgetWrite(phidgetDevice,buffer,8); *************** *** 1502,1520 **** buffer[4]=str[3]; buffer[5]=str[4]; - - //buffer[6]='5'; - //buffer[7]='1'; - buffer[6]=1; // go back into command mode ! //buffer[7]=8; // this works but not sure why ! ! buffer[7]=6; phidgetWrite(phidgetDevice,buffer,8); - - //for (i=0;i<10;i++) buffer[i]=0; - //buffer[0]=0x01; - //buffer[7]=0; - ////buffer[8]=1; - //phidgetWrite(phidgetDevice,buffer,8); } --- 1501,1507 ---- buffer[4]=str[3]; buffer[5]=str[4]; buffer[6]=1; // go back into command mode ! buffer[7]=7; phidgetWrite(phidgetDevice,buffer,8); } |
|
From: Jack S. <js...@us...> - 2002-12-14 06:49:46
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv5321/examples
Modified Files:
phidget_c.c
Log Message:
Cooler LCD text example
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** phidget_c.c 14 Dec 2002 04:34:35 -0000 1.12
--- phidget_c.c 14 Dec 2002 06:49:43 -0000 1.13
***************
*** 111,116 ****
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_TEXT_LCD)
{
// Close that phidget
! phidgetTextLCDWrite(dev, 1, 0,"Test ");
}
--- 111,125 ----
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_TEXT_LCD)
{
+ int a,b,c;
// Close that phidget
! for (c=0;c<4;c++)
! {
! for (a=0;a<8;a++)
! for (b=0;b<4;b++)
! phidgetTextLCDWrite(dev, 1+b, a," Tst ");
! for (a=0;a<8;a++)
! for (b=0;b<4;b++)
! phidgetTextLCDWrite(dev, 1+b, 8-a," Tst ");
! }
}
|
|
From: Jack S. <js...@us...> - 2002-12-14 06:42:46
|
Update of /cvsroot/libphidget/libphidget/src/libphidget In directory sc8-pr-cvs1:/tmp/cvs-serv4153/libphidget Modified Files: phidget.c Log Message: Fixed Text LCD bug thanks to help from Chester Index: phidget.c =================================================================== RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 |
|
From: Jack S. <js...@us...> - 2002-12-14 06:42:03
|
Update of /cvsroot/libphidget/libphidget/src/libphidget In directory sc8-pr-cvs1:/tmp/cvs-serv3996/libphidget Modified Files: phidget.c Log Message: Fixed a bug (with the help of Chester) in my sending data to Text LCD phidgets Index: phidget.c =================================================================== RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** phidget.c 14 Dec 2002 04:34:35 -0000 1.18 --- phidget.c 14 Dec 2002 06:42:00 -0000 1.19 *************** *** 1492,1501 **** buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col; buffer[6] = 0; // testing ! buffer[7] = 8; // testing - this makes it work, not sure why ! buffer[8] = 5; ! phidgetWrite(phidgetDevice,buffer,9); // Seems to be needed to flush data - //for (i=0;i<10;i++) buffer[i]=0; buffer[0]=0x02; buffer[1]=str[0]; --- 1492,1499 ---- buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col; buffer[6] = 0; // testing ! buffer[7] = 5; // testing - this makes it work, not sure why ! phidgetWrite(phidgetDevice,buffer,8); // Seems to be needed to flush data buffer[0]=0x02; buffer[1]=str[0]; *************** *** 1509,1521 **** buffer[6]=1; // go back into command mode ! buffer[7]=8; // this works but not sure why ! buffer[8]=6; ! phidgetWrite(phidgetDevice,buffer,9); ! for (i=0;i<10;i++) buffer[i]=0; ! buffer[0]=0x01; ! buffer[8]=1; ! phidgetWrite(phidgetDevice,buffer,9); } --- 1507,1520 ---- buffer[6]=1; // go back into command mode ! //buffer[7]=8; // this works but not sure why ! buffer[7]=6; ! phidgetWrite(phidgetDevice,buffer,8); ! //for (i=0;i<10;i++) buffer[i]=0; ! //buffer[0]=0x01; ! //buffer[7]=0; ! ////buffer[8]=1; ! //phidgetWrite(phidgetDevice,buffer,8); } |
|
From: Jack S. <js...@us...> - 2002-12-14 04:34:40
|
Update of /cvsroot/libphidget/libphidget/src/examples
In directory sc8-pr-cvs1:/tmp/cvs-serv6412/examples
Modified Files:
phidget_c.c
Log Message:
Initial support for the Text LCD phidget. Made the C example program work with all supported phidgets.
Index: phidget_c.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/examples/phidget_c.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** phidget_c.c 13 Dec 2002 22:10:26 -0000 1.11
--- phidget_c.c 14 Dec 2002 04:34:35 -0000 1.12
***************
*** 22,28 ****
struct phidget **phidgets;
- printf ("----------------------------------------\n");
- printf ("Phidgets Device driver test.\n\n\n");
-
// Initialize libphiget, here is where the devices are actually retrieved by the library
// We want the library to handle signals (passing it 1)
--- 22,25 ----
***************
*** 41,45 ****
}
! printf ("Device count:%d\n", count);
for (t = 0; t < count; t++)
--- 38,90 ----
}
!
! if (argn==1)
! {
! for (t=0;t<count;t++)
! {
! // Open this phidget
! struct phidget *dev = phidgetOpen (phidgets[t]);
!
! // Print out some information about this phidget
! printf("\n");
! printf(" Vendor Product\n");
! printf("Phidget Name ID ID Serial#\n");
! printf("-------------------------------- ------ ------- -------\n");
! printf ("%32s 0x0%x 0x0%x %06d\n",
! phidgetTypeName (phidgetType (dev)),
! phidgetTypeVendorID (phidgetType (dev)),
! phidgetTypeProductID (phidgetType (dev)), phidgetSerial (dev));
!
! printf("\n\n");
! printf("Must specify a test to run:\n");
! printf(" SERVO1 - test any single servo phidget\n");
! printf(" SERVO4 - test any quad servo phidget\n");
! printf(" SERVO8 - test any 8-way servo phidget\n");
! printf(" IK488 - test 488 interface kit\n");
! printf(" IK880 - test 880 interface kit\n");
! printf(" TEXTLCD - test text lcd\n");
!
!
! phidgetClose(dev);
! }
! printf ("\nTotal attached phidgets:%d\n\n", count);
!
! return(0);
! }
!
! int SERVO=0;
! int IK488=0;
! int IK880=0;
! int TEXTLCD=0;
! if (argn==2)
! {
! if (strcmp(argv[1],"SERVO1")==0) SERVO=1;
! if (strcmp(argv[1],"SERVO4")==0) SERVO=1;
! if (strcmp(argv[1],"SERVO8")==0) SERVO=1;
! if (strcmp(argv[1],"IK488")==0) IK488=1;
! if (strcmp(argv[1],"IK880")==0) IK880=1;
! if (strcmp(argv[1],"TEXTLCD")==0) TEXTLCD=1;
!
! }
for (t = 0; t < count; t++)
***************
*** 56,65 ****
}
- // Print out some information about this phidget
- printf ("Phidget Name:%s Vendor:0x0%x Product:0x0%x Serial#:%06d\n",
- phidgetTypeName (phidgetType (dev)),
- phidgetTypeVendorID (phidgetType (dev)),
- phidgetTypeProductID (phidgetType (dev)), phidgetSerial (dev));
-
if (phidgetLastError()<0)
{
--- 101,104 ----
***************
*** 68,73 ****
}
-
// Is it a servo controller
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_SERVO_CONTROLLER)
{
--- 107,119 ----
}
// Is it a servo controller
+ if (TEXTLCD)
+ if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_TEXT_LCD)
+ {
+ // Close that phidget
+ phidgetTextLCDWrite(dev, 1, 0,"Test ");
+ }
+
+ if (SERVO)
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_SERVO_CONTROLLER)
{
***************
*** 92,96 ****
}
}
! else
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_488)
{
--- 138,143 ----
}
}
!
! if (IK488)
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_488)
{
***************
*** 124,128 ****
}
}
! else
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_880)
{
--- 171,176 ----
}
}
!
! if (IK880)
if (phidgetTypeDeviceClass (phidgetType (dev)) == LP_INTERFACE_KIT_880)
{
|
|
From: Jack S. <js...@us...> - 2002-12-14 04:34:40
|
Update of /cvsroot/libphidget/libphidget/src/libphidget
In directory sc8-pr-cvs1:/tmp/cvs-serv6412/libphidget
Modified Files:
phidget.c phidget.h
Log Message:
Initial support for the Text LCD phidget. Made the C example program work with all supported phidgets.
Index: phidget.c
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** phidget.c 13 Dec 2002 22:57:23 -0000 1.17
--- phidget.c 14 Dec 2002 04:34:35 -0000 1.18
***************
*** 552,556 ****
DBG("_addDevice");
! printf(" Called %s\n",ptd->name);
temp->type = ptd;
--- 552,556 ----
DBG("_addDevice");
! //printf(" Called %s\n",ptd->name);
temp->type = ptd;
***************
*** 794,798 ****
if (wasFound==0)
{
! printf("Bus:0x0%x Dev:0x0%x\n",bus,dev);
/*
if (_isSoftPhidget(pdt))
--- 794,798 ----
if (wasFound==0)
{
! //printf("Bus:0x0%x Dev:0x0%x\n",bus,dev);
/*
if (_isSoftPhidget(pdt))
***************
*** 804,808 ****
serial=_getSerial(dev,pdt);
! printf(" Serial:%d\n",serial);
// have we seen this phidget before
--- 804,808 ----
serial=_getSerial(dev,pdt);
! //printf(" Serial:%d\n",serial);
// have we seen this phidget before
***************
*** 904,907 ****
--- 904,909 ----
_registerDeviceType("Interface Kit 4/8/8", 0x06C2, 0x0040, LP_INTERFACE_KIT_488);
_registerDeviceType("Interface Kit 8/8/0", 0x06C2, 0x0041, LP_INTERFACE_KIT_880);
+ _registerDeviceType("Phidget LCD", 0x06C2, 0x0041, LP_INTERFACE_KIT_880);
+ _registerDeviceType("PhidgetTextLCD ECMA1010 Ver 1.0", 0x06C2, 0x0050,LP_TEXT_LCD);
//_registerDeviceType("RFID VID/PID", 0x06C2, 0x0030, LP_OTHER);
//_registerDeviceType("8-AdvancedServo", 0x06C2, 0x003B, LP_SERVO_CONTROLLER);
***************
*** 912,916 ****
//_registerDeviceType("PhidgetEncoder Ver 1.0", 0x06C2, 0x004B, LP_OTHER);
//_registerDeviceType("PhidgetPower Ver 1.01", 0x06C2, 0x004E, LP_OTHER);
- //_registerDeviceType("PhidgetTextLCD ECMA1010 Ver 1.0", 0x06C2, 0x0050, LP_OTHER);
//_registerDeviceType("PhidgetGraphicLCD Ver 1.0", 0x06C2, 0x0058, LP_OTHER);
//_registerDeviceType("SoftPhidget", 0x06C2, 0x0060, LP_OTHER);
--- 914,917 ----
***************
*** 1448,1451 ****
--- 1449,1588 ----
analog[0]=((unsigned char)buffer[6]+((unsigned char)buffer[5] & 0xf0) * 16);
}
+ }
+
+ return (_error(LPE_NONE));
+ }
+
+ /**
+ * Helper function to send data to a Text LCD
+ */
+ #include <stdio.h>
+ enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str)
+ {
+ {
+ int t,i,j, len, buf_ptr;
+ unsigned char form_buffer[30];
+ unsigned char buffer[10];//={0,0,0,0,0,0,0,0,0,0};
+
+ /* 0000 - 0
+ * 0001 - 1
+ * 0010 - 2
+ * 0011 - 3
+ * 0100 - 4
+ * 0101 - 5
+ * 0110 - 6
+ * 0111 - 7
+ * 1000 - 8
+ * 1001 - 9
+ * 1010 - A
+ * 1011 - B
+ * 1100 - C
+ * 1101 - D
+ * 1110 - E
+ * 1111 - F
+ */
+
+ {
+ // Initialize command mode
+ buffer[0] = 0x69; // 0: 0 1 1 0 1 0 0 1 <- System Set, 4 lines, Use CGRAM
+ buffer[1] = 0x31; // 0: 0 0 1 1 0 0 0 1 <- Display ON/OFF, Display ON
+ buffer[2] = 0x42;//66; // 0: 0 1 0 0 0 0 1 0 <- Power Save, Oscillator Circuit ON
+ buffer[3] = 0x57;//87; // 0: 0 1 0 1 0 1 1 1 <- RAM Address set to 010111 (23)
+ buffer[4] = 0xB0; // Set the address pointer
+ buffer[5] = 0x30 + (row - 1) * 0x10 + 0x80+col;
+ buffer[6] = 0; // testing
+ buffer[7] = 8; // testing - this makes it work, not sure why
+ buffer[8] = 5;
+ phidgetWrite(phidgetDevice,buffer,9);
+
+ // Seems to be needed to flush data
+ //for (i=0;i<10;i++) buffer[i]=0;
+ buffer[0]=0x02;
+ buffer[1]=str[0];
+ buffer[2]=str[1];
+ buffer[3]=str[2];
+ buffer[4]=str[3];
+ buffer[5]=str[4];
+
+ //buffer[6]='5';
+ //buffer[7]='1';
+
+ buffer[6]=1; // go back into command mode
+ buffer[7]=8; // this works but not sure why
+
+ buffer[8]=6;
+ phidgetWrite(phidgetDevice,buffer,9);
+
+ for (i=0;i<10;i++) buffer[i]=0;
+ buffer[0]=0x01;
+ buffer[8]=1;
+ phidgetWrite(phidgetDevice,buffer,9);
+
+ }
+
+ /*
+ {
+ // Initialize command mode
+ buffer[0] = 0; // buffer[0] is a windows thing
+ buffer[1] = 0x69; // 0: 0 1 1 0 1 0 0 1 <- System Set, 4 lines, Use CGRAM
+ buffer[2] = 0x31; // 0: 0 0 1 1 0 0 0 1 <- Display ON/OFF, Display ON
+ buffer[3] = 0x42;//66; // 0: 0 1 0 0 0 0 1 0 <- Power Save, Oscillator Circuit ON
+ buffer[4] = 0x57;//87; // 0: 0 1 0 1 0 1 1 1 <- RAM Address set to 010111 (23)
+ buffer[5] = 0xB0; // Set the address pointer
+
+ buffer[8] = 0x05;
+
+ phidgetWrite(phidgetDevice,buffer,9);
+
+ //buffer[0]=0x02;
+ //buffer[8]=1;
+ //phidgetWrite(phidgetDevice,buffer,9);
+ }
+ */
+
+ /*
+ printf("1\n");fflush(stdout);
+ len=strlen(str)/2;
+
+ // Always
+ buffer[0] = 0;
+
+ // Set the address 0 0 1 1 0 0 0 0
+ form_buffer[0] = 0x30 + (row - 1) * 0x10 + 0x80;
+
+ // Switch to data mode
+ form_buffer[1] = 0x02;
+ buf_ptr = 2;
+ for (i = 0; i<len; i++)
+ {
+ form_buffer[buf_ptr++] = (unsigned char)str[i];
+ }
+ for (i = 0; i < (12 - len); i++)
+ {
+ form_buffer[buf_ptr++] = 0x20;
+ }
+ // Back into command mode
+ form_buffer[buf_ptr++] = 0x01;
+
+ printf("2\n");fflush(stdout);
+ for (i = 0; i<buf_ptr; i+=7)
+ {
+ printf(">> %d of %d\n",i,buf_ptr);
+ if ((buf_ptr - i) > 7)
+ len = 7;
+ else
+ len = (buf_ptr - i);
+
+ for (j = 0; j < len; j++)
+ buffer[j + 1] = form_buffer[i + j];
+
+ buffer[8] = len;
+
+ phidgetWrite(phidgetDevice, buffer, 9);
+
+ }
+
+ printf("3\n");fflush(stdout);
+ */
}
Index: phidget.h
===================================================================
RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** phidget.h 13 Dec 2002 22:53:56 -0000 1.12
--- phidget.h 14 Dec 2002 04:34:36 -0000 1.13
***************
*** 71,75 ****
LP_RFID = 600, /**< Currently unsupported */
LP_LED = 700, /**< Currently unsupported */
! LP_TEXTLCD = 800, /**< Currently unsupported */
// Phidget devices, a phidget device is something a phidget controls
--- 71,75 ----
LP_RFID = 600, /**< Currently unsupported */
LP_LED = 700, /**< Currently unsupported */
! LP_TEXT_LCD = 800, /**< Currently unsupported */
// Phidget devices, a phidget device is something a phidget controls
***************
*** 214,217 ****
--- 214,218 ----
enum ELPError phidgetInterfaceKit488(struct phidget *phidgetDevice, float analog[4], int digital[8]);
enum ELPError phidgetInterfaceKit880(struct phidget *phidgetDevice, float analog[8], int digital[8]);
+ enum ELPError phidgetTextLCDWrite(struct phidget *phidgetDevice, int row, int col, const char *str);
/**
|
|
From: Jack S. <js...@us...> - 2002-12-13 22:57:30
|
Update of /cvsroot/libphidget/libphidget/src/libphidget In directory sc8-pr-cvs1:/tmp/cvs-serv24353/libphidget Modified Files: phidget.c Log Message: Fixed spelling mistake Index: phidget.c =================================================================== RCS file: /cvsroot/libphidget/libphidget/src/libphidget/phidget.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** phidget.c 13 Dec 2002 22:10:26 -0000 1.16 --- phidget.c 13 Dec 2002 22:57:23 -0000 1.17 *************** *** 408,412 **** memcpy(_typeList[_typeCount].name, name, len); ! _typeList[_typeCount].name[63] = 0; _typeCount++; --- 408,412 ---- memcpy(_typeList[_typeCount].name, name, len); ! _typeList[_typeCount].name[len] = 0; _typeCount++; |