rpi-rgb-led-matrix icon indicating copy to clipboard operation
rpi-rgb-led-matrix copied to clipboard

Provide a way to power the matrix off temporarily

Open amantalion opened this issue 4 years ago • 2 comments

Hi,

Please could you tell me shat is the proper way to power the matrix temporarily off? I found this code in the RGBMatrix for doing that:

if (updater_) {
    updater_->Stop();
    updater_->WaitStopped();
}
delete updater_;

// Make sure LEDs are off.
active_->Clear();
if (io_) active_->framebuffer()->DumpToMatrix(io_, 0);

Then, to power the matrix back on I would use:

matrix->StartRefresh();
matrix->SwapOnVSync(&frameCanvas);

Is that correct? If so, then shall I create a pull request to add the function for powering the matrix off?

Thank you!

amantalion avatar Apr 11 '20 23:04 amantalion

Is there a particular reason you'd like to do that ?

hzeller avatar May 05 '20 06:05 hzeller

To stop the CPU usage when the display would otherwise be blank for an extended period of time.

jeremywww avatar Oct 01 '21 17:10 jeremywww