Merge remote-tracking branch 'origin/master'
# Conflicts: # vscode/OmobiLEDdisplayBluetooth/src/LedDisplayController.cpp
This commit is contained in:
commit
2db886df34
2 changed files with 5 additions and 1 deletions
|
@ -94,6 +94,7 @@ public:
|
|||
void setAutomaticBrightnessAdjustment(bool automaticBrightnessAdjustment);
|
||||
|
||||
private:
|
||||
|
||||
// matrix objects
|
||||
TaskHandle_t displayUpdateTask;
|
||||
NeoPixelBrightnessBusGfx<NeoGrbFeature, Neo800KbpsMethod> *matrix;
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
LedDisplayController *ledDisplayControllerGlobal = nullptr;
|
||||
|
||||
static const uint8_t StepsFade = 255;
|
||||
static const float RFade = (StepsFade*log10(2))/log10(255);
|
||||
|
||||
// --------------------
|
||||
// - Public functions -
|
||||
// --------------------
|
||||
|
@ -188,7 +191,7 @@ void LedDisplayController::disp_scroll_text()
|
|||
void LedDisplayController::show_matrix(const char *text, int pos, const char *color)
|
||||
{
|
||||
//Serial.printf("TEXT: %s (pos=%d, color=%d)\n", text, pos, this->colorFromHex(String(color)));
|
||||
this->matrix->SetBrightness(this->text_sets.disp_brightness);
|
||||
this->matrix->SetBrightness(pow (2, (this->text_sets.disp_brightness / RFade)) - 1);
|
||||
this->matrix->setTextColor(this->colorFromHex(String(color)));
|
||||
this->matrix->setCursor(pos, 0);
|
||||
this->matrix->print(text);
|
||||
|
|
Loading…
Reference in a new issue