1
0
forked from me/IronOS

Fix temperature getting bumped off screen

This fixes the temp gettting bumped because I forgot to reset OLED::cursor_y after writing.

Fixes #376 (hopefully)
This commit is contained in:
Ben V. Brown
2018-10-17 08:22:04 +11:00
parent 15f365d2bd
commit 60a951f56f
2 changed files with 41 additions and 30 deletions

View File

@@ -168,9 +168,13 @@ uint16_t getInputVoltageX10(uint16_t divisor) {
} }
#ifdef MODEL_TS80 #ifdef MODEL_TS80
uint8_t QCMode = 0; uint8_t QCMode = 0;
uint8_t QCTries = 0;
void seekQC(int16_t Vx10) { void seekQC(int16_t Vx10) {
if (QCMode <= 1) if (QCMode == 5)
startQC();
if (QCMode == 0)
return; // NOT connected to a QC Charger return; // NOT connected to a QC Charger
if (Vx10 < 50) if (Vx10 < 50)
return; return;
// Seek the QC to the Voltage given if this adapter supports continuous mode // Seek the QC to the Voltage given if this adapter supports continuous mode
@@ -314,12 +318,17 @@ void startQC() {
} }
vTaskDelay(10); // 100mS vTaskDelay(10); // 100mS
} }
QCMode = 5;
QCTries++;
if (QCTries > 10) // 10 goes to get it going
QCMode = 0; QCMode = 0;
// No QC / not working to us
} else { } else {
// no QC // no QC
QCMode = 0;
} }
if (QCTries > 10)
QCMode = 0;
} }
// Get tip resistance in milliohms // Get tip resistance in milliohms
uint32_t calculateTipR(uint8_t useFilter) { uint32_t calculateTipR(uint8_t useFilter) {

View File

@@ -282,8 +282,8 @@ static void gui_drawBatteryIcon() {
OLED::printNumber(1, 1); OLED::printNumber(1, 1);
OLED::setCursor(xPos, 8); OLED::setCursor(xPos, 8);
OLED::printNumber(V % 10, 1); OLED::printNumber(V % 10, 1);
OLED::setFont(0); OLED::setFont(0);
OLED::setCursor(xPos+12,0); // need to reset this as if we drew a wide char
} else { } else {
OLED::printNumber(V, 1); OLED::printNumber(V, 1);
} }
@@ -537,7 +537,6 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
OLED::print(SolderingAdvancedPowerPrompt); // Power: OLED::print(SolderingAdvancedPowerPrompt); // Power:
OLED::printNumber(getTipPWM(), 3); OLED::printNumber(getTipPWM(), 3);
OLED::print("%"); OLED::print("%");
// OLED::printNumber(getTipRawTemp(0), 6);
if (systemSettings.sensitivity && systemSettings.SleepTime) { if (systemSettings.sensitivity && systemSettings.SleepTime) {
OLED::print(" "); OLED::print(" ");
@@ -784,6 +783,7 @@ void startGUITask(void const *argument __unused) {
OLED::setFont(0); OLED::setFont(0);
OLED::displayOnOff(true); // turn lcd on OLED::displayOnOff(true); // turn lcd on
#ifdef MODEL_TS80 #ifdef MODEL_TS80
//Here we re-check for tip presence
if (idealQCVoltage < 90) if (idealQCVoltage < 90)
idealQCVoltage = calculateMaxVoltage(1, idealQCVoltage = calculateMaxVoltage(1,
systemSettings.cutoutSetting); // 1 means use filtered values rather than do its own systemSettings.cutoutSetting); // 1 means use filtered values rather than do its own
@@ -1008,6 +1008,8 @@ void startPIDTask(void const *argument __unused) {
} }
#define MOVFilter 8 #define MOVFilter 8
void startMOVTask(void const *argument __unused) { void startMOVTask(void const *argument __unused) {
OLED::setRotation(false);
#ifdef MODEL_TS80 #ifdef MODEL_TS80
startQC(); startQC();
while (idealQCVoltage == 0) while (idealQCVoltage == 0)