Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bbade318d | ||
|
|
f3156e88dc | ||
|
|
13603d8db6 |
@@ -20,15 +20,14 @@ In the latest official firmware they have also added a settings menu system, so
|
||||
|
||||
# Upgrading your ts100 iron
|
||||
This is completely safe, if it goes wrong just put the .hex file from the official website onto the unit and your back to the old firmware. Downloads for the hex files to flash are available on the [releases page.](https://github.com/Ralim/ts100/releases)
|
||||
**You will need a windows computer (7,8,10 tested), using the normal windows explorer to load the firmware.
|
||||
The bootloader does not appear to work under mac or linux at the moment.**
|
||||
Officially the bootloader on the iron only works under windows. However, users have reported that it does work under Mac, and can be made to work under Linux. Details over on the [wiki page](https://github.com/Ralim/ts100/wiki/Upgrading-Firmware).
|
||||
|
||||
1. Hold the button closest to the tip, and plug in the USB to the computer.
|
||||
2. The unit will appear as a USB drive.
|
||||
3. Drag the .hex file onto the USB drive.
|
||||
4. The unit will disconnect and reconnect.
|
||||
5. The filename will have changed to end in .RDY or .ERR .
|
||||
6. If it ends with .RDY your done! Otherwise something went wrong.
|
||||
5. The filename will have changed to end in .RDY or .ERR
|
||||
6. If it ends with .RDY you're done! Otherwise something went wrong.
|
||||
7. Disconnect the USB and power up the iron. You're good to go.
|
||||
|
||||
For the more adventurerous out there, you can also load this firmware onto the device using a SWD programmer.
|
||||
|
||||
@@ -29,6 +29,7 @@ enum {
|
||||
TEMPCAL, //Cal tip temp offset
|
||||
|
||||
} operatingMode;
|
||||
#define SETTINGSOPTIONSCOUNT 8 /*Number of settings in the settings menu*/
|
||||
|
||||
enum {
|
||||
UVCO = 0,
|
||||
@@ -38,6 +39,7 @@ enum {
|
||||
MOTIONDETECT,
|
||||
MOTIONSENSITIVITY,
|
||||
TEMPDISPLAY,
|
||||
DISPLAYMODE,
|
||||
LEFTY,
|
||||
} settingsPage;
|
||||
|
||||
|
||||
@@ -11,11 +11,14 @@
|
||||
#define SETTINGS_H_
|
||||
#include <stdint.h>
|
||||
#include "stm32f10x_flash.h"
|
||||
#define SETTINGSVERSION 0x05 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||
#define SETTINGSOPTIONSCOUNT 7 /*Number of settings in the settings menu*/
|
||||
#define MOTION_HIGH (0x00)
|
||||
#define MOTION_MED (0x10)
|
||||
#define MOTION_LOW (0x20)
|
||||
#define SETTINGSVERSION 0x06 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||
#define MOTION_HIGH (0x00)
|
||||
#define MOTION_MED (0x10)
|
||||
#define MOTION_LOW (0x20)
|
||||
#define DISPLAYMODE_FAST (0x00)
|
||||
#define DISPLAYMODE_SLOW (0x01)
|
||||
#define DISPLAYMODE_ROUND (0x02)
|
||||
#define DISPLAYMODE_NONE (0x03)
|
||||
/*
|
||||
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
|
||||
*/
|
||||
@@ -30,6 +33,7 @@ struct {
|
||||
uint8_t flipDisplay:1; //If true we want to invert the display for lefties
|
||||
uint8_t sensitivity:7; //Sensitivity of accelerometer
|
||||
uint8_t ShutdownTime:7; //Time until unit shuts down if left alone
|
||||
uint8_t displayUpdateMode:2; //How fast the display updates / temp showing mode
|
||||
uint16_t tempCalibration; //Temperature calibration value
|
||||
uint16_t voltageDiv; //Voltage divisor factor
|
||||
} systemSettings;
|
||||
|
||||
@@ -37,7 +37,7 @@ void setup() {
|
||||
readIronTemp(systemSettings.tempCalibration, 0,0); //load the default calibration value
|
||||
Init_Oled(systemSettings.flipDisplay); //Init the OLED display
|
||||
|
||||
OLED_DrawString("VER 1.08", 8); //
|
||||
OLED_DrawString("VER 1.09", 8); //
|
||||
delayMs(800); //Pause to show version number
|
||||
Start_Watchdog(1000); //start the system watch dog as 1 second timeout
|
||||
}
|
||||
|
||||
@@ -93,8 +93,10 @@ void ProcessUI() {
|
||||
settingsPage = 0; //reset
|
||||
operatingMode = STARTUP; //reset back to the startup
|
||||
saveSettings(); //Save the settings
|
||||
} else
|
||||
} else {
|
||||
++settingsPage; //move to the next option
|
||||
|
||||
}
|
||||
} else if (Buttons & BUT_B) {
|
||||
resetLastButtonPress();
|
||||
//B changes the value selected
|
||||
@@ -124,6 +126,7 @@ void ProcessUI() {
|
||||
case MOTIONDETECT:
|
||||
systemSettings.movementEnabled =
|
||||
!systemSettings.movementEnabled;
|
||||
|
||||
break;
|
||||
case TEMPDISPLAY:
|
||||
systemSettings.displayTempInF = !systemSettings.displayTempInF;
|
||||
@@ -132,11 +135,17 @@ void ProcessUI() {
|
||||
systemSettings.flipDisplay = !systemSettings.flipDisplay;
|
||||
break;
|
||||
case MOTIONSENSITIVITY:
|
||||
|
||||
systemSettings.sensitivity += 0x10;
|
||||
if (systemSettings.sensitivity > 0x20)
|
||||
systemSettings.sensitivity = 0; //reset to high on wrap
|
||||
|
||||
break;
|
||||
case DISPLAYMODE:
|
||||
systemSettings.displayUpdateMode++;
|
||||
systemSettings.displayUpdateMode =
|
||||
systemSettings.displayUpdateMode % 4;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -288,6 +297,7 @@ void drawTemp(uint16_t temp, uint8_t x) {
|
||||
* Performs all the OLED drawing for the current operating mode
|
||||
*/
|
||||
void DrawUI() {
|
||||
static uint32_t lastSolderingDrawTime = 0;
|
||||
uint16_t temp = readIronTemp(0, 0, 0xFFFF);
|
||||
switch (operatingMode) {
|
||||
case STARTUP:
|
||||
@@ -305,26 +315,47 @@ void DrawUI() {
|
||||
case SOLDERING:
|
||||
//The user is soldering
|
||||
{
|
||||
drawTemp(temp, 0);
|
||||
OLED_DrawChar(' ', 3);
|
||||
if (systemSettings.displayUpdateMode == DISPLAYMODE_SLOW
|
||||
&& (millis() - lastSolderingDrawTime < 1000))
|
||||
return;
|
||||
|
||||
if (systemSettings.displayUpdateMode == DISPLAYMODE_FAST
|
||||
|| systemSettings.displayUpdateMode == DISPLAYMODE_SLOW) {
|
||||
drawTemp(temp, 0);
|
||||
lastSolderingDrawTime = millis();
|
||||
}
|
||||
if (systemSettings.displayUpdateMode == DISPLAYMODE_ROUND) {
|
||||
drawTemp((temp / 100) * 100, 0);
|
||||
|
||||
} else if (systemSettings.displayUpdateMode == DISPLAYMODE_NONE) {
|
||||
OLED_DrawChar(' ', 0);
|
||||
OLED_DrawChar(' ', 1);
|
||||
OLED_DrawChar(' ', 2);
|
||||
}
|
||||
//Now draw symbols
|
||||
OLED_DrawChar(' ', 3);
|
||||
OLED_BlankSlot(6 * 12 + 16, 24 - 16);//blank out the tail after the arrows
|
||||
OLED_BlankSlot(4 * 12 + 16, 24 - 16);//blank out the tail after the temp
|
||||
if (getIronTimer() == 0) {
|
||||
OLED_DrawSymbol(6, 5);
|
||||
} else {
|
||||
if (getIronTimer() < 900) {
|
||||
if (getIronTimer() < 1000) {
|
||||
OLED_DrawSymbol(6, 7);
|
||||
} else { //we are heating
|
||||
//OLED_DrawChar('H', 5);
|
||||
OLED_DrawSymbol(6, 6);
|
||||
}
|
||||
}
|
||||
if (systemSettings.displayTempInF) {
|
||||
OLED_DrawSymbol(4, 1);
|
||||
if (!(systemSettings.displayUpdateMode == DISPLAYMODE_NONE)) {
|
||||
if (systemSettings.displayTempInF) {
|
||||
OLED_DrawSymbol(4, 1);
|
||||
} else {
|
||||
OLED_DrawSymbol(4, 0);
|
||||
}
|
||||
} else {
|
||||
OLED_DrawSymbol(4, 0);
|
||||
OLED_DrawChar(' ', 4);
|
||||
OLED_DrawChar(' ', 5);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
case TEMP_ADJ:
|
||||
@@ -395,7 +426,25 @@ void DrawUI() {
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case DISPLAYMODE:
|
||||
//We are prompting the user about their display mode preferences
|
||||
{
|
||||
switch (systemSettings.displayUpdateMode) {
|
||||
case DISPLAYMODE_FAST:
|
||||
OLED_DrawString("DISPMD F", 8);
|
||||
break;
|
||||
case DISPLAYMODE_SLOW:
|
||||
OLED_DrawString("DISPMD S", 8);
|
||||
break;
|
||||
case DISPLAYMODE_ROUND:
|
||||
OLED_DrawString("DISPMD R", 8);
|
||||
break;
|
||||
case DISPLAYMODE_NONE:
|
||||
OLED_DrawString("DISPMD N", 8);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ void resetSettings() {
|
||||
systemSettings.sensitivity=0x00; //Default high sensitivity
|
||||
systemSettings.tempCalibration=239; //Default to their calibration value
|
||||
systemSettings.voltageDiv=144; //Default divider from schematic
|
||||
systemSettings.ShutdownTime=30;
|
||||
systemSettings.ShutdownTime=30; //How many minutes until the unit turns itself off
|
||||
systemSettings.displayUpdateMode=0; //How fast the LCD updates
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<name>ts100</name>
|
||||
<mcuId>stm32f103t8ux</mcuId>
|
||||
<dbgIF>SWD</dbgIF>
|
||||
<dbgDEV>ST-LinkV2</dbgDEV>
|
||||
<dbgDEV>ST-Link</dbgDEV>
|
||||
</board>
|
||||
</targetDefinitions>
|
||||
|
||||
Reference in New Issue
Block a user