Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P3 RGB 64x64 1/16 scan Outdoor led panel multiplexer added #1688

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading