Project Red - Fabrication

Project Red - Fabrication

19M Downloads

BundledGateLogic.java

Iree opened this issue ยท 1 comments

commented
  •    public void unpackClientData(int packed) {
    
  •        for (int i = 0; i < 16; i++) {
    
  •            if ((packed & 1<<i) != 0)
    
  •                output0[i] = (byte) 255;
    
  •            if ((packed & 1<<(i+16)) != 0)
    
  •                output2[i] = (byte) 255;
    
  •        }
    
  •    }
    

I see you setting things to 255 when != 0
But I don't see you setting them to 0 otherwise

Is it intentional?

commented

That method is used client side, the client ONLY needs to know if its on or not, to do the red rendering dots with the light panel like in RP2. However, even server side, if its not equal to 0, its set to 255 because the transceiver repeats the signal to full strength, just like a repeater.
It should be a fresh array for client side anyway, but just incase, i will add a new byte[16] before unpacking.