Inital work on boost mode
This commit is contained in:
@@ -29,7 +29,7 @@ enum {
|
|||||||
TEMPCAL, //Cal tip temp offset
|
TEMPCAL, //Cal tip temp offset
|
||||||
|
|
||||||
} operatingMode;
|
} operatingMode;
|
||||||
#define SETTINGSOPTIONSCOUNT 9 /*Number of settings in the settings menu*/
|
#define SETTINGSOPTIONSCOUNT 10 /*Number of settings in the settings menu*/
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
UVCO = 0,
|
UVCO = 0,
|
||||||
@@ -42,6 +42,7 @@ enum {
|
|||||||
TEMPROUNDING,
|
TEMPROUNDING,
|
||||||
DISPUPDATERATE,
|
DISPUPDATERATE,
|
||||||
LEFTY,
|
LEFTY,
|
||||||
|
BOOSTMODE,
|
||||||
} settingsPage;
|
} settingsPage;
|
||||||
|
|
||||||
void ProcessUI();
|
void ProcessUI();
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
#define SETTINGS_H_
|
#define SETTINGS_H_
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "stm32f10x_flash.h"
|
#include "stm32f10x_flash.h"
|
||||||
#define SETTINGSVERSION 0x08 /*Change this if you change the struct below to prevent people getting out of sync*/
|
#define SETTINGSVERSION 0x09 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||||
//Motion Sensitivity
|
//Motion Sensitivity
|
||||||
#define MOTION_HIGH (0x00)
|
#define MOTION_HIGH (0x00)
|
||||||
#define MOTION_MED (0x01)
|
#define MOTION_MED (0x01)
|
||||||
@@ -25,7 +25,6 @@
|
|||||||
#define ROUNDING_FIVE (0x01)
|
#define ROUNDING_FIVE (0x01)
|
||||||
#define ROUNDING_TEN (0x02)
|
#define ROUNDING_TEN (0x02)
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
|
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
|
||||||
*/
|
*/
|
||||||
@@ -38,10 +37,11 @@ struct {
|
|||||||
uint8_t movementEnabled :1; //If movement is enabled
|
uint8_t movementEnabled :1; //If movement is enabled
|
||||||
uint8_t displayTempInF :1; //If we need to convert the C reading to F
|
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 flipDisplay :1; //If true we want to invert the display for lefties
|
||||||
uint8_t sensitivity:6; //Sensitivity of accelerometer
|
uint8_t sensitivity :5; //Sensitivity of accelerometer
|
||||||
uint8_t ShutdownTime :6; //Time until unit shuts down if left alone
|
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 displayUpdateSpeed :2;//How fast the display updates / temp showing mode
|
||||||
uint8_t temperatureRounding :2; //Rounding mode for the temperature
|
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 tempCalibration; //Temperature calibration value
|
||||||
uint16_t voltageDiv; //Voltage divisor factor
|
uint16_t voltageDiv; //Voltage divisor factor
|
||||||
} systemSettings;
|
} systemSettings;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ void ProcessUI() {
|
|||||||
break;
|
break;
|
||||||
case SOLDERING:
|
case SOLDERING:
|
||||||
//We need to check the buttons if we need to jump out
|
//We need to check the buttons if we need to jump out
|
||||||
if (Buttons == BUT_A || Buttons == BUT_B) {
|
if ((Buttons == BUT_A && !systemSettings.boostModeEnabled)|| Buttons == BUT_B) {
|
||||||
//A or B key pressed so we are moving to temp set
|
//A or B key pressed so we are moving to temp set
|
||||||
operatingMode = TEMP_ADJ;
|
operatingMode = TEMP_ADJ;
|
||||||
} else if (Buttons == (BUT_A | BUT_B)) {
|
} else if (Buttons == (BUT_A | BUT_B)) {
|
||||||
@@ -49,7 +49,12 @@ void ProcessUI() {
|
|||||||
//Both buttons were pressed, exit back to the cooling screen
|
//Both buttons were pressed, exit back to the cooling screen
|
||||||
operatingMode = COOLING;
|
operatingMode = COOLING;
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else if (Buttons == BUT_A && systemSettings.boostModeEnabled)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
//We need to check the timer for movement in case we need to goto idle
|
//We need to check the timer for movement in case we need to goto idle
|
||||||
if (systemSettings.movementEnabled)
|
if (systemSettings.movementEnabled)
|
||||||
if (millis() - getLastMovement()
|
if (millis() - getLastMovement()
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ void resetSettings() {
|
|||||||
systemSettings.tempCalibration=239; //Default to their calibration value
|
systemSettings.tempCalibration=239; //Default to their calibration value
|
||||||
systemSettings.voltageDiv=144; //Default divider from schematic
|
systemSettings.voltageDiv=144; //Default divider from schematic
|
||||||
systemSettings.ShutdownTime=30; //How many minutes until the unit turns itself off
|
systemSettings.ShutdownTime=30; //How many minutes until the unit turns itself off
|
||||||
systemSettings.displayUpdateSpeed=0; //How fast the LCD updates
|
systemSettings.displayUpdateSpeed=1; //How fast the LCD updates
|
||||||
systemSettings.temperatureRounding=0; //How the temperature is rounded off
|
systemSettings.temperatureRounding=0; //How the temperature is rounded off
|
||||||
|
systemSettings.boostModeEnabled=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,19 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<targetDefinitions xmlns="http://openstm32.org/stm32TargetDefinitions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openstm32.org/stm32TargetDefinitions stm32TargetDefinitions.xsd">
|
<!DOCTYPE targetDefinitions [
|
||||||
|
<!ELEMENT targetDefinitions (board)>
|
||||||
|
<!ELEMENT board (name, dbgIF+, dbgDEV, mcuId)>
|
||||||
|
<!ELEMENT name (#PCDATA)>
|
||||||
|
<!ELEMENT dbgIF (#PCDATA)>
|
||||||
|
<!ELEMENT dbgDEV (#PCDATA)>
|
||||||
|
<!ELEMENT mcuId (#PCDATA)>
|
||||||
|
<!ATTLIST board id CDATA #REQUIRED>
|
||||||
|
]>
|
||||||
|
|
||||||
|
<targetDefinitions>
|
||||||
<board id="ts100">
|
<board id="ts100">
|
||||||
<name>ts100</name>
|
<name>ts100</name>
|
||||||
<mcuId>stm32f103t8ux</mcuId>
|
|
||||||
<dbgIF>SWD</dbgIF>
|
<dbgIF>SWD</dbgIF>
|
||||||
<dbgDEV>ST-Link</dbgDEV>
|
<dbgDEV>ST-Link</dbgDEV>
|
||||||
|
<mcuId>stm32f103t8ux</mcuId>
|
||||||
</board>
|
</board>
|
||||||
</targetDefinitions>
|
</targetDefinitions>
|
||||||
|
|||||||
Reference in New Issue
Block a user