Ejemplo n.º 1
0
 public void calc(BooleanItem b)
 {
     if (b.isItem(bi))
     {
         Console.WriteLine("Quittieren! state=" + state + " bi=" + b.ToString());
         this.freigabe(b.getState());
     }
 }
Ejemplo n.º 2
0
        public void calc()
        {
            int i = 0;

            Console.WriteLine("CLACL r=" + biRechts.ToString() + " l=" + biLinks.ToString() + " sr=" + biSchnellrechts.ToString() + " sl=" + biSchnelllinks.ToString());
            if (biLinks.getState())
            {
                i++;
            }
            if (biRechts.getState())
            {
                i++;
            }
            if (biSchnelllinks.getState())
            {
                i++;
            }
            if (biSchnellrechts.getState())
            {
                i++;
            }
            if (i > 1)
            {
                m.setok(false);
                this.setSpeed(0);
                speedX = 0;
            }
            else if (biRechts.getState())
            {
                setSpeed(minSpeed);
            }
            else if (biLinks.getState())
            {
                setSpeed(-minSpeed);
            }
            else if (biSchnelllinks.getState())
            {
                setSpeed(-maxSpeed);
            }
            else if (biSchnellrechts.getState())
            {
                setSpeed(maxSpeed);
            }
            else
            {
                this.setSpeed(0);
            }
        }
Ejemplo n.º 3
0
 public void calcLeuchtmelderState(BooleanItem bi)
 {
     if (this.type == Bedienelement.Leuchtmelder || this.type == Bedienelement.LeuchtTaster)
     {
         if (bi.isItem(this.getLeuchtmelderItem()))
         {
             if (this.getLeuchtmelderAdr().StartsWith("E") || this.getLeuchtmelderAdr().StartsWith("e"))
             {
                 //Console.WriteLine("akt. State=" + this.getLeuchtmelderState() + " Item state=" + bi.getState());
                 if (this.getLeuchtmelderState() == !bi.getState())
                 {
                     Console.WriteLine("Calc Leuchtmelder State:" + bi.ToString() + " aktueller Element state=" + this.getLeuchtmelderState());
                     this.setLeuchtmelderState(bi.getState());
                 }
             }
         }
     }
 }