Difference between revisions of "RPI RMP Drive Advanced"

From ElectroDragon Wiki
 
(No difference)

Latest revision as of 14:31, 12 September 2023

Showroom Project



Advanced - Modify Code and Issues

Modify Transformer demo code

  • The code main differences are the transformer.cc transformer.h
  • notice to apply new transformer in your code, for example the demo code, ADD new line at 1163
matrix->ApplyStaticTransformer(rgb_matrix::EDTransformer()) ;
  • compile again -> cd into folder and compile it: make -C example*
  • now can start to run following demo

Apply new transformer

2018-07-16 183343.png
  • Please refer to above 32*16 zip file code, you can search and file EDTransformer() in 3 files
  • add as demo code to -> transformer.cc, before }; name_space rgb_matrix at the end
  • add as demo code to -> transformer.h, before }; name_space rgb_matrix at the end
  • add as demo code to -> led-matrix.cc, there are two lines
  • apply transformer into demo in line 1162~1163 -> matrix->ApplyStaticTransformer(rgb_matrix::P10outdoorTransformer());

2018-07-16 184504.png

Documents

Transormer for 16x32x1/4


int new_x = 0;
int new_y = 0;
if (y < 4 || (y > 7 && y < 12)) {
new_x = (x * -1) + (24 * ((x / 8) + 1)) - 17;
new_y = y;
} else {
new_x = x + (8 * ((x / 8) + 1));
new_y = y - 4;
}
delegatee_->SetPixel(new_x, new_y, red, green, blue);


Transformer canvas part for 32x32x1/8

new_x = ((x / 16) * 32) + (x % 16);
if ((y & 8) == 0) {
new_x += 16;
}
new_y = ((y / 16) * 16) + (y % 8);
  • Also in your transform class have:
int myTransformer::TransformCanvas::width() const {
return delegatee_->width() / 2; }
int myTransformer::TransformCanvas::height() const {
return delegatee_->height() ; }
  • Change the define in framebuffer.cc to SUB_PANELS_ 4 and remake the librgbmatrix library.
  • Try row = 32 and chains = double the number of panels in a chain.

Apply transformer

  • in demo-main.cc on line 1163 after the check for rotation:
matrix->ApplyStaticTransformer(rgb_matrix::Mikro2347Transformer());
sudo ./demo -D 0 --led-no-hardware-pulse --led-rows=16 --led-chain=2

Constant Matrix Drive


redirect

- read more information here - https://w2.electrodragon.com/Board/MPC/MPC1073-DAT/MPC1073-ref-dat.md