Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Baltzell authored and baltzell committed May 14, 2023
1 parent c64c747 commit 1562902
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ public int[] get(int run, DataBank bank, int row) {
final int sector = bank.getByte("sector", row);
final int layer = bank.getByte("layer", row);
final int comp = bank.getShort("component", row);
// Get the order that would be in the translation tables:
// FIXME: could use RawDataBank instead of modulus, but this service
// should never filter rows and always needs all of them.
final int order = bank.getByte("order", row) % 10;
return this.get(run,banksToTables.get(bank.getDescriptor().getName()),sector,layer,comp,order);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ private void updateBank(int run,DataBank bank) {
bank.setByte("sector",irow,(byte)slco[0]);
bank.setByte("layer",irow,(byte)slco[1]);
bank.setShort("component",irow,(short)slco[2]);
// Restore the original order decade to the new unswapped, true order:
final byte decade = (byte) (bank.getByte("order", irow)/10);
final byte order = (byte) (10*decade + (byte)slco[3]);
bank.setByte("order",irow, order);
Expand Down

0 comments on commit 1562902

Please sign in to comment.