diff --git a/workspace/TS100/inc/Font.h b/workspace/TS100/inc/Font.h index eaec78de..f67953fb 100644 --- a/workspace/TS100/inc/Font.h +++ b/workspace/TS100/inc/Font.h @@ -10,7 +10,11 @@ #ifndef FONT_H_ #define FONT_H_ #include "Translation.h" - +#ifdef LANG_RU +#ifndef CYRILLIC_GLYPHS +#define CYRILLIC_GLYPHS +#endif +#endif #define FONT_12_WIDTH 12 /* diff --git a/workspace/TS100/inc/Settings.h b/workspace/TS100/inc/Settings.h index 140bab92..0d99698f 100644 --- a/workspace/TS100/inc/Settings.h +++ b/workspace/TS100/inc/Settings.h @@ -11,8 +11,8 @@ #define SETTINGS_H_ #include #include "stm32f1xx_hal.h" -#define SETTINGSVERSION \ - 0x18 /*Change this if you change the struct below to prevent people getting \ +#define SETTINGSVERSION ( 0x19 ) +/*Change this if you change the struct below to prevent people getting \ out of sync*/ /* @@ -23,7 +23,7 @@ typedef struct { uint16_t SolderingTemp; // current set point for the iron uint16_t SleepTemp; // temp to drop to in 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 cutoutSetting; // The voltage we cut out at for under voltage OR Power level for TS80 uint8_t OrientationMode :2; // If true we want to invert the display for lefties uint8_t sensitivity :4; // Sensitivity of accelerometer (5 bits) uint8_t autoStartMode :2; // Should the unit automatically jump straight diff --git a/workspace/TS100/src/gui.cpp b/workspace/TS100/src/gui.cpp index b9d7b3b1..b66bb1f7 100644 --- a/workspace/TS100/src/gui.cpp +++ b/workspace/TS100/src/gui.cpp @@ -652,22 +652,28 @@ static void setTipOffset() { uint32_t offset = 0; for (uint8_t i = 0; i < 15; i++) { - offset += getTipRawTemp(1); + offset += getTipRawTemp(0); // cycle through the filter a fair bit to ensure we're stable. OLED::clearScreen(); OLED::setCursor(0, 0); + OLED::print("."); for (uint8_t x = 0; x < i / 4; x++) OLED::print("."); OLED::refresh(); - osDelay(333); + osDelay(100); } systemSettings.CalibrationOffset = offset / 15; // Need to remove from this the ambient temperature offset - uint32_t ambientoffset = getHandleTemperature(); // Handle temp in C - ambientoffset *=1000; + uint32_t ambientoffset = getHandleTemperature(); // Handle temp in C x10 + ambientoffset *= 100; ambientoffset /= tipGainCalValue; + systemSettings.CalibrationOffset -= ambientoffset; setCalibrationOffset(systemSettings.CalibrationOffset); // store the error - osDelay(100); + OLED::clearScreen(); + OLED::setCursor(0, 0); + OLED::print("OK"); + OLED::refresh(); + osDelay(1000); } static void calibration_enterSimpleCal(void) { // User has entered into the simple cal routine @@ -816,10 +822,10 @@ static void settings_setCalibrateVIN(void) { for (;;) { OLED::setCursor(0, 0); - OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv,0) / 10, + OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv, 0) / 10, 2); OLED::print("."); - OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv,0) % 10, + OLED::printNumber(getInputVoltageX10(systemSettings.voltageDiv, 0) % 10, 1); OLED::print("V"); diff --git a/workspace/TS100/src/hardware.c b/workspace/TS100/src/hardware.c index ed2d6091..63fb0703 100644 --- a/workspace/TS100/src/hardware.c +++ b/workspace/TS100/src/hardware.c @@ -34,7 +34,7 @@ uint16_t getHandleTemperature() { result -= 4965; // remove 0.5V offset // 10mV per C // 99.29 counts per Deg C above 0C - result *= 10; + result *= 100; result /= 993; return result; } diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp index 7c84ebd2..192a2b92 100644 --- a/workspace/TS100/src/main.cpp +++ b/workspace/TS100/src/main.cpp @@ -939,7 +939,7 @@ void startPIDTask(void const *argument __unused) { #ifdef MODEL_TS80 //Set power management code to the tip resistance in ohms * 10 setupPower(calculateTipR() / 100); - size_t lastPowerPulse = 0; + //size_t lastPowerPulse = 0; #else setupPower(85); @@ -987,7 +987,7 @@ void startPIDTask(void const *argument __unused) { const uint16_t mass = 2020 / 20; // divide here so division is compile-time. #endif #ifdef MODEL_TS80 - const uint16_t mass = 2020 / 50; + const uint16_t mass = 2020 / 60; #endif int32_t milliWattsNeeded = tempToMilliWatts(tempError.average(), diff --git a/workspace/TS100A/.cproject b/workspace/TS100A/.cproject index 031f03fc..c706b83c 100644 --- a/workspace/TS100A/.cproject +++ b/workspace/TS100A/.cproject @@ -485,6 +485,7 @@ + diff --git a/workspace/TS100A/.settings/language.settings.xml b/workspace/TS100A/.settings/language.settings.xml index b0df2033..57ae6d18 100644 --- a/workspace/TS100A/.settings/language.settings.xml +++ b/workspace/TS100A/.settings/language.settings.xml @@ -4,7 +4,7 @@ - + @@ -14,7 +14,7 @@ - + @@ -24,7 +24,7 @@ - + diff --git a/workspace/TS100A/.settings/org.eclipse.core.resources.prefs b/workspace/TS100A/.settings/org.eclipse.core.resources.prefs index 7d89e07f..018e4023 100644 --- a/workspace/TS100A/.settings/org.eclipse.core.resources.prefs +++ b/workspace/TS100A/.settings/org.eclipse.core.resources.prefs @@ -1,2 +1,3 @@ eclipse.preferences.version=1 +encoding//inc/Font.h=UTF-8 encoding//src/Translation.cpp=UTF-8