MrTJP / ProjectRed

Redstone Engineering
MIT License
471 stars 182 forks source link

Bus Converters off by one #1709

Closed TaeoG closed 2 years ago

TaeoG commented 2 years ago

Describe the bug Bus converters, when converting from analog to a bundled cable, are off by one

To Reproduce Steps to reproduce the behavior:

  1. Place two Bus converters with any length of bundled cable between them, even 0
  2. Configure one to be a DAC, the other an ADC
  3. Connect a red alloy wire or insulated wire to the ADC side, it must be at least length 2
  4. Connect something to both converters to read their input and output on their respective analog side, I tried both the nixie tubes from Create and the analog voltmeter from Gauges and Switches
  5. Give different input strengths and observe the output strength

Expected behavior The output strength from the Digital to Analog bus should be the same as the input strength into the Analog to digital bus, and it is as long as the length of cable on the input side is <2.

Crash Log N/A

Versions Include versions of the dependencies. And since you're looking at it, make sure ProjectRed is up to date. Don't submit bugs for old versions, as they could have been fixed.

Screenshots/Videos If applicable, add screenshots or video links to help explain your problem. 2022-01-07_23 15 37 2022-01-07_23 15 57

BallOfEnergy1 commented 2 years ago

As the redstone signal travels, It loses one redstone power every block. This explains why It would be 1 off as after more than 1 block has passed, the signal decrements by one. I believe that bundled cables do not lose power as they go.

MrTJP commented 2 years ago

Sorry for late reply. This is definitely a bug. The bus converter gate should be mapping all redwire signals 238 to 255 to full level 15 analog redstone signals, rather than only 255. Fixing...