mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Increased the timeout of grabbed images.
Former-commit-id: efc9d44a51ffd50e3233c6460a70335205b0c9f3
This commit is contained in:
parent
1bc65a78ac
commit
6864ef6e43
@ -1 +1 @@
|
||||
e1b870c27b4cf133a895ed91f825c3c6f6f69e58
|
||||
cc218832df7b1806355dc00559924630e3bc54be
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user