Fix img_capture_continuous build
Also enable it in the default development build
This commit is contained in:
parent
f733ddcc3b
commit
f498fcd1ea
3 changed files with 7 additions and 10 deletions
|
@ -5,4 +5,4 @@ autoheader || exit 1
|
||||||
autoconf || exit 1
|
autoconf || exit 1
|
||||||
automake -a -c || exit 1
|
automake -a -c || exit 1
|
||||||
./configure --enable-maintainer-mode --enable-examples-build \
|
./configure --enable-maintainer-mode --enable-examples-build \
|
||||||
--enable-debug-log $*
|
--enable-x11-examples-build --enable-debug-log $*
|
||||||
|
|
|
@ -140,7 +140,6 @@ int main(void)
|
||||||
struct fp_dscv_dev *ddev;
|
struct fp_dscv_dev *ddev;
|
||||||
struct fp_dscv_dev **discovered_devs;
|
struct fp_dscv_dev **discovered_devs;
|
||||||
struct fp_dev *dev;
|
struct fp_dev *dev;
|
||||||
struct fp_img_dev *imgdev;
|
|
||||||
int img_width;
|
int img_width;
|
||||||
int img_height;
|
int img_height;
|
||||||
int standardize = 0;
|
int standardize = 0;
|
||||||
|
@ -170,15 +169,13 @@ int main(void)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
imgdev = fp_dev_to_img_dev(dev);
|
if (!fp_dev_supports_imaging(dev)) {
|
||||||
if (!imgdev) {
|
fprintf(stderr, "this device does not have imaging capabilities.\n");
|
||||||
fprintf(stderr, "could not get image dev, is this an imaging "
|
|
||||||
"device?\n");
|
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
img_width = fp_imgdev_get_img_width(imgdev);
|
img_width = fp_dev_get_img_width(dev);
|
||||||
img_height = fp_imgdev_get_img_height(imgdev);
|
img_height = fp_dev_get_img_height(dev);
|
||||||
framebuffer = malloc(img_width * img_height * 2);
|
framebuffer = malloc(img_width * img_height * 2);
|
||||||
if (!framebuffer)
|
if (!framebuffer)
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -211,7 +208,7 @@ int main(void)
|
||||||
while (1) { /* event loop */
|
while (1) { /* event loop */
|
||||||
struct fp_img *img;
|
struct fp_img *img;
|
||||||
|
|
||||||
r = fp_imgdev_capture(imgdev, 1, &img);
|
r = fp_dev_img_capture(dev, 1, &img);
|
||||||
if (r) {
|
if (r) {
|
||||||
fprintf(stderr, "image capture failed, code %d\n", r);
|
fprintf(stderr, "image capture failed, code %d\n", r);
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -440,7 +440,7 @@ retry:
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = get_irq_with_type(dev, IRQDATA_SCANPWR_ON, 400);
|
r = get_irq_with_type(dev, IRQDATA_SCANPWR_ON, 300);
|
||||||
if (r == GET_IRQ_OVERFLOW) {
|
if (r == GET_IRQ_OVERFLOW) {
|
||||||
goto retry;
|
goto retry;
|
||||||
} else if (r == -ETIMEDOUT) {
|
} else if (r == -ETIMEDOUT) {
|
||||||
|
|
Loading…
Reference in a new issue