mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Inital work on boost mode
This commit is contained in:
@@ -29,7 +29,7 @@ enum {
|
||||
TEMPCAL, //Cal tip temp offset
|
||||
|
||||
} operatingMode;
|
||||
#define SETTINGSOPTIONSCOUNT 9 /*Number of settings in the settings menu*/
|
||||
#define SETTINGSOPTIONSCOUNT 10 /*Number of settings in the settings menu*/
|
||||
|
||||
enum {
|
||||
UVCO = 0,
|
||||
@@ -42,6 +42,7 @@ enum {
|
||||
TEMPROUNDING,
|
||||
DISPUPDATERATE,
|
||||
LEFTY,
|
||||
BOOSTMODE,
|
||||
} settingsPage;
|
||||
|
||||
void ProcessUI();
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#define SETTINGS_H_
|
||||
#include <stdint.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
|
||||
#define MOTION_HIGH (0x00)
|
||||
#define MOTION_MED (0x01)
|
||||
@@ -25,23 +25,23 @@
|
||||
#define ROUNDING_FIVE (0x01)
|
||||
#define ROUNDING_TEN (0x02)
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
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:6; //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 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
|
||||
} systemSettings;
|
||||
|
||||
@@ -41,7 +41,7 @@ void ProcessUI() {
|
||||
break;
|
||||
case SOLDERING:
|
||||
//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
|
||||
operatingMode = TEMP_ADJ;
|
||||
} else if (Buttons == (BUT_A | BUT_B)) {
|
||||
@@ -49,7 +49,12 @@ void ProcessUI() {
|
||||
//Both buttons were pressed, exit back to the cooling screen
|
||||
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
|
||||
if (systemSettings.movementEnabled)
|
||||
if (millis() - getLastMovement()
|
||||
|
||||
@@ -53,8 +53,8 @@ void resetSettings() {
|
||||
systemSettings.tempCalibration=239; //Default to their calibration value
|
||||
systemSettings.voltageDiv=144; //Default divider from schematic
|
||||
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.boostModeEnabled=0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<targetDefinitions xmlns="http://openstm32.org/stm32TargetDefinitions" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openstm32.org/stm32TargetDefinitions stm32TargetDefinitions.xsd">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!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">
|
||||
<name>ts100</name>
|
||||
<mcuId>stm32f103t8ux</mcuId>
|
||||
<dbgIF>SWD</dbgIF>
|
||||
<dbgDEV>ST-Link</dbgDEV>
|
||||
<mcuId>stm32f103t8ux</mcuId>
|
||||
</board>
|
||||
</targetDefinitions>
|
||||
|
||||
Reference in New Issue
Block a user