|
MaxMatrix
Drive chained 8x8 LED dot matrix modules with MAX7219.
|
Holds the sending back for as long as it exists, as std::lock_guard holds a mutex. More...
#include <MaxMatrix.h>
Public Member Functions | |
| Batch (Matrix &matrix) | |
| Turns auto update of matrix off until the end of the block. | |
| ~Batch () | |
| Puts auto update back as it was, which sends the picture if it was on. | |
| Batch (Batch const &)=delete | |
| Not copyable: a copy would put auto update back twice. | |
| Batch & | operator= (Batch const &)=delete |
| Not assignable, as it is not copyable. | |
Holds the sending back for as long as it exists, as std::lock_guard holds a mutex.
The constructor turns auto update off, the destructor puts back what was there before. So the picture is sent at the end of the block, also on a return or break out of it, and of nested ones only the outermost sends.
A picture built over several calls of loop() does not fit into a block; that is what Matrix::SetAutoUpdate() and Matrix::Update() are for.
|
inlineexplicit |
Turns auto update of matrix off until the end of the block.
| [in,out] | matrix | The matrix; it has to outlive the batch. |