Add macro to enable tip types for supported hardware only
This commit is contained in:
@@ -116,8 +116,10 @@ static bool showHallEffect(void);
|
||||
#endif /* HALL_SENSOR */
|
||||
|
||||
// Tip type selection
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
static void displaySolderingTipType(void);
|
||||
static bool showSolderingTipType(void);
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
// Menu functions
|
||||
|
||||
@@ -267,12 +269,12 @@ const menuitem powerMenu[] = {
|
||||
|
||||
const menuitem solderingMenu[] = {
|
||||
/*
|
||||
* Tip Type
|
||||
* Boost Mode Temp
|
||||
* Auto Start
|
||||
* Temp Change Short Step
|
||||
* Temp Change Long Step
|
||||
* Locking Mode
|
||||
* Tip Type
|
||||
* Profile Phases
|
||||
* Profile Preheat Temperature
|
||||
* Profile Preheat Max Temperature Change Per Second
|
||||
@@ -288,8 +290,6 @@ const menuitem solderingMenu[] = {
|
||||
* Profile Phase 5 Duration (s)
|
||||
* Profile Cooldown Max Temperature Change Per Second
|
||||
*/
|
||||
/* Tip Type */
|
||||
{SETTINGS_DESC(SettingsItemIndex::SolderingTipType), nullptr, displaySolderingTipType, showSolderingTipType, SettingsOptions::SolderingTipType, SettingsItemIndex::SolderingTipType, 5},
|
||||
/* Boost Temp */
|
||||
{SETTINGS_DESC(SettingsItemIndex::BoostTemperature), setBoostTemp, displayBoostTemp, nullptr, SettingsOptions::BoostTemp, SettingsItemIndex::BoostTemperature, 5},
|
||||
/* Auto start */
|
||||
@@ -300,6 +300,10 @@ const menuitem solderingMenu[] = {
|
||||
{SETTINGS_DESC(SettingsItemIndex::TempChangeLongStep), nullptr, displayTempChangeLongStep, nullptr, SettingsOptions::TempChangeLongStep, SettingsItemIndex::TempChangeLongStep, 6},
|
||||
/* Locking Mode */
|
||||
{SETTINGS_DESC(SettingsItemIndex::LockingMode), nullptr, displayLockingMode, nullptr, SettingsOptions::LockingMode, SettingsItemIndex::LockingMode, 7},
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
/* Tip Type */
|
||||
{SETTINGS_DESC(SettingsItemIndex::SolderingTipType), nullptr, displaySolderingTipType, showSolderingTipType, SettingsOptions::SolderingTipType, SettingsItemIndex::SolderingTipType, 5},
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
#ifdef PROFILE_SUPPORT
|
||||
/* Profile Phases */
|
||||
{SETTINGS_DESC(SettingsItemIndex::ProfilePhases), nullptr, displayProfilePhases, nullptr, SettingsOptions::ProfilePhases, SettingsItemIndex::ProfilePhases, 7},
|
||||
@@ -763,12 +767,16 @@ static void displayHallEffectSleepTime(void) {
|
||||
}
|
||||
}
|
||||
#endif /* HALL_SENSOR */
|
||||
|
||||
#ifdef TIP_TYPE_SUPPORT
|
||||
static void displaySolderingTipType(void) {
|
||||
// TODO wrapping X value
|
||||
OLED::print(lookupTipName(), FontStyle::SMALL, 255, OLED::getCursorX());
|
||||
}
|
||||
// If there is no detection, and no options, max is 0
|
||||
static bool showSolderingTipType(void) { return tipType_t::TIP_TYPE_MAX != 0; }
|
||||
#endif /* TIP_TYPE_SUPPORT */
|
||||
|
||||
static void setTempF(const enum SettingsOptions option) {
|
||||
uint16_t Temp = getSettingValue(option);
|
||||
if (getSettingValue(SettingsOptions::TemperatureInF)) {
|
||||
|
||||
Reference in New Issue
Block a user