mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Draft tip selection menu
This commit is contained in:
@@ -16,6 +16,10 @@
|
||||
#include <string.h> // for memset
|
||||
bool sanitiseSettings();
|
||||
|
||||
/*
|
||||
* Used to constrain the QC 3.0 Voltage selection to suit hardware.
|
||||
* We allow a little overvoltage for users who want to push it
|
||||
*/
|
||||
#ifdef POW_QC_20V
|
||||
#define QC_VOLTAGE_MAX 220
|
||||
#else
|
||||
@@ -105,6 +109,7 @@ static const SettingConstants settingsConstants[(int)SettingsOptions::SettingsOp
|
||||
{ 10, 180, 5, 30}, // ProfilePhase5Duration
|
||||
{ 1, 10, 1, 2}, // ProfileCooldownSpeed
|
||||
{ 0, 12, 1, 0}, // HallEffectSleepTime
|
||||
{ 0, tipType_t::TIP_TYPE_MAX, 1, 0}, // SolderingTipType
|
||||
};
|
||||
static_assert((sizeof(settingsConstants) / sizeof(SettingConstants)) == ((int)SettingsOptions::SettingsOptionsLength));
|
||||
|
||||
@@ -292,3 +297,19 @@ uint8_t lookupVoltageLevel() {
|
||||
return (minVoltageOnCell * minVoltageCellCount) + (minVoltageCellCount * 2);
|
||||
}
|
||||
}
|
||||
|
||||
const char *lookupTipName() {
|
||||
// Get the name string for the current soldering tip
|
||||
tipType_t value = (tipType_t)getSettingValue(SettingsOptions::SolderingTipType);
|
||||
|
||||
switch (value) {
|
||||
#ifdef AUTO_TIP_SELECTION
|
||||
case tipType_t::AUTO:
|
||||
return translatedString(Tr->USBPDModeDefault);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user