mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Readjusting brightness (Pinecil v2) (#1622)
This commit is contained in:
@@ -60,6 +60,15 @@
|
|||||||
#define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right
|
#define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right
|
||||||
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OLED Brightness
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
||||||
|
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
||||||
|
#define BRIGHTNESS_STEP 25 // OLED brightness increment
|
||||||
|
#define DEFAULT_BRIGHTNESS 25 // default OLED brightness
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temp change settings
|
* Temp change settings
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,6 +59,15 @@
|
|||||||
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
|
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
|
||||||
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OLED Brightness
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
||||||
|
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
||||||
|
#define BRIGHTNESS_STEP 25 // OLED brightness increment
|
||||||
|
#define DEFAULT_BRIGHTNESS 25 // default OLED brightness
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temp change settings
|
* Temp change settings
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,6 +59,15 @@
|
|||||||
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
|
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
|
||||||
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OLED Brightness
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
||||||
|
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
||||||
|
#define BRIGHTNESS_STEP 25 // OLED brightness increment
|
||||||
|
#define DEFAULT_BRIGHTNESS 25 // default OLED brightness
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temp change settings
|
* Temp change settings
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,6 +59,15 @@
|
|||||||
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
|
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
|
||||||
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OLED Brightness
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
||||||
|
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
|
||||||
|
#define BRIGHTNESS_STEP 25 // OLED brightness increment
|
||||||
|
#define DEFAULT_BRIGHTNESS 26 // default OLED brightness
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Temp change settings
|
* Temp change settings
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
|||||||
{0, 0xFFFF, 0, 41431 /*EN*/}, // UILanguage
|
{0, 0xFFFF, 0, 41431 /*EN*/}, // UILanguage
|
||||||
{0, 50, 1, 20}, // PDNegTimeout
|
{0, 50, 1, 20}, // PDNegTimeout
|
||||||
{0, 1, 1, 0}, // OLEDInversion
|
{0, 1, 1, 0}, // OLEDInversion
|
||||||
{0, 99, 11, 33}, // OLEDBrightness
|
{MIN_BRIGHTNESS, MAX_BRIGHTNESS, BRIGHTNESS_STEP, DEFAULT_BRIGHTNESS}, // OLEDBrightness
|
||||||
{0, 5, 1, 1}, // LOGOTime
|
{0, 5, 1, 1}, // LOGOTime
|
||||||
{0, 1, 1, 0}, // CalibrateCJC
|
{0, 1, 1, 0}, // CalibrateCJC
|
||||||
{0, 1, 1, 1}, // BLEEnabled
|
{0, 1, 1, 1}, // BLEEnabled
|
||||||
|
|||||||
@@ -616,7 +616,7 @@ static void displayAnimationLoop(void) { OLED::drawCheckbox(getSettingValue(Sett
|
|||||||
|
|
||||||
static void displayBrightnessLevel(void) {
|
static void displayBrightnessLevel(void) {
|
||||||
|
|
||||||
OLED::printNumber((getSettingValue(SettingsOptions::OLEDBrightness) / 11 + 1), 2, FontStyle::LARGE);
|
OLED::printNumber((getSettingValue(SettingsOptions::OLEDBrightness) / BRIGHTNESS_STEP + 1), 2, FontStyle::LARGE);
|
||||||
// While not optimal to apply this here, it is _very_ convienient
|
// While not optimal to apply this here, it is _very_ convienient
|
||||||
OLED::setBrightness(getSettingValue(SettingsOptions::OLEDBrightness));
|
OLED::setBrightness(getSettingValue(SettingsOptions::OLEDBrightness));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user