Skip to content

Commit

Permalink
Add multiplexer for QihangLi 40x20 panel
Browse files Browse the repository at this point in the history
(based on pull request #879 with readability fixes)
  • Loading branch information
JiDudeS authored and hzeller committed Aug 31, 2019
1 parent 5e004a9 commit 9520d3b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion lib/multiplex-mappers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,21 @@ class P10MapperZ : public MultiplexMapperBase {
}
};

class QiangLiQ8 : public MultiplexMapperBase {
public:
QiangLiQ8() : MultiplexMapperBase("QiangLiQ8", 2) {}

void MapSinglePanel(int x, int y, int *matrix_x, int *matrix_y) const {
const int column = x + (4+ 4*(x/4));
*matrix_x = column;
if ((y >= 15 && y <=19) || (y >= 5 && y <= 9)) {
const int reverseColumn = x + (4*(x/4));
*matrix_x = reverseColumn;
}
*matrix_y = y % 5 + (y/10) *5;
}
};

/*
* Here is where the registration happens.
* If you add an instance of the mapper here, it will automatically be
Expand All @@ -257,7 +272,7 @@ static MuxMapperList *CreateMultiplexMapperList() {
result->push_back(new Kaler2ScanMapper());
result->push_back(new ZStripeMultiplexMapper("ZStripeUneven", 8, 0));
result->push_back(new P10MapperZ());

result->push_back(new QiangLiQ8());
return result;
}

Expand Down

0 comments on commit 9520d3b

Please sign in to comment.