mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Refactoring: REVERSE_BUTTON_MENU handling and unify comment/section style in configuration.h files for related changes
This commit is contained in:
@@ -53,15 +53,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OLED Orientation
|
* OLED Orientation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#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 MAX_ORIENTATION_MODE 1 // Unlikely to ever change
|
#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_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
|
* OLED Brightness
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
||||||
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
||||||
|
|||||||
@@ -53,15 +53,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OLED Orientation
|
* OLED Orientation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#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 MAX_ORIENTATION_MODE 2 // Up to auto
|
#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_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
|
* OLED Brightness
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#if defined(MODEL_TS101)
|
#if defined(MODEL_TS101)
|
||||||
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
||||||
|
|||||||
@@ -53,15 +53,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OLED Orientation
|
* OLED Orientation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#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 MAX_ORIENTATION_MODE 2 // Up to auto
|
#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_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
|
* OLED Brightness
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
|
||||||
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
|
||||||
|
|||||||
@@ -53,15 +53,18 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OLED Orientation
|
* OLED Orientation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#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 MAX_ORIENTATION_MODE 2 // Up to auto
|
#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_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
|
* OLED Brightness
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
||||||
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
|
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
/**
|
/**
|
||||||
* Configuration.h
|
* Configuration.h
|
||||||
* Define here your default pre settings for S60
|
* Define here your default pre settings for S60
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
@@ -21,7 +20,6 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OLED Brightness
|
* OLED Brightness
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
#define MIN_BRIGHTNESS 1 // Min OLED brightness selectable
|
||||||
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
|
#define MAX_BRIGHTNESS 101 // Max OLED brightness selectable
|
||||||
@@ -62,11 +60,15 @@
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* OLED Orientation
|
* OLED Orientation
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define ORIENTATION_MODE 0 // 0: Right 1:Left (2:Automatic N/A)
|
#define ORIENTATION_MODE 0 // 0: Right 1:Left (2:Automatic N/A)
|
||||||
#define MAX_ORIENTATION_MODE 1 // Disable auto mode
|
#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_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
|
* Temp change settings
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ typedef struct {
|
|||||||
} SettingConstants;
|
} SettingConstants;
|
||||||
|
|
||||||
static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOptionsLength] = {
|
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, SOLDERING_TEMP}, // SolderingTemp
|
||||||
{ MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp
|
{ MIN_TEMP_C, MAX_TEMP_F, 5, 150}, // SleepTemp
|
||||||
{ 0, 15, 1, SLEEP_TIME}, // SleepTime
|
{ 0, 15, 1, SLEEP_TIME}, // SleepTime
|
||||||
@@ -111,6 +111,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
|||||||
{ 0, 12, 1, 0}, // HallEffectSleepTime
|
{ 0, 12, 1, 0}, // HallEffectSleepTime
|
||||||
{ 0, (tipType_t::TIP_TYPE_MAX - 1) > 0 ? (tipType_t::TIP_TYPE_MAX - 1) : 0, 1, 0}, // SolderingTipType
|
{ 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));
|
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user