Roughing menu calls in
This commit is contained in:
@@ -68,6 +68,8 @@ static void settings_displayTempChangeShortStep(void);
|
|||||||
static void settings_setTempChangeShortStep(void);
|
static void settings_setTempChangeShortStep(void);
|
||||||
static void settings_displayTempChangeLongStep(void);
|
static void settings_displayTempChangeLongStep(void);
|
||||||
static void settings_setTempChangeLongStep(void);
|
static void settings_setTempChangeLongStep(void);
|
||||||
|
static void settings_displayPowerPulse(void);
|
||||||
|
static void settings_setPowerPulse(void);
|
||||||
|
|
||||||
// Menu functions
|
// Menu functions
|
||||||
static void settings_displaySolderingMenu(void);
|
static void settings_displaySolderingMenu(void);
|
||||||
@@ -175,13 +177,16 @@ const menuitem UIMenu[] = {
|
|||||||
{ (const char*) SettingsDescriptions[5], { settings_setTempF }, {
|
{ (const char*) SettingsDescriptions[5], { settings_setTempF }, {
|
||||||
settings_displayTempF } }, /* Temperature units*/
|
settings_displayTempF } }, /* Temperature units*/
|
||||||
#endif
|
#endif
|
||||||
{ (const char*) SettingsDescriptions[7], { settings_setDisplayRotation }, {
|
{ (const char*) SettingsDescriptions[7],
|
||||||
|
{ settings_setDisplayRotation }, {
|
||||||
settings_displayDisplayRotation } }, /*Display Rotation*/
|
settings_displayDisplayRotation } }, /*Display Rotation*/
|
||||||
{ (const char*) SettingsDescriptions[11], { settings_setCoolingBlinkEnabled }, {
|
{ (const char*) SettingsDescriptions[11], {
|
||||||
|
settings_setCoolingBlinkEnabled }, {
|
||||||
settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
|
settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
|
||||||
{ (const char*) SettingsDescriptions[16], { settings_setScrollSpeed }, {
|
{ (const char*) SettingsDescriptions[16], { settings_setScrollSpeed }, {
|
||||||
settings_displayScrollSpeed } }, /*Scroll Speed for descriptions*/
|
settings_displayScrollSpeed } }, /*Scroll Speed for descriptions*/
|
||||||
{ (const char*) SettingsDescriptions[23], { settings_setReverseButtonTempChangeEnabled }, {
|
{ (const char*) SettingsDescriptions[23], {
|
||||||
|
settings_setReverseButtonTempChangeEnabled }, {
|
||||||
settings_displayReverseButtonTempChangeEnabled } }, /* Reverse Temp change buttons + - */
|
settings_displayReverseButtonTempChangeEnabled } }, /* Reverse Temp change buttons + - */
|
||||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||||
};
|
};
|
||||||
@@ -212,6 +217,7 @@ const menuitem advancedMenu[] = {
|
|||||||
* Calibrate Temperature
|
* Calibrate Temperature
|
||||||
* Calibrate Input V
|
* Calibrate Input V
|
||||||
* Reset Settings
|
* Reset Settings
|
||||||
|
* Power Pulse
|
||||||
*/
|
*/
|
||||||
{ (const char*) SettingsDescriptions[21], { settings_setPowerLimitEnable }, {
|
{ (const char*) SettingsDescriptions[21], { settings_setPowerLimitEnable }, {
|
||||||
settings_displayPowerLimitEnable } }, /*Power limit enable*/
|
settings_displayPowerLimitEnable } }, /*Power limit enable*/
|
||||||
@@ -228,6 +234,8 @@ const menuitem advancedMenu[] = {
|
|||||||
settings_displayCalibrate } }, /*Calibrate tip*/
|
settings_displayCalibrate } }, /*Calibrate tip*/
|
||||||
{ (const char*) SettingsDescriptions[14], { settings_setCalibrateVIN }, {
|
{ (const char*) SettingsDescriptions[14], { settings_setCalibrateVIN }, {
|
||||||
settings_displayCalibrateVIN } }, /*Voltage input cal*/
|
settings_displayCalibrateVIN } }, /*Voltage input cal*/
|
||||||
|
{ (const char*) SettingsDescriptions[16], { settings_setPowerPulse }, {
|
||||||
|
settings_displayPowerPulse } }, /*Power Pulse adjustment */
|
||||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -366,8 +374,7 @@ static void settings_setSleepTemp(void) {
|
|||||||
systemSettings.SleepTemp += 20;
|
systemSettings.SleepTemp += 20;
|
||||||
if (systemSettings.SleepTemp > 580)
|
if (systemSettings.SleepTemp > 580)
|
||||||
systemSettings.SleepTemp = 120;
|
systemSettings.SleepTemp = 120;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
systemSettings.SleepTemp += 10;
|
systemSettings.SleepTemp += 10;
|
||||||
@@ -746,7 +753,8 @@ static void settings_setCalibrateVIN(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void settings_setReverseButtonTempChangeEnabled(void) {
|
static void settings_setReverseButtonTempChangeEnabled(void) {
|
||||||
systemSettings.ReverseButtonTempChangeEnabled = !systemSettings.ReverseButtonTempChangeEnabled;
|
systemSettings.ReverseButtonTempChangeEnabled =
|
||||||
|
!systemSettings.ReverseButtonTempChangeEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_displayReverseButtonTempChangeEnabled(void) {
|
static void settings_displayReverseButtonTempChangeEnabled(void) {
|
||||||
@@ -776,6 +784,23 @@ static void settings_displayTempChangeLongStep(void) {
|
|||||||
OLED::printNumber(systemSettings.TempChangeLongStep, 3);
|
OLED::printNumber(systemSettings.TempChangeLongStep, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void settings_setPowerPulse(void) {
|
||||||
|
systemSettings.KeepAwakePulse += POWER_PULSE_INCREMENT;
|
||||||
|
if (systemSettings.KeepAwakePulse > POWER_PULSE_MAX) {
|
||||||
|
systemSettings.KeepAwakePulse = POWER_PULSE_MAX; // loop back to 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
static void settings_displayPowerPulse(void) {
|
||||||
|
printShortDescription(26, 5);
|
||||||
|
if (systemSettings.TempChangeLongStep) {
|
||||||
|
OLED::printNumber(systemSettings.TempChangeLongStep / 10, 1);
|
||||||
|
OLED::print(SymbolDot);
|
||||||
|
OLED::printNumber(systemSettings.TempChangeLongStep % 10, 1);
|
||||||
|
} else {
|
||||||
|
OLED::drawCheckbox(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
static void displayMenu(size_t index) {
|
static void displayMenu(size_t index) {
|
||||||
// Call into the menu
|
// Call into the menu
|
||||||
OLED::setFont(1);
|
OLED::setFont(1);
|
||||||
@@ -785,7 +810,8 @@ static void displayMenu(size_t index) {
|
|||||||
// Draw symbol
|
// Draw symbol
|
||||||
// 16 pixel wide image
|
// 16 pixel wide image
|
||||||
// 2 pixel wide scrolling indicator
|
// 2 pixel wide scrolling indicator
|
||||||
OLED::drawArea(96 - 16 - 2, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * index]));
|
OLED::drawArea(96 - 16 - 2, 0, 16, 16,
|
||||||
|
(&SettingsMenuIcons[(16 * 2) * index]));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void settings_displayCalibrateVIN(void) {
|
static void settings_displayCalibrateVIN(void) {
|
||||||
|
|||||||
@@ -54,7 +54,9 @@
|
|||||||
#define TEMP_CHANGE_SHORT_STEP_MAX 50 // Temp change short step MAX value
|
#define TEMP_CHANGE_SHORT_STEP_MAX 50 // Temp change short step MAX value
|
||||||
#define TEMP_CHANGE_LONG_STEP_MAX 100 // Temp change long step MAX value
|
#define TEMP_CHANGE_LONG_STEP_MAX 100 // Temp change long step MAX value
|
||||||
|
|
||||||
|
/* Power pulse for keeping power banks awake*/
|
||||||
|
#define POWER_PULSE_INCREMENT 1
|
||||||
|
#define POWER_PULSE_MAX 50 // x10 max watts
|
||||||
/**
|
/**
|
||||||
* OLED Orientation Sensitivity on Automatic mode!
|
* OLED Orientation Sensitivity on Automatic mode!
|
||||||
* Motion Sensitivity <0=Off 1=Least Sensitive 9=Most Sensitive>
|
* Motion Sensitivity <0=Off 1=Least Sensitive 9=Most Sensitive>
|
||||||
|
|||||||
Reference in New Issue
Block a user