Refactoring: REVERSE_BUTTON_MENU handling and unify comment/section style in configuration.h files for related changes

This commit is contained in:
Ivan Zorin
2025-02-17 18:37:28 +03:00
parent 7e57184b65
commit 0bd84d9d57
6 changed files with 28 additions and 13 deletions

View File

@@ -53,15 +53,18 @@
/**
* OLED Orientation
*
*/
#define ORIENTATION_MODE 0 // 0: Right 1:Left 2:Automatic - Default right
#define MAX_ORIENTATION_MODE 1 // Unlikely to ever change
/**
* Buttons handling
*/
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change
#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only
/**
* OLED Brightness
*
*/
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable

View File

@@ -53,15 +53,18 @@
/**
* OLED Orientation
*
*/
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
#define MAX_ORIENTATION_MODE 2 // Up to auto
/**
* Buttons handling
*/
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change
#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only
/**
* OLED Brightness
*
*/
#if defined(MODEL_TS101)
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable

View File

@@ -53,15 +53,18 @@
/**
* OLED Orientation
*
*/
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
#define MAX_ORIENTATION_MODE 2 // Up to auto
/**
* Buttons handling
*/
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change
#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only
/**
* OLED Brightness
*
*/
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable

View File

@@ -53,15 +53,18 @@
/**
* OLED Orientation
*
*/
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
#define MAX_ORIENTATION_MODE 2 // Up to auto
/**
* Buttons handling
*/
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change
#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only
/**
* OLED Brightness
*
*/
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable

View File

@@ -4,7 +4,6 @@
/**
* Configuration.h
* Define here your default pre settings for S60
*
*/
//===========================================================================
@@ -21,7 +20,6 @@
/**
* OLED Brightness
*
*/
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
@@ -62,11 +60,15 @@
/**
* OLED Orientation
*
*/
#define ORIENTATION_MODE 0 // 0: Right 1:Left (2:Automatic N/A)
#define MAX_ORIENTATION_MODE 1 // Disable auto mode
/**
* Buttons handling
*/
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assignment for temperature change
#define REVERSE_BUTTON_MENU 0 // 0:Default 1:Reverse - Reverse the A and B button assignment for Settings menu only
/**
* Temp change settings

View File

@@ -54,7 +54,7 @@ typedef struct {
} SettingConstants;
static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = {
//{ min, max, increment, default}
// MIN, MAX, INCREMENT, DEFAULT
{ MIN_TEMP_C, MAX_TEMP_F, 5, SOLDERING_TEMP}, // SolderingTemp
{ MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp
{ 0, 15, 1, SLEEP_TIME}, // SleepTime
@@ -110,7 +110,8 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
{ 1, 10, 1, 2}, // ProfileCooldownSpeed
{ 0, 12, 1, 0}, // HallEffectSleepTime
{ 0, (tipType_t::TIP_TYPE_MAX - 1) > 0 ? (tipType_t::TIP_TYPE_MAX - 1) : 0, 1, 0}, // SolderingTipType
{ 0, 1, 1, REVERSE_BUTTON_MENU}, // ReverseButtonMenu
{ 0, 1, 1, REVERSE_BUTTON_MENU}, // ReverseButtonMenu
// MIN, MAX, INCREMENT, DEFAULT
};
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));