mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Merge branch 'master' into rework
This commit is contained in:
@@ -587,6 +587,7 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
||||
printVoltage();
|
||||
OLED::print(SymbolVolts, FontStyle::SMALL);
|
||||
} else {
|
||||
OLED::setCursor(0, 0);
|
||||
// We switch the layout direction depending on the orientation of the oled
|
||||
if (OLED::getRotation()) {
|
||||
// battery
|
||||
@@ -753,19 +754,17 @@ void showDebugMenu(void) {
|
||||
// Max deg C limit
|
||||
OLED::printNumber(TipThermoModel::getTipMaxInC(), 3, FontStyle::SMALL);
|
||||
break;
|
||||
#ifdef HALL_SENSOR
|
||||
case 13:
|
||||
// Print raw hall effect value if availabe, none if hall effect disabled.
|
||||
#ifdef HALL_SENSOR
|
||||
{
|
||||
int16_t hallEffectStrength = getRawHallEffect();
|
||||
if (hallEffectStrength < 0)
|
||||
hallEffectStrength = -hallEffectStrength;
|
||||
OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL);
|
||||
}
|
||||
#else
|
||||
OLED::print(translatedString(Tr->OffString), FontStyle::SMALL);
|
||||
{
|
||||
int16_t hallEffectStrength = getRawHallEffect();
|
||||
if (hallEffectStrength < 0)
|
||||
hallEffectStrength = -hallEffectStrength;
|
||||
OLED::printNumber(hallEffectStrength, 6, FontStyle::SMALL);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -776,7 +775,11 @@ void showDebugMenu(void) {
|
||||
return;
|
||||
else if (b == BUTTON_F_SHORT) {
|
||||
screen++;
|
||||
#ifdef HALL_SENSOR
|
||||
screen = screen % 14;
|
||||
#else
|
||||
screen = screen % 13;
|
||||
#endif
|
||||
}
|
||||
GUIDelay();
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ void startPIDTask(void const *argument __unused) {
|
||||
uint32_t PIDTempTarget = 0;
|
||||
// Pre-seed the adc filters
|
||||
for (int i = 0; i < 128; i++) {
|
||||
vTaskDelay(5);
|
||||
osDelay(5);
|
||||
TipThermoModel::getTipInC(true);
|
||||
getInputVoltageX10(getSettingValue(SettingsOptions::VoltageDiv), 1);
|
||||
}
|
||||
@@ -148,12 +148,12 @@ void detectThermalRunaway(const int16_t currentTipTempInC, const int tError) {
|
||||
|
||||
// Check for thermal runaway, where it has been x seconds with negligible (y) temp rise
|
||||
// While trying to actively heat
|
||||
|
||||
// If we are more than 20C below the setpoint
|
||||
if ((tError > THERMAL_RUNAWAY_TEMP_C)) {
|
||||
// Temp error is high
|
||||
|
||||
// If we have heated up by more than 20C since last sample point, snapshot time and tip temp
|
||||
int16_t delta = (int16_t)currentTipTempInC - (int16_t)tipTempCRunawayTemp;
|
||||
if (delta < 0) {
|
||||
delta = -delta;
|
||||
}
|
||||
if (delta > THERMAL_RUNAWAY_TEMP_C) {
|
||||
// We have heated up more than the threshold, reset the timer
|
||||
tipTempCRunawayTemp = currentTipTempInC;
|
||||
|
||||
Reference in New Issue
Block a user