Skip to content

Commit

Permalink
Fixed wrong NbOutputs count from DudeCab masks (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vroonsh authored Nov 5, 2024
1 parent 66a038c commit 696e45f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions DirectOutput/Cab/Out/DudesCab/DudesCab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,13 @@ public Device(IntPtr fp, string path, string name, string serial, ushort vendorI
if ((PwmExtensionsMask & (byte)(1 << ext)) != 0) {
for (var output = 0; output < PwmMaxOutputsPerExtension; output++) {
if ((masks[curMask] & (ushort)(1 << output)) != 0) {
this._NumOutputs = Math.Max(this._NumOutputs, (ext * PwmMaxOutputsPerExtension) + output);
this._NumOutputs = Math.Max(this._NumOutputs, (ext * PwmMaxOutputsPerExtension) + output + 1);
}
}
curMask++;
}
}
Log.Write($" Output configuration received, highest configured output is #{this._NumOutputs +1}");
Log.Write($" Output configuration received, highest configured output is #{this._NumOutputs}");
} else {
Log.Warning($"No output configuration received, {this._NumOutputs} will be used, you should update your DudesCab firmware");
}
Expand Down

0 comments on commit 696e45f

Please sign in to comment.