Disable the blackborder detector for effects

Former-commit-id: 2d4660f48c17977aabff52b7cbbc8d832b216f00
This commit is contained in:
johan 2014-04-30 22:53:05 +02:00
parent 8d75a57f18
commit d5597d55a7
3 changed files with 12 additions and 1 deletions

View File

@ -37,6 +37,9 @@ public:
///
void setSize(const unsigned width, const unsigned height);
/// Enable or disable the black border detector
void enableBalckBorderDetector(bool enable);
///
/// Processes the image to a list of led colors. This will update the size of the buffer-image
/// if required and call the image-to-leds mapping to determine the mean color per led.
@ -142,7 +145,7 @@ private:
const LedString _ledString;
/// Flag the enables(true)/disabled(false) blackborder detector
const bool _enableBlackBorderRemoval;
bool _enableBlackBorderRemoval;
/// The processor for black border detection
hyperion::BlackBorderProcessor * _borderProcessor;

View File

@ -64,6 +64,9 @@ Effect::Effect(PyThreadState * mainThreadState, int priority, int timeout, const
{
_colors.resize(_imageProcessor->getLedCount(), ColorRgb::BLACK);
// disable the black border detector for effects
_imageProcessor->enableBalckBorderDetector(false);
// connect the finished signal
connect(this, SIGNAL(finished()), this, SLOT(effectFinished()));
}

View File

@ -43,6 +43,11 @@ void ImageProcessor::setSize(const unsigned width, const unsigned height)
_imageToLeds = new ImageToLedsMap(width, height, 0, 0, _ledString.leds());
}
void ImageProcessor::enableBalckBorderDetector(bool enable)
{
_enableBlackBorderRemoval = enable;
}
bool ImageProcessor::getScanParameters(size_t led, double &hscanBegin, double &hscanEnd, double &vscanBegin, double &vscanEnd) const
{
if (led < _ledString.leds().size())