uniba-swt / libbidib

A library for communication with a BiDiB (www.bidib.org) system using a serial connection.
GNU General Public License v3.0
10 stars 4 forks source link

Incorrect signals-dcc parameter calculation #29

Closed BLuedtke closed 1 year ago

BLuedtke commented 1 year ago

With Commit f6f11a2, I attempted to fix a bug in how signal-dcc parameters are calculated. I based the bugfix on the code for dcc points. However, I made a mistake doing that.

On line 256 in bidib_highlevel_setter, the .value member should be left-shifted by 5, note ORed with a 1 that was left-shifted by 5. Compare the following:

  1. Current buggy signals dcc assignment: 1

  2. Correct points dcc assignment: 2

The necessary action to be taken is obvious.