V1.11 - Adding a Boost mode

Allows users to enable a boost mode.
This allows you to hold down the button near the tip while soldering to
temporarily boost the soldering temperature.
Closes #10
This commit is contained in:
Ben V. Brown
2017-07-08 23:16:02 +10:00
7 changed files with 186 additions and 113 deletions

View File

@@ -11,7 +11,9 @@ void delayMs(uint32_t ticks);
volatile extern uint32_t lastKeyPress;
volatile extern uint32_t lastMovement;
volatile extern uint16_t keyState;
volatile extern uint8_t keyState;
volatile extern uint8_t rawKeys;
inline uint32_t millis() {
return system_Ticks;
}
@@ -34,6 +36,10 @@ inline uint32_t getLastMovement() {
inline uint16_t getButtons() {
return keyState;
}
inline uint16_t getRawButtons() {
return rawKeys;
}
/*IRQ prototypes*/
void NMI_Handler(void);

View File

@@ -29,7 +29,7 @@ enum {
TEMPCAL, //Cal tip temp offset
} operatingMode;
#define SETTINGSOPTIONSCOUNT 10 /*Number of settings in the settings menu*/
#define SETTINGSOPTIONSCOUNT 11 /*Number of settings in the settings menu*/
enum {
UVCO = 0,
@@ -43,6 +43,7 @@ enum {
DISPUPDATERATE,
LEFTY,
BOOSTMODE,
BOOSTTEMP,
} settingsPage;
void ProcessUI();

View File

@@ -11,7 +11,7 @@
#define SETTINGS_H_
#include <stdint.h>
#include "stm32f10x_flash.h"
#define SETTINGSVERSION 0x09 /*Change this if you change the struct below to prevent people getting out of sync*/
#define SETTINGSVERSION 10 /*Change this if you change the struct below to prevent people getting out of sync*/
//Motion Sensitivity
#define MOTION_HIGH (0x00)
#define MOTION_MED (0x01)
@@ -29,21 +29,22 @@
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
*/
struct {
uint32_t SolderingTemp; //current set point for the iron
uint16_t SolderingTemp; //current set point for the iron
uint32_t SleepTemp; //temp to drop to in sleep
uint8_t version; //Used to track if a reset is needed on firmware upgrade
uint8_t version; //Used to track if a reset is needed on firmware upgrade
uint8_t SleepTime; //minutes timeout to sleep
uint8_t cutoutVoltage :5; //The voltage we cut out at for under voltage
uint8_t movementEnabled :1; //If movement is enabled
uint8_t displayTempInF :1; //If we need to convert the C reading to F
uint8_t flipDisplay :1; //If true we want to invert the display for lefties
uint8_t sensitivity :5; //Sensitivity of accelerometer
uint8_t ShutdownTime :6; //Time until unit shuts down if left alone
uint8_t displayUpdateSpeed :2;//How fast the display updates / temp showing mode
uint8_t temperatureRounding :2; //Rounding mode for the temperature
uint8_t boostModeEnabled :1;//Boost mode swaps BUT_A in soldering mode to temporary soldering temp over-ride
uint8_t cutoutVoltage:5; //The voltage we cut out at for under voltage
uint8_t movementEnabled:1; //If movement is enabled
uint8_t displayTempInF:1; //If we need to convert the C reading to F
uint8_t flipDisplay:1; //If true we want to invert the display for lefties
uint8_t sensitivity:5; //Sensitivity of accelerometer
uint8_t ShutdownTime:6; //Time until unit shuts down if left alone
uint8_t displayUpdateSpeed:2; //How fast the display updates / temp showing mode
uint8_t temperatureRounding:2; //Rounding mode for the temperature
uint8_t boostModeEnabled:1; //Boost mode swaps BUT_A in soldering mode to temporary soldering temp over-ride
uint16_t tempCalibration; //Temperature calibration value
uint16_t voltageDiv; //Voltage divisor factor
uint16_t BoostTemp; //Boost mode set point for the iron
} systemSettings;
void saveSettings();