void MyTimer::Notify()
{
_box->Process();
+ _box->bbSignalOutputModification(std::string("Out"));
}
+
BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,ImageSwitcherBox)
void ImageSwitcherBox::Process()
{
time = bbGetInputTime();
+ _on = bbGetInputOn();
if(myTimer == NULL)
{
myTimer->Start(time);
oldTime = time;
}
- else if(oldTime != time)
+
+ if(oldTime != time && myTimer !=NULL)
{
+ myTimer->Stop();
myTimer->Start(time);
oldTime = time;
}
-
+
if(change == false)
{
bbSetOutputOut(bbGetInputIn1());
{
bbSetOutputOut(bbGetInputIn2());
change = false;
- }
+ }
}
void ImageSwitcherBox::CreateWidget(wxWindow* parent)
{
{
myTimer = NULL;
change = false;
- time = -1;
- oldTime = -1;
+ time = 500;
+ oldTime = 500;
+ _on = false;
}
void ImageSwitcherBox::bbUserInitializeProcessing()
{
delete myTimer;
}
}
-// EO namespace bbPackRecalage
\ No newline at end of file
+// EO namespace bbPackRecalage
+