Increased the timeout of grabbed images.

Former-commit-id: efc9d44a51ffd50e3233c6460a70335205b0c9f3
This commit is contained in:
T. van der Zwan 2014-01-28 08:55:54 +00:00
parent 1bc65a78ac
commit 6864ef6e43
2 changed files with 9 additions and 9 deletions

View File

@ -1 +1 @@
e1b870c27b4cf133a895ed91f825c3c6f6f69e58
cc218832df7b1806355dc00559924630e3bc54be

View File

@ -1,21 +1,21 @@
// hyperion-v4l2 includes
#include "ImageHandler.h"
ImageHandler::ImageHandler(const std::string &address, int priority, double signalThreshold, bool skipProtoReply) :
_priority(priority),
_connection(address),
_signalThreshold(signalThreshold),
_signalProcessor(100, 50, 0, uint8_t(std::min(255, std::max(0, int(255*signalThreshold)))))
ImageHandler::ImageHandler(const std::string & address, int priority, double signalThreshold, bool skipProtoReply) :
_priority(priority),
_connection(address),
_signalThreshold(signalThreshold),
_signalProcessor(100, 50, 0, uint8_t(std::min(255, std::max(0, int(255*signalThreshold)))))
{
_connection.setSkipReply(skipProtoReply);
}
void ImageHandler::receiveImage(const Image<ColorRgb> &image)
void ImageHandler::receiveImage(const Image<ColorRgb> & image)
{
// check if we should do signal detection
if (_signalThreshold < 0)
{
_connection.setImage(image, _priority, 200);
_connection.setImage(image, _priority, 1000);
}
else
{
@ -28,7 +28,7 @@ void ImageHandler::receiveImage(const Image<ColorRgb> &image)
// send the image to Hyperion if we have a signal
if (!_signalProcessor.getCurrentBorder().unknown)
{
_connection.setImage(image, _priority, 200);
_connection.setImage(image, _priority, 1000);
}
}
}