Skip to content

Commit

Permalink
Merge pull request #1688 from IGR2014/master
Browse files Browse the repository at this point in the history
P3 RGB 64x64 1/16 scan Outdoor led panel multiplexer added
  • Loading branch information
hzeller authored Jul 29, 2024
2 parents 058a3bd + d2d0745 commit b84b3f5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/multiplex-mappers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,23 @@ class P10Outdoor32x16QuarterScanMapper : public MultiplexMapperBase {
};


class P3Outdoor64x64MultiplexMapper : public MultiplexMapperBase {
public:
P3Outdoor64x64MultiplexMapper() : MultiplexMapperBase("P3Outdoor64x64MultiplexMapper", 2) {}
// P3 RGB panel 64x64
// with pattern [1] [3]
// | \ |
// [0] [2]

void MapSinglePanel(int x, int y, int *matrix_x, int *matrix_y) const {
const bool is_top_stripe = (y % (panel_rows_/2)) < panel_rows_/4;
*matrix_x = ((x*2) + (is_top_stripe ? 1 : 0));
*matrix_y = ((y / (panel_rows_/2)) * (panel_rows_/4)
+ y % (panel_rows_/4));
}
};


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

Expand Down

0 comments on commit b84b3f5

Please sign in to comment.