Create settings field for power pulse
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "stm32f1xx_hal.h"
|
#include "stm32f1xx_hal.h"
|
||||||
#include "unit.h"
|
#include "unit.h"
|
||||||
#define SETTINGSVERSION ( 0x1E )
|
#define SETTINGSVERSION ( 0x1F )
|
||||||
/*Change this if you change the struct below to prevent people getting \
|
/*Change this if you change the struct below to prevent people getting \
|
||||||
out of sync*/
|
out of sync*/
|
||||||
|
|
||||||
@@ -21,6 +21,8 @@
|
|||||||
* flash in uint16_t chunks
|
* flash in uint16_t chunks
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
uint8_t version; // Used to track if a reset is needed on firmware upgrade
|
||||||
|
|
||||||
uint16_t SolderingTemp; // current set point for the iron
|
uint16_t SolderingTemp; // current set point for the iron
|
||||||
uint16_t SleepTemp; // temp to drop to in sleep
|
uint16_t SleepTemp; // temp to drop to in sleep
|
||||||
uint8_t SleepTime; // minutes timeout to sleep
|
uint8_t SleepTime; // minutes timeout to sleep
|
||||||
@@ -37,25 +39,26 @@ typedef struct {
|
|||||||
uint8_t detailedIDLE :1; // Detailed idle screen
|
uint8_t detailedIDLE :1; // Detailed idle screen
|
||||||
uint8_t detailedSoldering :1; // Detailed soldering screens
|
uint8_t detailedSoldering :1; // Detailed soldering screens
|
||||||
#ifdef ENABLED_FAHRENHEIT_SUPPORT
|
#ifdef ENABLED_FAHRENHEIT_SUPPORT
|
||||||
uint8_t temperatureInF; // Should the temp be in F or C (true is F)
|
uint8_t temperatureInF :1; // Should the temp be in F or C (true is F)
|
||||||
#endif
|
#endif
|
||||||
uint8_t descriptionScrollSpeed :1; // Description scroll speed
|
uint8_t descriptionScrollSpeed :1; // Description scroll speed
|
||||||
|
uint8_t KeepAwakePulse; // Keep Awake pulse power in 0.1 watts (10 = 1Watt)
|
||||||
|
|
||||||
uint16_t voltageDiv; // Voltage divisor factor
|
uint16_t voltageDiv; // Voltage divisor factor
|
||||||
uint16_t BoostTemp; // Boost mode set point for the iron
|
uint16_t BoostTemp; // Boost mode set point for the iron
|
||||||
uint16_t CalibrationOffset; // This stores the temperature offset for this tip
|
uint16_t CalibrationOffset; // This stores the temperature offset for this tip
|
||||||
// in the iron.
|
// in the iron.
|
||||||
|
|
||||||
uint8_t pidPowerLimit;
|
|
||||||
|
|
||||||
uint8_t powerLimitEnable; // Allow toggling of power limit without changing value
|
uint8_t powerLimitEnable; // Allow toggling of power limit without changing value
|
||||||
uint8_t powerLimit; // Maximum power iron allowed to output
|
uint8_t powerLimit; // Maximum power iron allowed to output
|
||||||
|
|
||||||
uint8_t version; // Used to track if a reset is needed on firmware upgrade
|
uint8_t ReverseButtonTempChangeEnabled; // Change the plus and minus button assigment
|
||||||
|
uint16_t TempChangeLongStep; // Change the plus and minus button assigment
|
||||||
|
uint16_t TempChangeShortStep; // Change the plus and minus button assigment
|
||||||
|
|
||||||
uint32_t padding; // This is here for in case we are not an even divisor so
|
uint32_t padding; // This is here for in case we are not an even divisor so
|
||||||
// that nothing gets cut off
|
// that nothing gets cut off
|
||||||
uint8_t ReverseButtonTempChangeEnabled; // Change the plus and minus button assigment
|
//MUST BE LAST
|
||||||
uint16_t TempChangeLongStep; // Change the plus and minus button assigment
|
|
||||||
uint16_t TempChangeShortStep; // Change the plus and minus button assigment
|
|
||||||
|
|
||||||
} systemSettingsType;
|
} systemSettingsType;
|
||||||
|
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ void resetSettings() {
|
|||||||
systemSettings.descriptionScrollSpeed = DESCRIPTION_SCROLL_SPEED; // default to slow
|
systemSettings.descriptionScrollSpeed = DESCRIPTION_SCROLL_SPEED; // default to slow
|
||||||
systemSettings.powerLimitEnable = POWER_LIMIT_ENABLE; // Default to no power limit
|
systemSettings.powerLimitEnable = POWER_LIMIT_ENABLE; // Default to no power limit
|
||||||
systemSettings.CalibrationOffset = CALIBRATION_OFFSET; // the adc offset in uV
|
systemSettings.CalibrationOffset = CALIBRATION_OFFSET; // the adc offset in uV
|
||||||
systemSettings.pidPowerLimit = PID_POWER_LIMIT; // Sets the max pwm power limit
|
|
||||||
systemSettings.powerLimit = POWER_LIMIT; // 30 watts default limit
|
systemSettings.powerLimit = POWER_LIMIT; // 30 watts default limit
|
||||||
systemSettings.ReverseButtonTempChangeEnabled = REVERSE_BUTTON_TEMP_CHANGE; //
|
systemSettings.ReverseButtonTempChangeEnabled = REVERSE_BUTTON_TEMP_CHANGE; //
|
||||||
systemSettings.TempChangeShortStep = TEMP_CHANGE_SHORT_STEP; //
|
systemSettings.TempChangeShortStep = TEMP_CHANGE_SHORT_STEP; //
|
||||||
systemSettings.TempChangeLongStep = TEMP_CHANGE_LONG_STEP; //
|
systemSettings.TempChangeLongStep = TEMP_CHANGE_LONG_STEP; //
|
||||||
|
systemSettings.KeepAwakePulse= 3;
|
||||||
saveSettings(); // Save defaults
|
saveSettings(); // Save defaults
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user