I can’t tell if I am just being dense, or if you have not described your design clearly, or if you have not properly thought out the expected behavior for all possible inputs.
There is a getVoltageSum()
method that sums the voltages across all poly channels into a single value. But I don’t know if that is really what you want.
Suppose channel 0 goes high at t0, then at t1 channel 1 goes high, at t2 channel 0 goes low, at t3 channel 2 goes high, at t4 channel 1 goes low, and finally at t5 channel 2 goes low. Then getVoltageSum()
will give you one continuous high gate between t0 and t5, whereas your original inputs had 3 overlapping gates across different channels at different times. Maybe that is what you want, maybe not.