mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Split DC input and QC from being an OR :)
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODEL_TS100
|
#ifdef MODEL_TS100
|
||||||
|
#define POW_DC
|
||||||
#define ACCEL_MMA
|
#define ACCEL_MMA
|
||||||
#define ACCEL_LIS
|
#define ACCEL_LIS
|
||||||
#define TEMP_TMP36
|
#define TEMP_TMP36
|
||||||
|
|||||||
@@ -18,6 +18,8 @@
|
|||||||
#ifdef MODEL_Pinecil
|
#ifdef MODEL_Pinecil
|
||||||
#define POW_PD
|
#define POW_PD
|
||||||
#define POW_QC
|
#define POW_QC
|
||||||
|
#define POW_DC
|
||||||
|
#define POW_QC_20V
|
||||||
#define TEMP_TMP36
|
#define TEMP_TMP36
|
||||||
#define ACCEL_BMA
|
#define ACCEL_BMA
|
||||||
#define HALL_SENSOR
|
#define HALL_SENSOR
|
||||||
|
|||||||
@@ -53,6 +53,13 @@ uint8_t QC_DM_PulledDown() {
|
|||||||
#endif
|
#endif
|
||||||
void QC_resync() {
|
void QC_resync() {
|
||||||
#ifdef POW_QC
|
#ifdef POW_QC
|
||||||
seekQC((systemSettings.cutoutSetting) ? 120 : 90, systemSettings.voltageDiv); // Run the QC seek again if we have drifted too much
|
uint8_t targetvoltage = 90;
|
||||||
|
if (systemSettings.QCIdealVoltage == 1) {
|
||||||
|
targetvoltage = 120;
|
||||||
|
} else if (systemSettings.QCIdealVoltage == 2) {
|
||||||
|
targetvoltage = 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
seekQC(targetvoltage, systemSettings.voltageDiv); // Run the QC seek again if we have drifted too much
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,35 +19,35 @@
|
|||||||
* This struct must be a multiple of 2 bytes as it is saved / restored from
|
* This struct must be a multiple of 2 bytes as it is saved / restored from
|
||||||
* 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
|
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
|
||||||
uint8_t cutoutSetting; // The voltage we cut out at for under voltage OR Power level for TS80
|
uint8_t minDCVoltageCells; // The voltage we cut out at for under voltage when powered by DC jack
|
||||||
uint8_t OrientationMode : 2; // If true we want to invert the display for lefties
|
uint8_t QCIdealVoltage; // Desired QC3.0 voltage (9,12,20V)
|
||||||
uint8_t sensitivity : 4; // Sensitivity of accelerometer (5 bits)
|
uint8_t OrientationMode :2; // Selects between Auto,Right and left handed layouts
|
||||||
uint8_t autoStartMode : 2; // Should the unit automatically jump straight
|
uint8_t sensitivity :4; // Sensitivity of accelerometer (5 bits)
|
||||||
// into soldering mode when power is applied
|
uint8_t autoStartMode :2; // Should the unit automatically jump straight
|
||||||
uint8_t ShutdownTime; // Time until unit shuts down if left alone
|
// into soldering mode when power is applied
|
||||||
|
uint8_t ShutdownTime; // Time until unit shuts down if left alone
|
||||||
|
|
||||||
uint8_t coolingTempBlink : 1; // Should the temperature blink on the cool
|
uint8_t coolingTempBlink :1; // Should the temperature blink on the cool
|
||||||
// down screen until its <50C
|
// down screen until its <50C
|
||||||
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 : 1; // 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 lockingMode : 2; // Store the locking mode
|
uint8_t lockingMode :2; // Store the locking mode
|
||||||
uint8_t KeepAwakePulse; // Keep Awake pulse power in 0.1 watts (10 = 1Watt)
|
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 powerLimit; // Maximum power iron allowed to output
|
uint8_t powerLimit; // Maximum power iron allowed to output
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ extern volatile systemSettingsType systemSettings;
|
|||||||
|
|
||||||
void saveSettings();
|
void saveSettings();
|
||||||
bool restoreSettings();
|
bool restoreSettings();
|
||||||
uint8_t lookupVoltageLevel(uint8_t level);
|
uint8_t lookupVoltageLevel();
|
||||||
uint16_t lookupHallEffectThreshold();
|
uint16_t lookupHallEffectThreshold();
|
||||||
void resetSettings();
|
void resetSettings();
|
||||||
|
|
||||||
|
|||||||
@@ -42,11 +42,11 @@ bool restoreSettings() {
|
|||||||
* 3=5S
|
* 3=5S
|
||||||
* 4=6S
|
* 4=6S
|
||||||
*/
|
*/
|
||||||
uint8_t lookupVoltageLevel(uint8_t level) {
|
uint8_t lookupVoltageLevel() {
|
||||||
if (level == 0)
|
if (systemSettings.minDCVoltageCells == 0)
|
||||||
return 90; // 9V since iron does not function effectively below this
|
return 90; // 9V since iron does not function effectively below this
|
||||||
else
|
else
|
||||||
return (level * 33) + (33 * 2);
|
return (systemSettings.minDCVoltageCells * 33) + (33 * 2);
|
||||||
}
|
}
|
||||||
void resetSettings() {
|
void resetSettings() {
|
||||||
memset((void*) &systemSettings, 0, sizeof(systemSettingsType));
|
memset((void*) &systemSettings, 0, sizeof(systemSettingsType));
|
||||||
@@ -54,9 +54,9 @@ void resetSettings() {
|
|||||||
systemSettings.SleepTime = SLEEP_TIME; // How many seconds/minutes we wait until going
|
systemSettings.SleepTime = SLEEP_TIME; // How many seconds/minutes we wait until going
|
||||||
// to sleep - default 1 min
|
// to sleep - default 1 min
|
||||||
systemSettings.SolderingTemp = SOLDERING_TEMP; // Default soldering temp is 320.0 C
|
systemSettings.SolderingTemp = SOLDERING_TEMP; // Default soldering temp is 320.0 C
|
||||||
systemSettings.cutoutSetting = CUT_OUT_SETTING; // default to no cut-off voltage (or 18W for TS80)
|
systemSettings.minDCVoltageCells = CUT_OUT_SETTING; // default to no cut-off voltage
|
||||||
systemSettings.version =
|
systemSettings.QCIdealVoltage = 0; // Default to 9V for QC3.0 Voltage
|
||||||
SETTINGSVERSION; // Store the version number to allow for easier upgrades
|
systemSettings.version = SETTINGSVERSION; // Store the version number to allow for easier upgrades
|
||||||
systemSettings.detailedSoldering = DETAILED_SOLDERING; // Detailed soldering screen
|
systemSettings.detailedSoldering = DETAILED_SOLDERING; // Detailed soldering screen
|
||||||
systemSettings.detailedIDLE = DETAILED_IDLE; // Detailed idle screen (off for first time users)
|
systemSettings.detailedIDLE = DETAILED_IDLE; // Detailed idle screen (off for first time users)
|
||||||
systemSettings.OrientationMode = ORIENTATION_MODE; // Default to automatic
|
systemSettings.OrientationMode = ORIENTATION_MODE; // Default to automatic
|
||||||
@@ -78,7 +78,7 @@ void resetSettings() {
|
|||||||
systemSettings.TempChangeLongStep = TEMP_CHANGE_LONG_STEP; //
|
systemSettings.TempChangeLongStep = TEMP_CHANGE_LONG_STEP; //
|
||||||
systemSettings.KeepAwakePulse = POWER_PULSE_DEFAULT;
|
systemSettings.KeepAwakePulse = POWER_PULSE_DEFAULT;
|
||||||
systemSettings.TipGain = TIP_GAIN;
|
systemSettings.TipGain = TIP_GAIN;
|
||||||
systemSettings.hallEffectSensitivity=1;
|
systemSettings.hallEffectSensitivity = 1;
|
||||||
saveSettings(); // Save defaults
|
saveSettings(); // Save defaults
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -87,7 +87,7 @@
|
|||||||
#define DETAILED_SOLDERING 0 // 0: Disable 1: Enable - Default 0
|
#define DETAILED_SOLDERING 0 // 0: Disable 1: Enable - Default 0
|
||||||
#define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0
|
#define DETAILED_IDLE 0 // 0: Disable 1: Enable - Default 0
|
||||||
|
|
||||||
#define CUT_OUT_SETTING 0 // default to no cut-off voltage (or 18W for TS80)
|
#define CUT_OUT_SETTING 0 // default to no cut-off voltage
|
||||||
#define TEMPERATURE_INF 0 // default to 0
|
#define TEMPERATURE_INF 0 // default to 0
|
||||||
#define DESCRIPTION_SCROLL_SPEED 0 // 0: Slow 1: Fast - default to slow
|
#define DESCRIPTION_SCROLL_SPEED 0 // 0: Slow 1: Fast - default to slow
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user