Skip to content

Commit

Permalink
Merge pull request #1625 from mark-starikov-lynxx/master
Browse files Browse the repository at this point in the history
Update multiplex-mappers.cc
  • Loading branch information
hzeller authored Jul 10, 2024
2 parents 75ecfb6 + 4002747 commit 6ac348e
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/multiplex-mappers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,29 @@ class P10Outdoor32x16HalfScanMapper : public MultiplexMapperBase {
}
};

class P10Outdoor32x16QuarterScanMapper : public MultiplexMapperBase {
public:
P10Outdoor32x16QuarterScanMapper() : MultiplexMapperBase("P10Outdoor32x16QuarterScanMapper", 4) {}
// P10 quarter scan panel, e.g. https://www.ebay.com.au/itm/175517677191

void EditColsRows(int *cols, int *rows) const {
panel_rows_ = *rows;
panel_cols_ = *cols;

*rows /= panel_stretch_factor_/2; // has half stretch factor in y compared to x
*cols *= panel_stretch_factor_;
}

void MapSinglePanel(int x, int y, int *matrix_x, int *matrix_y) const {
int cell_starting_point = (x/8)*32;
int delta_x = x%8;
int offset = (3 - (y/4))*8;
*matrix_x = cell_starting_point + delta_x + offset;
*matrix_y = y%4;
}
};


/*
* Here is where the registration happens.
* If you add an instance of the mapper here, it will automatically be
Expand Down Expand Up @@ -481,6 +504,7 @@ static MuxMapperList *CreateMultiplexMapperList() {
result->push_back(new P8Outdoor1R1G1BMultiplexMapper());
result->push_back(new FlippedStripeMultiplexMapper());
result->push_back(new P10Outdoor32x16HalfScanMapper());
result->push_back(new P10Outdoor32x16QuarterScanMapper());
return result;
}

Expand Down

0 comments on commit 6ac348e

Please sign in to comment.