// std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
- if (flag==0)
- {
- bbSetOutputOut( bbGetInputIn1() );
- }
-
- if (flag==1)
- {
- bbSetOutputOut( bbGetInputIn2() );
- }
-
- flag++;
- flag=(flag%2);
-
+ if (bbGetInputActive()==true)
+ {
+ if (flag==0)
+ {
+ bbSetOutputOut( bbGetInputIn1() );
+ }
+ if (flag==1)
+ {
+ bbSetOutputOut( bbGetInputIn2() );
+ }
+ flag++;
+ flag=(flag%2);
+ } // if Active
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
// SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
// Here we initialize the input 'In' to 0
- flag=0;
- bbSetInputIn1(NULL);
- bbSetInputIn2(NULL);
-
+ flag=0;
+ bbSetInputActive(true);
+ bbSetInputIn1(NULL);
+ bbSetInputIn2(NULL);
}
//=====
// Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)