diff --git a/inc/MicroBitConfig.h b/inc/MicroBitConfig.h index 64757bc..6292d5a 100644 --- a/inc/MicroBitConfig.h +++ b/inc/MicroBitConfig.h @@ -261,8 +261,8 @@ // Selects the minimum permissable brightness level for the device // in the region of 0 (off) to 255 (full brightness) -#define MICROBIT_DISPLAY_MINIMUM_BRIGHTNESS 2 #ifndef MICROBIT_DISPLAY_MINIMUM_BRIGHTNESS +#define MICROBIT_DISPLAY_MINIMUM_BRIGHTNESS 4 #endif // Selects the maximum permissable brightness level for the device diff --git a/source/MicroBitDisplay.cpp b/source/MicroBitDisplay.cpp index 48c93d2..b62c46f 100644 --- a/source/MicroBitDisplay.cpp +++ b/source/MicroBitDisplay.cpp @@ -147,7 +147,7 @@ void MicroBitDisplay::render() //timer does not have enough resolution for brightness of 1. 23.53 us if(brightness != MICROBIT_DISPLAY_MAXIMUM_BRIGHTNESS && brightness > MICROBIT_DISPLAY_MINIMUM_BRIGHTNESS) - renderTimer.attach_us(this, &MicroBitDisplay::renderFinish, (((brightness * 100) / (MICROBIT_DISPLAY_MAXIMUM_BRIGHTNESS)) * uBit.getTickPeriod())); + renderTimer.attach_us(this, &MicroBitDisplay::renderFinish, (((brightness * 1000) / (MICROBIT_DISPLAY_MAXIMUM_BRIGHTNESS)) * uBit.getTickPeriod())); //this will take around 23us to execute if(brightness <= MICROBIT_DISPLAY_MINIMUM_BRIGHTNESS)