diff --git a/source/drivers/MicroBitDisplay.cpp b/source/drivers/MicroBitDisplay.cpp index 9927a01..d0d7b84 100644 --- a/source/drivers/MicroBitDisplay.cpp +++ b/source/drivers/MicroBitDisplay.cpp @@ -136,7 +136,10 @@ void MicroBitDisplay::render() // Simple optimisation. // If display is at zero brightness, there's nothing to do. if(brightness == 0) + { + renderFinish(); return; + } // Calculate the bitpattern to write. uint32_t row_data = 0x01 << (matrixMap.rowStart + strobeRow); @@ -208,6 +211,14 @@ void MicroBitDisplay::renderWithLightSense() void MicroBitDisplay::renderGreyscale() { + // Simple optimisation. + // If display is at zero brightness, there's nothing to do. + if(brightness == 0) + { + renderFinish(); + return; + } + uint32_t row_data = 0x01 << (matrixMap.rowStart + strobeRow); uint32_t col_data = 0;