mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Merge branch 'master' into TweakTS80
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -53,3 +53,8 @@ Translation Editor/.vscode/
|
||||
Translation Editor/__pycache__/
|
||||
*.pyc
|
||||
workspace/TS100/src/Translation.cpp
|
||||
*.lst
|
||||
*.mk
|
||||
*.list
|
||||
workspace/TS100/Release/
|
||||
workspace/TS100/Hexfile/
|
||||
|
||||
@@ -42,8 +42,8 @@ def intel_hex_line(record_type, offset, data):
|
||||
for byte in data:
|
||||
yield "{:02X}".format(byte)
|
||||
|
||||
# compute and write checksum (with DOS line ending for compatibility/safety)
|
||||
yield "{:02X}\r\n".format((((sum(data, # sum data ...
|
||||
# compute and write checksum (now using unix style line endings for DFU3.45 compatibility
|
||||
yield "{:02X}\n".format((((sum(data, # sum data ...
|
||||
record_length # ... and other ...
|
||||
+ sum(split16(offset)) # ... fields ...
|
||||
+ record_type) # ... on line
|
||||
@@ -229,7 +229,7 @@ if __name__ == "__main__":
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
with open(args.output_filename, 'w') as output:
|
||||
with open(args.output_filename, 'w', newline='\r\n') as output:
|
||||
img2hex(args.input_filename,
|
||||
output,
|
||||
args.preview,
|
||||
|
||||
@@ -2,11 +2,9 @@
|
||||
Please try and fill out this template where possible, not all fields are required and can be removed.
|
||||
|
||||
* **Please check if the PR fulfills these requirements**
|
||||
- [ ] The commit message make sense
|
||||
- [ ] The changes have been tested locally
|
||||
- [ ] New features have been documented in the Wiki
|
||||
- [ ] I'm willing to maintain this in the future (Totally Optional)
|
||||
|
||||
- [] The commit message make sense
|
||||
- [] The changes have been tested locally
|
||||
- [] Are there any breaking changes
|
||||
|
||||
* **What kind of change does this PR introduce?**
|
||||
(Bug fix, feature, docs update, ...)
|
||||
|
||||
@@ -4,6 +4,7 @@ from __future__ import print_function
|
||||
import json
|
||||
import os
|
||||
import io
|
||||
from datetime import datetime
|
||||
import sys
|
||||
import fontTables
|
||||
TRANSLATION_CPP = "Translation.cpp"
|
||||
@@ -115,21 +116,19 @@ def getTipModelEnumTS100():
|
||||
constants.append("User")
|
||||
return constants
|
||||
|
||||
def getDebugMenuHeaders():
|
||||
def getDebugMenu():
|
||||
constants = []
|
||||
constants.append("DateHere")
|
||||
constants.append("Heap: ")
|
||||
constants.append("HWMG: ")
|
||||
constants.append("HWMP: ")
|
||||
constants.append("HWMM: ")
|
||||
constants.append("Time: ")
|
||||
constants.append("Move: ")
|
||||
constants.append("RTip: ")
|
||||
constants.append("CTip: ")
|
||||
constants.append("Vin: ")
|
||||
constants.append("THan: ")
|
||||
constants.append("Model: ")
|
||||
constants.append("Tres: ")
|
||||
constants.append(datetime.today().strftime('%d-%m-%y'))
|
||||
constants.append("HW G ")
|
||||
constants.append("HW M ")
|
||||
constants.append("HW P ")
|
||||
constants.append("Time ")
|
||||
constants.append("Move ")
|
||||
constants.append("RTip ")
|
||||
constants.append("CTip ")
|
||||
constants.append("CHan ")
|
||||
constants.append("Vin ")
|
||||
constants.append("PCB ") # PCB Version AKA IMU version
|
||||
return constants
|
||||
|
||||
|
||||
@@ -180,6 +179,7 @@ def getLetterCounts(defs, lang):
|
||||
textList.extend(getDebugMenuHeaders())
|
||||
textList.extend(getTipModelEnumTS100())
|
||||
textList.extend(getTipModelEnumTS80())
|
||||
textList.extend(getDebugMenu())
|
||||
|
||||
# collapse all strings down into the composite letters and store totals for these
|
||||
|
||||
@@ -361,12 +361,10 @@ def writeLanguage(languageCode, defs, f):
|
||||
|
||||
f.write(to_unicode("};\n\n"))
|
||||
|
||||
# -- Debugging Menu
|
||||
|
||||
|
||||
|
||||
# Debug Menu
|
||||
f.write(to_unicode("const char* DebugMenu[] = {\n"))
|
||||
for c in getDebugMenuHeaders():
|
||||
|
||||
for c in getDebugMenu():
|
||||
f.write(to_unicode("\t \"" + convStr(symbolConversionTable, c) + "\","+ "//{} \n".format(c)))
|
||||
f.write(to_unicode("};\n\n"))
|
||||
|
||||
@@ -457,7 +455,7 @@ def read_opts():
|
||||
if len(sys.argv) > 2:
|
||||
outFile = sys.argv[2]
|
||||
else:
|
||||
outDir = os.path.relpath(jsonDir + "/../workspace/TS100/src/")
|
||||
outDir = os.path.relpath(jsonDir + "/../workspace/TS100/Core/Src")
|
||||
outFile = os.path.join(outDir, TRANSLATION_CPP)
|
||||
|
||||
if len(sys.argv) > 3:
|
||||
|
||||
235
Translation Editor/translation_sl.json
Normal file
235
Translation Editor/translation_sl.json
Normal file
@@ -0,0 +1,235 @@
|
||||
{
|
||||
"languageCode": "SL",
|
||||
"languageLocalName": "Slovensko",
|
||||
"cyrillicGlyphs": false,
|
||||
"messages": {
|
||||
"SettingsCalibrationDone": "Kalibracija opravljena!",
|
||||
"SettingsCalibrationWarning": "Preden nadaljujete, mora biti konica na sobni temperaturi!",
|
||||
"SettingsResetWarning": "Ste prepričani, da želite ponastaviti nastavitve na privzete vrednosti?",
|
||||
"UVLOWarningString": "NIZKA U",
|
||||
"UndervoltageString": "Nizka napetost",
|
||||
"InputVoltageString": "Vhodna U: ",
|
||||
"WarningTipTempString": "Temp. kon.: ",
|
||||
"BadTipString": "OKVARA K",
|
||||
"SleepingSimpleString": "Zzzz",
|
||||
"SleepingAdvancedString": "Spim...",
|
||||
"WarningSimpleString": "HOT!",
|
||||
"WarningAdvancedString": "!!!VROČA KON.!!!",
|
||||
"SleepingTipAdvancedString": "Knica:",
|
||||
"IdleTipString": "Kon:",
|
||||
"IdleSetString": " nst.:",
|
||||
"TipDisconnectedString": "KONICA ODSTRANJ.",
|
||||
"SolderingAdvancedPowerPrompt": "Moč: ",
|
||||
"OffString": "Izk",
|
||||
"ResetOKMessage": "Reset OK",
|
||||
"YourGainMessage": "Ojačan.:"
|
||||
},
|
||||
"characters": {
|
||||
"SettingRightChar": "D",
|
||||
"SettingLeftChar": "L",
|
||||
"SettingAutoChar": "S",
|
||||
"SettingFastChar": "H",
|
||||
"SettingSlowChar": "P"
|
||||
},
|
||||
"menuDouble": true,
|
||||
"menuGroups": {
|
||||
"SolderingMenu": {
|
||||
"text2": [
|
||||
"Nastavitve",
|
||||
"spajkanja"
|
||||
],
|
||||
"desc": "Nastavitve spajkanja"
|
||||
},
|
||||
"PowerSavingMenu": {
|
||||
"text2": [
|
||||
"Načini",
|
||||
"spanja"
|
||||
],
|
||||
"desc": "Nastavitve varčevanja z energijo"
|
||||
},
|
||||
"UIMenu": {
|
||||
"text2": [
|
||||
"Uporabniški",
|
||||
"vmesnik"
|
||||
],
|
||||
"desc": "Nastavitve uporabniškega vmesnika"
|
||||
},
|
||||
"AdvancedMenu": {
|
||||
"text2": [
|
||||
"Napredne",
|
||||
"možnosti"
|
||||
],
|
||||
"desc": "Napredne možnosti"
|
||||
}
|
||||
},
|
||||
"menuOptions": {
|
||||
"PowerSource": {
|
||||
"text": "PWRSC",
|
||||
"text2": [
|
||||
"Vir",
|
||||
"napajanja"
|
||||
],
|
||||
"desc": "Vir napajanja. Nastavi napetost izklopa. <DC 10V> <S 3.3V na celico>"
|
||||
},
|
||||
"SleepTemperature": {
|
||||
"text": "STMP",
|
||||
"text2": [
|
||||
"Temp. med",
|
||||
"spanjem"
|
||||
],
|
||||
"desc": "Temperatura med spanjem <C>"
|
||||
},
|
||||
"SleepTimeout": {
|
||||
"text": "STME",
|
||||
"text2": [
|
||||
"Čas do",
|
||||
"spanja"
|
||||
],
|
||||
"desc": "Čas pred spanjem <minute/sekunde>"
|
||||
},
|
||||
"ShutdownTimeout": {
|
||||
"text": "SHTME",
|
||||
"text2": [
|
||||
"Čas do",
|
||||
"izklopa"
|
||||
],
|
||||
"desc": "Čas pred izklopom <minute>"
|
||||
},
|
||||
"MotionSensitivity": {
|
||||
"text": "MSENSE",
|
||||
"text2": [
|
||||
"Občutljivost",
|
||||
"premikanja"
|
||||
],
|
||||
"desc": "Občutljivost premikanja <0.izklopljeno 1.najmanj 9.najbolj občutljivo>"
|
||||
},
|
||||
"TemperatureUnit": {
|
||||
"text": "TMPUNT",
|
||||
"text2": [
|
||||
"Enota za",
|
||||
"temperaturo"
|
||||
],
|
||||
"desc": "Enota za temperaturo <C=celzija F=fahrenheita>"
|
||||
},
|
||||
"AdvancedIdle": {
|
||||
"text": "ADVIDL",
|
||||
"text2": [
|
||||
"Več info na",
|
||||
"zaslonu v mir"
|
||||
],
|
||||
"desc": "Prikaže več informacij z manjšo pisavo na zaslonu med mirovanjem."
|
||||
},
|
||||
"DisplayRotation": {
|
||||
"text": "DSPROT",
|
||||
"text2": [
|
||||
"Orientacija",
|
||||
"zaslona"
|
||||
],
|
||||
"desc": "Orientacija zaslona <S. samodejno L. levo D. desno>"
|
||||
},
|
||||
"BoostEnabled": {
|
||||
"text": "BOOST",
|
||||
"text2": [
|
||||
"Omogoči",
|
||||
"boost mode"
|
||||
],
|
||||
"desc": "Omogoči, da tipka za naprej zagreje konico na 450C."
|
||||
},
|
||||
"BoostTemperature": {
|
||||
"text": "BTMP",
|
||||
"text2": [
|
||||
"Temperat.",
|
||||
"v boost"
|
||||
],
|
||||
"desc": "Temperatura v \"boost\" načinu"
|
||||
},
|
||||
"AutoStart": {
|
||||
"text": "ASTART",
|
||||
"text2": [
|
||||
"Samodejni",
|
||||
"zagon"
|
||||
],
|
||||
"desc": "Samodejno segrej konico ob vklopu. T=segrej, S=spanje, F=izklop"
|
||||
},
|
||||
"CooldownBlink": {
|
||||
"text": "CLBLNK",
|
||||
"text2": [
|
||||
"Utripanje med",
|
||||
"hlajenjem"
|
||||
],
|
||||
"desc": "Utripaj temperaturo med hlajenjem, ko je konica še vroča."
|
||||
},
|
||||
"TemperatureCalibration": {
|
||||
"text": "TMP CAL?",
|
||||
"text2": [
|
||||
"Kalibriram",
|
||||
"temperaturo?"
|
||||
],
|
||||
"desc": "Kalibracija temperature na konici."
|
||||
},
|
||||
"SettingsReset": {
|
||||
"text": "RESET?",
|
||||
"text2": [
|
||||
"Tovarniške",
|
||||
"nastavitve?"
|
||||
],
|
||||
"desc": "Ponastavitev vseh nastavitev"
|
||||
},
|
||||
"VoltageCalibration": {
|
||||
"text": "CAL VIN?",
|
||||
"text2": [
|
||||
"Kalibriram",
|
||||
"vhodno napetost?"
|
||||
],
|
||||
"desc": "Kalibracija VIN. Nastavitve z gumbi, dolgi pritisk za izhod."
|
||||
},
|
||||
"AdvancedSoldering": {
|
||||
"text": "ADVSLD",
|
||||
"text2": [
|
||||
"Več info na",
|
||||
"zaslonu spaj."
|
||||
],
|
||||
"desc": "Prikaže več informacij z manjšo pisavo na zaslonu med spajkanjem."
|
||||
},
|
||||
"ScrollingSpeed": {
|
||||
"text": "DESCSP",
|
||||
"text2": [
|
||||
"Hitrost",
|
||||
"besedila"
|
||||
],
|
||||
"desc": "Hitrost, s katero se prikazuje besedilo"
|
||||
},
|
||||
"TipModel": {
|
||||
"text": "TIPMO",
|
||||
"text2": [
|
||||
"Model",
|
||||
"konice"
|
||||
],
|
||||
"desc": "Izbira tipa konice"
|
||||
},
|
||||
"SimpleCalibrationMode": {
|
||||
"text": "SMPCAL",
|
||||
"text2": [
|
||||
"Preprosta",
|
||||
"kalibracija"
|
||||
],
|
||||
"desc": "Preprosta kalibracija z vročo vodo."
|
||||
},
|
||||
"AdvancedCalibrationMode": {
|
||||
"text": "ADVCAL",
|
||||
"text2": [
|
||||
"Napredna",
|
||||
"kalibracija"
|
||||
],
|
||||
"desc": "Napredna kalibracija s termočlenom na konici"
|
||||
},
|
||||
"PowerInput": {
|
||||
"text": "PWRW",
|
||||
"text2": [
|
||||
"Moč napajalnega",
|
||||
"vira"
|
||||
],
|
||||
"desc": "Moč v W napajalnega vira"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"languageCode": "TR",
|
||||
"languageLocalName": "Türk",
|
||||
"languageLocalName": "Türkçe",
|
||||
"cyrillicGlyphs": false,
|
||||
"messages": {
|
||||
"SettingsCalibrationDone": "Calibration done!",
|
||||
"SettingsCalibrationDone": "Kalibrasyon tamamlandı!",
|
||||
"SettingsCalibrationWarning": "Lütfen devam etmeden önce ucun oda sıcaklığında olduğunu garantiye alın!",
|
||||
"SettingsResetWarning": "Are you sure to reset settings to default values?",
|
||||
"SettingsResetWarning": "Ayarları varsayılan değerlere sıfırlamak istediğinizden emin misiniz?",
|
||||
"UVLOWarningString": "DC LOW",
|
||||
"UndervoltageString": "Undervoltage",
|
||||
"InputVoltageString": "Input V: ",
|
||||
"WarningTipTempString": "Tip Temp: ",
|
||||
"BadTipString": "BAD TIP",
|
||||
"UndervoltageString": "Düşüş Voltaj",
|
||||
"InputVoltageString": "Giriş V: ",
|
||||
"WarningTipTempString": "Uç Sıcaklığı: ",
|
||||
"BadTipString": "KÖTÜ UÇ",
|
||||
"SleepingSimpleString": "Zzzz",
|
||||
"SleepingAdvancedString": "Uyuyor...",
|
||||
"WarningSimpleString": "HOT!",
|
||||
"WarningSimpleString": "SICAK!",
|
||||
"WarningAdvancedString": "UYARI! UÇ SICAK!",
|
||||
"SleepingTipAdvancedString": "Tip:",
|
||||
"IdleTipString": "Tip:",
|
||||
"IdleSetString": " Set:",
|
||||
"TipDisconnectedString": "TIP DISCONNECTED",
|
||||
"SolderingAdvancedPowerPrompt": "Power: ",
|
||||
"OffString": "Off",
|
||||
"ResetOKMessage":"Reset OK"
|
||||
"SleepingTipAdvancedString": "Uç:",
|
||||
"IdleTipString": "Uç:",
|
||||
"IdleSetString": " Ayarla:",
|
||||
"TipDisconnectedString": "UÇ ÇIKARILDI",
|
||||
"SolderingAdvancedPowerPrompt": "Güç: ",
|
||||
"OffString": "Kapalı",
|
||||
"ResetOKMessage":"Reset Tamam"
|
||||
},
|
||||
"characters": {
|
||||
"SettingRightChar": "R",
|
||||
@@ -34,31 +34,31 @@
|
||||
"menuGroups": {
|
||||
"SolderingMenu": {
|
||||
"text2": [
|
||||
"Soldering",
|
||||
"Settings"
|
||||
"Lehimleme",
|
||||
"Ayarları"
|
||||
],
|
||||
"desc": "Soldering settings"
|
||||
"desc": "Lehimleme Ayarları"
|
||||
},
|
||||
"PowerSavingMenu": {
|
||||
"text2": [
|
||||
"Sleep",
|
||||
"Modes"
|
||||
"Uyku",
|
||||
"Modları"
|
||||
],
|
||||
"desc": "Power Saving Settings"
|
||||
"desc": "Güç Tasarrufu Ayarları"
|
||||
},
|
||||
"UIMenu": {
|
||||
"text2": [
|
||||
"User",
|
||||
"Interface"
|
||||
"Kullanıcı",
|
||||
"Arayüzü"
|
||||
],
|
||||
"desc": "User Interface settings"
|
||||
"desc": "Kullanıcı Arayüzü Ayarları"
|
||||
},
|
||||
"AdvancedMenu": {
|
||||
"text2": [
|
||||
"Advanced",
|
||||
"Options"
|
||||
"Gelişmiş",
|
||||
"Ayarlar"
|
||||
],
|
||||
"desc": "Advanced options"
|
||||
"desc": "Gelişmiş Ayarlar"
|
||||
}
|
||||
},
|
||||
"menuOptions": {
|
||||
@@ -201,34 +201,34 @@
|
||||
"TipModel": {
|
||||
"text": "TIPMO",
|
||||
"text2": [
|
||||
"Tip",
|
||||
"Model"
|
||||
"Uç",
|
||||
"Modeli"
|
||||
],
|
||||
"desc": "Tip Model selection"
|
||||
"desc": "Uç Modeli seçimi"
|
||||
},
|
||||
"SimpleCalibrationMode": {
|
||||
"text": "SMPCAL",
|
||||
"text2": [
|
||||
"Simple",
|
||||
"Calibration"
|
||||
"Basit",
|
||||
"Kalibrasyon"
|
||||
],
|
||||
"desc": "Simple Calibration using Hot water"
|
||||
"desc": "Sıcak su kullanarak basit kalibrasyon"
|
||||
},
|
||||
"AdvancedCalibrationMode": {
|
||||
"text": "ADVCAL",
|
||||
"text2": [
|
||||
"Advanced",
|
||||
"Calibration"
|
||||
"Gelişmiş",
|
||||
"Kalibrasyon"
|
||||
],
|
||||
"desc": "Advanced calibration using thermocouple on the tip"
|
||||
"desc": "Uçtaki ısı sensörünü kullanarak gelişmiş kalibrasyon"
|
||||
},
|
||||
"PowerInput": {
|
||||
"text": "PWRW",
|
||||
"text2": [
|
||||
"Power",
|
||||
"Wattage"
|
||||
"Güç",
|
||||
"Miktarı(W)"
|
||||
],
|
||||
"desc": "Power Wattage of the power adapter used"
|
||||
"desc": "Kullanılan adaptörün güç miktarı"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"languageLocalName": "Українська",
|
||||
"cyrillicGlyphs": true,
|
||||
"messages": {
|
||||
"SettingsCalibrationDone": "Calibration done!",
|
||||
"SettingsCalibrationDone": "Калібрування виконане!",
|
||||
"SettingsCalibrationWarning": "Переконайтеся, що жало охололо до кімнатної температури, перш ніж продовжувати!",
|
||||
"SettingsResetWarning": "Ви дійсно хочете скинути налаштування до значень за замовчуванням?",
|
||||
"UVLOWarningString": "АККУМ--",
|
||||
@@ -20,12 +20,12 @@
|
||||
"IdleSetString": " ->",
|
||||
"TipDisconnectedString": "Жало вимкнено!",
|
||||
"SolderingAdvancedPowerPrompt": "Живлення: ",
|
||||
"OffString": "Вим",
|
||||
"OffString": "Вимк",
|
||||
"ResetOKMessage":"Reset OK"
|
||||
},
|
||||
"characters": {
|
||||
"SettingRightChar": "R",
|
||||
"SettingLeftChar": "L",
|
||||
"SettingRightChar": "П",
|
||||
"SettingLeftChar": "Л",
|
||||
"SettingAutoChar": "A",
|
||||
"SettingFastChar": "+",
|
||||
"SettingSlowChar": "-"
|
||||
@@ -34,15 +34,15 @@
|
||||
"menuGroups": {
|
||||
"SolderingMenu": {
|
||||
"text2": [
|
||||
"Пайка",
|
||||
""
|
||||
"Параметри",
|
||||
"пайки"
|
||||
],
|
||||
"desc": "Налаштування для режиму пайки. Діють при включеному жалі."
|
||||
},
|
||||
"PowerSavingMenu": {
|
||||
"text2": [
|
||||
"Сон",
|
||||
""
|
||||
"Режим",
|
||||
"сну"
|
||||
],
|
||||
"desc": "Налаштування при бездіяльності. Корисно що б не обпектися і з часом не спалити житло."
|
||||
},
|
||||
@@ -51,24 +51,24 @@
|
||||
"Інтерфейс",
|
||||
""
|
||||
],
|
||||
"desc": "Користувальницький інтерфейс."
|
||||
"desc": "Параметри користувальницького інтерфейсу."
|
||||
},
|
||||
"AdvancedMenu": {
|
||||
"text2": [
|
||||
"Інші",
|
||||
""
|
||||
"Додаткові",
|
||||
"параметри"
|
||||
],
|
||||
"desc": "Розширені налаштування. Додаткові зручності."
|
||||
}
|
||||
},
|
||||
"menuOptions": {
|
||||
"PowerSource": {
|
||||
"text": "",
|
||||
"text": "ДжЖив",
|
||||
"text2": [
|
||||
"Джерело",
|
||||
"живлення"
|
||||
],
|
||||
"desc": "Установка напруги відключення. <DC - 10V, 3S - 9.9V, 4S - 13.2V, 5S - 16.5V, 6S - 19.8V>"
|
||||
"desc": "Встановлення напруги відключення. <DC - 10V, 3S - 9.9V, 4S - 13.2V, 5S - 16.5V, 6S - 19.8V>"
|
||||
},
|
||||
"SleepTemperature": {
|
||||
"text": "",
|
||||
@@ -81,10 +81,10 @@
|
||||
"SleepTimeout": {
|
||||
"text": "",
|
||||
"text2": [
|
||||
"Таймаут",
|
||||
"Тайм-аут",
|
||||
"сну"
|
||||
],
|
||||
"desc": "Час до переходу в режим очікування <Доступно отключение>"
|
||||
"desc": "Час до переходу в режим очікування <Хвилини>"
|
||||
},
|
||||
"ShutdownTimeout": {
|
||||
"text": "",
|
||||
@@ -92,7 +92,7 @@
|
||||
"Часу до",
|
||||
"вимкнення"
|
||||
],
|
||||
"desc": "Час до відключення <Доступно відключення>"
|
||||
"desc": "Час до відключення <Хвилини>"
|
||||
},
|
||||
"MotionSensitivity": {
|
||||
"text": "",
|
||||
@@ -100,7 +100,7 @@
|
||||
"Чутл. сенсо-",
|
||||
"ру руху"
|
||||
],
|
||||
"desc": "Акселерометр <0 - Викл. 1 хв. чутливості 9 - макс. чутливості>"
|
||||
"desc": "Акселерометр <0 - Вимк. 1 хв. чутливості 9 - макс. чутливості>"
|
||||
},
|
||||
"TemperatureUnit": {
|
||||
"text": "",
|
||||
@@ -116,7 +116,7 @@
|
||||
"Детальний ре-",
|
||||
"жим очікуван."
|
||||
],
|
||||
"desc": "Показувати детальну в режимі налаштувань <Замість картинки>"
|
||||
"desc": "Показувати детальну інформацію маленьким шрифтом на домашньому екрані"
|
||||
},
|
||||
"DisplayRotation": {
|
||||
"text": "",
|
||||
@@ -124,7 +124,7 @@
|
||||
"Автоповорот",
|
||||
"екрану"
|
||||
],
|
||||
"desc": "Орієнтація дисплея <A - Автоповорот, L - Лівша, R - Правша>"
|
||||
"desc": "Орієнтація дисплея <A - Автоповорот, Л - Лівша, П - Правша>"
|
||||
},
|
||||
"BoostEnabled": {
|
||||
"text": "",
|
||||
@@ -148,7 +148,7 @@
|
||||
"Гарячий",
|
||||
"старт"
|
||||
],
|
||||
"desc": "Автоматичний перехід в режим пайки при включенні живлення."
|
||||
"desc": "Автоматичний перехід в режим пайки при ввімкнені живлення."
|
||||
},
|
||||
"CooldownBlink": {
|
||||
"text": "",
|
||||
@@ -172,13 +172,13 @@
|
||||
"Скинути всі",
|
||||
"налаштування?"
|
||||
],
|
||||
"desc": "Скидання всіх параметрів до вихідних значень."
|
||||
"desc": "Скидання всіх параметрів до стандартних значень."
|
||||
},
|
||||
"VoltageCalibration": {
|
||||
"text": "",
|
||||
"text2": [
|
||||
"Калібровка",
|
||||
"напруга"
|
||||
"напруги"
|
||||
],
|
||||
"desc": "Калібрування напруги входу. Налаштувати кнопками, натиснути і утримати щоб завершити."
|
||||
},
|
||||
@@ -201,34 +201,34 @@
|
||||
"TipModel": {
|
||||
"text": "TIPMO",
|
||||
"text2": [
|
||||
"Tip",
|
||||
"Model"
|
||||
"Модель",
|
||||
"Жало"
|
||||
],
|
||||
"desc": "Tip Model selection"
|
||||
"desc": "Вибір моделі жала"
|
||||
},
|
||||
"SimpleCalibrationMode": {
|
||||
"text": "SMPCAL",
|
||||
"text2": [
|
||||
"Simple",
|
||||
"Calibration"
|
||||
"Просте",
|
||||
"Калібрування"
|
||||
],
|
||||
"desc": "Simple Calibration using Hot water"
|
||||
"desc": "Просте калібрування з використанням гарячої води"
|
||||
},
|
||||
"AdvancedCalibrationMode": {
|
||||
"text": "ADVCAL",
|
||||
"text2": [
|
||||
"Advanced",
|
||||
"Calibration"
|
||||
"Детальне",
|
||||
"Калібрування"
|
||||
],
|
||||
"desc": "Advanced calibration using thermocouple on the tip"
|
||||
"desc": "Калібрування за допомогою термопари"
|
||||
},
|
||||
"PowerInput": {
|
||||
"text": "PWRW",
|
||||
"text2": [
|
||||
"Power",
|
||||
"Wattage"
|
||||
"Потужність",
|
||||
"дж. живл."
|
||||
],
|
||||
"desc": "Power Wattage of the power adapter used"
|
||||
"desc": "Потужність джерела живлення в Ватах"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@ If you would like to contribute a translation, use the [Translation Editor](http
|
||||
|
||||
[Open a reference language file and optionally a target language file](https://github.com/Ralim/ts100/tree/master/Translation%20Editor).
|
||||
|
||||
You can create an issue with your updated json translation, or make your own pull request. If you make a pull request, also run `python3 make_translation.py` to regenerate the source file.
|
||||
You can create a pull request with the new / updated json configuration file, and this will include this language into the new builds for the firmware
|
||||
21
development.md
Normal file
21
development.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Development
|
||||
|
||||
Building this software can be performed two ways, using the STMCubeIDE or using command line tools.
|
||||
|
||||
## STM Cube IDE
|
||||
|
||||
The repository is setup to try and make this painless, when starting the IDE you can import the project by pointing the internal search to the workspace folder of this repository. If you start with a fresh installation, close the welcome screen tab, and then in the left sidebar, there is an optiom to "import". Select General -> Import existing projects -> Set the top location option to this repositories workspace -> Should find the TS100 project.
|
||||
|
||||
## Developing with command line tools & building a release
|
||||
|
||||
In the `workspace/TS100` folder there is a makefile that can be used to build the repository using command line tools.
|
||||
when running the `make` command, specify which model of the device & the language you would like to use.
|
||||
|
||||
`make -J8 lang=EN model=TS80`
|
||||
|
||||
To build a release instead, run the build.sh script. This will update translations and also build every language for both TS100 and TS80 models.
|
||||
|
||||
## Updating languages
|
||||
|
||||
To update the language translation files & associated font map, execute the `make_translation.py` code from the translations directory.
|
||||
|
||||
24
power.md
Normal file
24
power.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Power & Performance
|
||||
|
||||
Both the TS100 and TS80 are PWM controlled resistive heating elements.
|
||||
This means that the electronics in the handle can only turn the heating element on and off.
|
||||
This *means* that the power proivded in the tip is 100% controlled by the supply voltage used.
|
||||
|
||||
Both irons at their simplest are just a resistor connected to your power source via a switch.
|
||||
|
||||
When the switch is on, the power in the resistor is `Current (I) times Volts (V)`.
|
||||
Current through the resistor is `Volts (V) divided by Resistance (R)`.
|
||||
Combining these two gives the common equation, power is `Volts (V) squared / Resistance (R)`.
|
||||
|
||||
The resistance of the tip is fixed, 8.5 ohms for the TS100 and 4.5 ohms for the TS80.
|
||||
|
||||
This means that for both irons, the power delivered to the soldering tip is proportional to the voltage used, squared.
|
||||
This is why the TS100 performs poorly when run off 12V power supplies.
|
||||
|
||||
## Output Control & Regulation
|
||||
|
||||
Both soldering irons use a FET to switch the power to the soldering iron tip. This is a P-MOSFET and its controlled via a small transistor circuit, which in turn is controlled via the STM32. The STM32 controls this PWM output proportional to the output from the PID control loop running in the software.
|
||||
|
||||
To measure the tip temperature in the iron, the iron has a small op-amp connected across the terminals, this is setup to measure the voltage across the same terminals that are used the power the tip. In order to be able to read the small voltage generated by the thermocouple junction, the irons output must be turned off.
|
||||
Once the output is turned off (via the FET), the system has a recovery time as the tip capacitance discharges and the op-amp exits saturation. After this delay period, the STM32 ADC samples the output of the op-amp 8 times quickly and then sets a flag to turn the PWM output back on.
|
||||
This enforces a small dead time in the output signal while this occurs, so there is a balance between sampling the temperature often to maintain stable tip temperature control and sampling less often to increase the maximum power deliverable to the tip
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>RemoteSystemsTempFiles</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.rse.ui.remoteSystemsTempNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
Binary file not shown.
@@ -1,113 +1,123 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||
<cconfiguration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998" name="Debug" parent="fr.ac6.managedbuild.config.gnu.cross.exe.debug" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.bin"; arm-none-eabi-size "${BuildArtifactFileName}";arm-none-eabi-objcopy -O ihex "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.hex"">
|
||||
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998." name="/" resourcePath="">
|
||||
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug.35243712" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.debug">
|
||||
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.2131093113" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" useByScannerDiscovery="false" value="STM32F103T8Ux" valueType="string"/>
|
||||
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1847707232" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" useByScannerDiscovery="false" value="ts100" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.317155453" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/TS100}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.910934658" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.319926124" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1178790692" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1214895662" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1766485383" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/device""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc/Legacy""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/include""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3""/>
|
||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604" name="Release" parent="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release">
|
||||
<folderInfo id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604." name="/" resourcePath="">
|
||||
<toolChain id="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release.371966959" name="MCU ARM GCC" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.exe.release">
|
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.type.268924932" name="Internal Toolchain Type" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.type" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.option.internal.toolchain.version.1807761944" name="Internal Toolchain Version" superClass="com.st.stm32cube.ide.mcu.option.internal.toolchain.version" useByScannerDiscovery="false" value="7-2018-q2-update" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu.16668176" name="Mcu" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_mcu" useByScannerDiscovery="false" value="STM32F103T8Ux" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid.1774243727" name="CpuId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_cpuid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid.1519200339" name="CpuCoreId" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_coreid" useByScannerDiscovery="false" value="0" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board.2085586885" name="Board" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.target_board" useByScannerDiscovery="false" value="genericBoard" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults.1101562931" name="Defaults" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.defaults" useByScannerDiscovery="false" value="com.st.stm32cube.ide.common.services.build.inputs.revA.1.0.0 || Release || false || Executable || com.st.stm32cube.ide.mcu.gnu.managedbuild.toolchain.base.gnu-tools-for-stm32 || STM32F103T8Ux || 0 || arm-none-eabi- || ${gnu_tools_for_stm32_compiler_path} || ../Middlewares/Third_Party/FreeRTOS/Source/include | ../Drivers/CMSIS/Device/ST/STM32F1xx/Include | ../Drivers/CMSIS/Include | ../Core/Inc | ../Drivers/STM32F1xx_HAL_Driver/Inc/Legacy | ../Drivers/STM32F1xx_HAL_Driver/Inc | ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS | ../Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3 || ../ || || USE_HAL_DRIVER | STM32F103xB || || Startup || Drivers | Middlewares | Core || || ${workspace_loc:/${ProjName}/STM32F103T8UX_FLASH.ld} || true" valueType="string"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex.1139950997" name="Convert to Intel Hex file (-O ihex)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.option.converthex" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform.1111393917" isAbstract="false" osList="all" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.targetplatform"/>
|
||||
<builder buildPath="${workspace_loc:/TS100}/Release" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder.382006335" keepEnvironmentInBuildfile="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.builder"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.2103323603" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1096256111" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.1236938233" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value="../"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.2127531885" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
|
||||
<listOptionValue builtIn="false" value="MODEL_TS100"/>
|
||||
<listOptionValue builtIn="false" value="STM32F1"/>
|
||||
<listOptionValue builtIn="false" value="STM32"/>
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.dialect.std.565083189" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.338139343" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.176392389" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.893418158" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.1462975681" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1941847243" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1283353237" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.size" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.224874042" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1749257477" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/device""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc/Legacy""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/include""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.766879664" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
|
||||
<listOptionValue builtIn="false" value="MODEL_TS100"/>
|
||||
<listOptionValue builtIn="false" value="STM32F1"/>
|
||||
<listOptionValue builtIn="false" value="STM32"/>
|
||||
<listOptionValue builtIn="false" value="DEBUG"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.30611156" name="MCU GCC Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.1339073625" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.635455407" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.optimization.level.value.os" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols.803860120" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="MODEL_TS80"/>
|
||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.dialect.std.1681974405" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata.1463726438" name="Place the data in their own section (-fdata-sections)" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.149685854" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.1092052043" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths.830444742" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Middlewares/Third_Party/FreeRTOS/Source/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/CMSIS/Device/ST/STM32F1xx/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/CMSIS/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Core/Inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/STM32F1xx_HAL_Driver/Inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3}""/>
|
||||
</option>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.warnings.extra.831438684" name="Enable extra warning flags (-Wextra)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.otherflags.209834308" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.option.otherflags" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-Wno-write-strings"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1520167136" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.529125565" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.617418615" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.602897981" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.1389226967" name="MCU G++ Compiler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.320699143" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.debuglevel.value.g3" valueType="enumerated"/>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.1467281053" name="Optimization level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.optimization.level.value.os" valueType="enumerated"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.definedsymbols.786921488" name="Define symbols (-D)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.definedsymbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="MODEL_TS80"/>
|
||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
||||
</option>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.includepaths.1822309991" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.includepaths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Middlewares/Third_Party/FreeRTOS/Source/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/CMSIS/Device/ST/STM32F1xx/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/CMSIS/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Core/Inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/STM32F1xx_HAL_Driver/Inc/Legacy}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Drivers/STM32F1xx_HAL_Driver/Inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3}""/>
|
||||
</option>
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.warnings.extra.2125869818" name="Enable extra warning flags (-Wextra)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.warnings.extra" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.otherflags.1596069067" name="Other flags" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.option.otherflags" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-fno-rtti"/>
|
||||
<listOptionValue builtIn="false" value="-Wno-write-strings"/>
|
||||
<listOptionValue builtIn="false" value="-fno-exceptions"/>
|
||||
<listOptionValue builtIn="false" value="-fno-non-call-exceptions"/>
|
||||
<listOptionValue builtIn="false" value="-fno-use-cxa-atexit"/>
|
||||
<listOptionValue builtIn="false" value="-fno-strict-aliasing"/>
|
||||
</option>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.input.cpp.1159197200" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.compiler.input.cpp"/>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.1444632567" name="MCU GCC Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script.270389521" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.option.script" value="${workspace_loc:/${ProjName}/STM32F103T8UX_FLASH.ld}" valueType="string"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input.1357582083" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.1863989965" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.2093484706" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
|
||||
<option id="gnu.both.asm.option.include.paths.1148882090" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/device""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc/Legacy""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/include""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3""/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.1902507185" name="MCU G++ Linker" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker">
|
||||
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script.752998" name="Linker Script (-T)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.script" useByScannerDiscovery="false" value="/home/ralim/source/ts100/workspace/TS100/LinkerScript.ld" valueType="string"/>
|
||||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.otherflags.329644110" name="Other flags" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.option.otherflags" useByScannerDiscovery="false" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="-flto"/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.2116244351" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1096324633" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
|
||||
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.input.1684195922" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver.1875744128" name="MCU GCC Archiver" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.archiver"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size.684181602" name="MCU Size" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.size"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile.719558919" name="MCU Output Converter list file" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objdump.listfile"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex.202432297" name="MCU Output Converter Hex" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.hex"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary.796590488" name="MCU Output Converter Binary" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.binary"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog.566015042" name="MCU Output Converter Verilog" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.verilog"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec.1489612670" name="MCU Output Converter Motorola S-rec" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.srec"/>
|
||||
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec.1442634952" name="MCU Output Converter Motorola S-rec with symbols" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.objcopy.symbolsrec"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<fileInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998.1352310611" name="LIS2DH12.hpp" rcbsApplicability="disable" resourcePath="inc/LIS2DH12.hpp" toolsToInvoke=""/>
|
||||
<sourceEntries>
|
||||
<entry excluding="Src/stm32f1xx_hal_timebase_tim_template.c|Src/stm32f1xx_hal_timebase_rtc_wakeup_template.c|Src/stm32f1xx_hal_timebase_rtc_alarm_template.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="HAL_Driver"/>
|
||||
<entry excluding="Third_Party/FreeRTOS/Source/portable/MemMang/heap_1.c|Third_Party/FreeRTOS/Source/portable/MemMang/heap_2.c|Third_Party/FreeRTOS/Source/portable/MemMang/heap_3.c|Third_Party/FreeRTOS/Source/portable/MemMang/heap_5.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Startup"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Core"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Drivers"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
@@ -115,32 +125,18 @@
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="TS100.fr.ac6.managedbuild.target.gnu.cross.exe.1768512215" name="Executable" projectType="fr.ac6.managedbuild.target.gnu.cross.exe"/>
|
||||
<project id="TS100.null.5136256" name="TS100"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573;fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1363306495;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.747173367">
|
||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.606095682;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.debug.606095682.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.1328412936;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.405681469">
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998;fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998.;fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1941847243;fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.149685854">
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998;fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998.;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.319926124;fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.176392389">
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573;fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573.;fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1414722294;fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.688034595">
|
||||
<scannerConfigBuildInfo instanceId="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604;com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604.;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.30611156;com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.c.compiler.input.c.1520167136">
|
||||
<autodiscovery enabled="false" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="Debug">
|
||||
<resource resourceType="PROJECT" workspacePath="/TS100"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/TS100"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
</cproject>
|
||||
|
||||
5
workspace/TS100/.gitignore
vendored
5
workspace/TS100/.gitignore
vendored
@@ -1,5 +0,0 @@
|
||||
/Debug/
|
||||
/Release/
|
||||
/Hexfile/
|
||||
/Objects/
|
||||
|
||||
28
workspace/TS100/.mxproject
Normal file
28
workspace/TS100/.mxproject
Normal file
File diff suppressed because one or more lines are too long
@@ -19,10 +19,13 @@
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.st.stm32cube.ide.mcu.MCUProjectNature</nature>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
<nature>com.st.stm32cube.ide.mcu.MCUCubeIdeServicesRevAProjectNature</nature>
|
||||
<nature>com.st.stm32cube.ide.mcu.MCUCubeProjectNature</nature>
|
||||
<nature>com.st.stm32cube.ide.mcu.MCUSingleCpuProjectNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>fr.ac6.mcu.ide.core.MCUProjectNature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998" name="Debug">
|
||||
<configuration id="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.980996604" name="Release">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-283880394950776525" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" console="false" env-hash="727225808649545797" id="com.st.stm32cube.ide.mcu.toolchain.armnone.setup.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="MCU ARM GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
fr.ac6.mcu.ide.source.checker.libnano.problem=Error
|
||||
fr.ac6.mcu.ide.source.checker.libnano.problem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Float formatting support\\")"}
|
||||
org.eclipse.cdt.codan.checkers.errnoreturn=Warning
|
||||
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
|
||||
org.eclipse.cdt.codan.checkers.errreturnvalue=Error
|
||||
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
|
||||
org.eclipse.cdt.codan.checkers.nocommentinside=-Error
|
||||
org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
|
||||
org.eclipse.cdt.codan.checkers.nolinecomment=-Error
|
||||
org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
|
||||
org.eclipse.cdt.codan.checkers.noreturn=Error
|
||||
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.CatchByReference=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
|
||||
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
|
||||
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidArguments=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker=-Info
|
||||
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
|
||||
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.OverloadProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem=-Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem=-Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
|
||||
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
|
||||
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem=Warning
|
||||
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
|
||||
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem=Error
|
||||
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
|
||||
@@ -1,2 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
66
workspace/TS100/.vscode/c_cpp_properties.json
vendored
66
workspace/TS100/.vscode/c_cpp_properties.json
vendored
@@ -1,66 +0,0 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"defines": ["STM32F103T8Ux","STM32F1","STM32","USE_HAL_DRIVER","STM32F103xB","USE_RTOS_SYSTICK"],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "STM32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}",
|
||||
"/usr/include/c++/5",
|
||||
"/usr/include/x86_64-linux-gnu/c++/5",
|
||||
"/usr/include/c++/5/backward",
|
||||
"/usr/lib/llvm-5.0/lib/clang/5.0.0/include",
|
||||
"/usr/local/include",
|
||||
"/usr/include/x86_64-linux-gnu",
|
||||
"/usr/include",
|
||||
"${workspaceFolder}/inc",
|
||||
"${workspaceFolder}/HAL_Driver/Inc",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS",
|
||||
"${workspaceFolder}/CMSIS/device",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/include",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}",
|
||||
"/usr/include/c++/5",
|
||||
"/usr/include/x86_64-linux-gnu/c++/5",
|
||||
"/usr/include/c++/5/backward",
|
||||
"/usr/lib/llvm-5.0/lib/clang/5.0.0/include",
|
||||
"/usr/local/include",
|
||||
"/usr/include/x86_64-linux-gnu",
|
||||
"/usr/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"compilerPath": "/usr/bin/clang++-5.0",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 3
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -13,18 +13,20 @@
|
||||
class FRToSI2C {
|
||||
public:
|
||||
|
||||
static void init(I2C_HandleTypeDef *i2chandle) {i2c=i2chandle;
|
||||
I2CSemaphore=nullptr;}
|
||||
static void init(I2C_HandleTypeDef *i2chandle) {
|
||||
i2c = i2chandle;
|
||||
I2CSemaphore = nullptr;
|
||||
}
|
||||
|
||||
static void FRToSInit() {
|
||||
I2CSemaphore = xSemaphoreCreateBinary();
|
||||
I2CSemaphore = xSemaphoreCreateBinaryStatic(&xSemaphoreBuffer);
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
}
|
||||
|
||||
static void CpltCallback(); //Normal Tx Callback
|
||||
|
||||
static void Mem_Read(uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize,
|
||||
uint8_t *pData, uint16_t Size);
|
||||
static void Mem_Read(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
|
||||
static void Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
|
||||
|
||||
@@ -36,6 +38,7 @@ private:
|
||||
static I2C_HandleTypeDef *i2c;
|
||||
static void I2C1_ClearBusyFlagErratum();
|
||||
static SemaphoreHandle_t I2CSemaphore;
|
||||
static StaticSemaphore_t xSemaphoreBuffer;
|
||||
};
|
||||
|
||||
#endif /* FRTOSI2C_HPP_ */
|
||||
@@ -93,9 +93,9 @@
|
||||
#endif
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configSUPPORT_STATIC_ALLOCATION 0
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configSUPPORT_STATIC_ALLOCATION 1
|
||||
#define configSUPPORT_DYNAMIC_ALLOCATION 0
|
||||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( SystemCoreClock )
|
||||
#define configTICK_RATE_HZ ((TickType_t)100)
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
return static_cast<Orientation>((FRToSI2C::I2C_RegisterRead(LIS2DH_I2C_ADDRESS,LIS_INT2_SRC) >> 2) - 1);
|
||||
#endif
|
||||
}
|
||||
static void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
|
||||
static void getAxisReadings(int16_t& x, int16_t& y, int16_t& z);
|
||||
|
||||
private:
|
||||
};
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
|
||||
static void initalize(); // Initalize the system
|
||||
static Orientation getOrientation();// Reads the I2C register and returns the orientation (true == left)
|
||||
static void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
|
||||
static void getAxisReadings(int16_t& x, int16_t& y, int16_t& z);
|
||||
|
||||
private:
|
||||
};
|
||||
@@ -28,6 +28,12 @@ extern "C" {
|
||||
|
||||
class OLED {
|
||||
public:
|
||||
|
||||
enum DisplayState : bool {
|
||||
OFF = false,
|
||||
ON = true
|
||||
};
|
||||
|
||||
static void initialize(); // Startup the I2C coms (brings screen out of reset etc)
|
||||
|
||||
// Draw the buffer out to the LCD using the DMA Channel
|
||||
@@ -38,11 +44,11 @@ public:
|
||||
//or we need to goto double buffering
|
||||
}
|
||||
|
||||
// Turn the screen on or not
|
||||
static void displayOnOff(bool on) {
|
||||
displayOnOffState = on;
|
||||
screenBuffer[1] = on ? 0xAF : 0xAE;
|
||||
static void setDisplayState(DisplayState state) {
|
||||
displayState = state;
|
||||
screenBuffer[1] = (state == ON) ? 0xAF : 0xAE;
|
||||
}
|
||||
|
||||
static void setRotation(bool leftHanded); // Set the rotation for the screen
|
||||
// Get the current rotation of the LCD
|
||||
static bool getRotation() {
|
||||
@@ -96,7 +102,7 @@ private:
|
||||
static uint8_t* firstStripPtr; // Pointers to the strips to allow for buffer having extra content
|
||||
static uint8_t* secondStripPtr; //Pointers to the strips
|
||||
static bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM)
|
||||
static bool displayOnOffState; // If the display is on or not
|
||||
static DisplayState displayState;
|
||||
static uint8_t fontWidth, fontHeight;
|
||||
static int16_t cursor_x, cursor_y;
|
||||
static uint8_t displayOffset;
|
||||
@@ -53,6 +53,7 @@ extern const char* SettingAutoChar;
|
||||
extern const char* SettingFastChar;
|
||||
extern const char* SettingSlowChar;
|
||||
extern const char* TipModelStrings[];
|
||||
extern const char* DebugMenu[];
|
||||
extern const char* SymbolPlus;
|
||||
extern const char* SymbolMinus;
|
||||
extern const char* SymbolSpace;
|
||||
@@ -9,6 +9,8 @@
|
||||
#define I2CUSESDMA
|
||||
I2C_HandleTypeDef* FRToSI2C::i2c;
|
||||
SemaphoreHandle_t FRToSI2C::I2CSemaphore;
|
||||
StaticSemaphore_t FRToSI2C::xSemaphoreBuffer;
|
||||
|
||||
void FRToSI2C::CpltCallback() {
|
||||
i2c->State = HAL_I2C_STATE_READY; // Force state reset (even if tx error)
|
||||
if (I2CSemaphore) {
|
||||
@@ -29,8 +31,8 @@ void FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t MemAddress,
|
||||
// Wait up to 1 second for the mutex
|
||||
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
|
||||
#ifdef I2CUSESDMA
|
||||
if (HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize,
|
||||
pData, Size,500) != HAL_OK) {
|
||||
if (HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData,
|
||||
Size, 500) != HAL_OK) {
|
||||
|
||||
I2C1_ClearBusyFlagErratum();
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
@@ -70,7 +72,7 @@ void FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
|
||||
if (xSemaphoreTake(I2CSemaphore, (TickType_t)50) == pdTRUE) {
|
||||
#ifdef I2CUSESDMA
|
||||
if (HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize,
|
||||
pData, Size,500) != HAL_OK) {
|
||||
pData, Size, 500) != HAL_OK) {
|
||||
|
||||
I2C1_ClearBusyFlagErratum();
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
@@ -1,4 +1,9 @@
|
||||
// By Ben V. Brown - V2.0 of the TS100 firmware
|
||||
/*
|
||||
* GUIThread.cpp
|
||||
*
|
||||
* Created on: 19 Aug 2019
|
||||
* Author: ralim
|
||||
*/
|
||||
#include <MMA8652FC.hpp>
|
||||
#include <gui.hpp>
|
||||
#include <main.hpp>
|
||||
@@ -11,87 +16,26 @@
|
||||
#include "stdlib.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "string.h"
|
||||
|
||||
#define ACCELDEBUG 0
|
||||
uint8_t PCBVersion = 0;
|
||||
extern uint8_t PCBVersion;
|
||||
// File local variables
|
||||
uint32_t currentlyActiveTemperatureTarget = 0;
|
||||
uint32_t lastMovementTime = 0;
|
||||
extern uint32_t currentlyActiveTemperatureTarget;
|
||||
extern uint32_t lastMovementTime;
|
||||
extern int16_t idealQCVoltage;
|
||||
uint32_t lastButtonTime = 0;
|
||||
int16_t idealQCVoltage = 0;
|
||||
// FreeRTOS variables
|
||||
osThreadId GUITaskHandle;
|
||||
osThreadId PIDTaskHandle;
|
||||
osThreadId MOVTaskHandle;
|
||||
extern osThreadId GUITaskHandle;
|
||||
extern osThreadId MOVTaskHandle;
|
||||
extern osThreadId PIDTaskHandle;
|
||||
|
||||
static TaskHandle_t pidTaskNotification = NULL;
|
||||
// TODO: express time constants in terms of dividends of portTICK_RATE_MS
|
||||
|
||||
void startGUITask(void const *argument);
|
||||
void startPIDTask(void const *argument);
|
||||
void startMOVTask(void const *argument);
|
||||
// End FreeRTOS
|
||||
#define MOVEMENT_INACTIVITY_TIME 6000
|
||||
#define BUTTON_INACTIVITY_TIME 6000
|
||||
|
||||
// Main sets up the hardware then hands over to the FreeRTOS kernel
|
||||
int main(void) {
|
||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick.
|
||||
*/
|
||||
HAL_Init();
|
||||
Setup_HAL(); // Setup all the HAL objects
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
setTipMilliWatts(0); // force tip off
|
||||
FRToSI2C::init(&hi2c1);
|
||||
OLED::initialize(); // start up the LCD
|
||||
OLED::setFont(0); // default to bigger font
|
||||
// Testing for which accelerometer is mounted
|
||||
uint8_t buffer[1];
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
if (HAL_I2C_Mem_Read(&hi2c1, 29 << 1, 0x0F, I2C_MEMADD_SIZE_8BIT, buffer, 1,
|
||||
1000) == HAL_OK) {
|
||||
PCBVersion = 1;
|
||||
MMA8652FC::initalize(); // this sets up the I2C registers
|
||||
} else if (HAL_I2C_Mem_Read(&hi2c1, 25 << 1, 0x0F, I2C_MEMADD_SIZE_8BIT,
|
||||
buffer, 1, 1000) == HAL_OK) {
|
||||
PCBVersion = 2;
|
||||
// Setup the ST Accelerometer
|
||||
LIS2DH12::initalize(); // startup the accelerometer
|
||||
} else {
|
||||
PCBVersion = 3;
|
||||
systemSettings.SleepTime = 0;
|
||||
systemSettings.ShutdownTime = 0; // No accel -> disable sleep
|
||||
systemSettings.sensitivity = 0;
|
||||
}
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
restoreSettings(); // load the settings from flash
|
||||
setCalibrationOffset(systemSettings.CalibrationOffset);
|
||||
setTipType((enum TipType) systemSettings.tipType,
|
||||
systemSettings.customTipGain); // apply tip type selection
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
|
||||
/* Create the thread(s) */
|
||||
/* definition and creation of GUITask */
|
||||
osThreadDef(GUITask, startGUITask, osPriorityBelowNormal, 0, 5 * 1024 / 4);
|
||||
GUITaskHandle = osThreadCreate(osThread(GUITask), NULL);
|
||||
|
||||
/* definition and creation of PIDTask */
|
||||
osThreadDef(PIDTask, startPIDTask, osPriorityRealtime, 0, 3 * 1024 / 4);
|
||||
PIDTaskHandle = osThreadCreate(osThread(PIDTask), NULL);
|
||||
if (PCBVersion < 3) {
|
||||
/* definition and creation of MOVTask */
|
||||
osThreadDef(MOVTask, startMOVTask, osPriorityNormal, 0, 4 * 1024 / 4);
|
||||
MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL);
|
||||
#ifdef LOCAL_BUILD
|
||||
//Test that there was enough ram in the FreeRToS pool to allocate all the tasks
|
||||
if (MOVTaskHandle == 0)
|
||||
asm("bkpt");
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Start scheduler */
|
||||
osKernelStart();
|
||||
|
||||
/* We should never get here as control is now taken by the scheduler */
|
||||
while (1) {
|
||||
}
|
||||
static uint16_t min(uint16_t a, uint16_t b) {
|
||||
if (a > b)
|
||||
return b;
|
||||
else
|
||||
return a;
|
||||
}
|
||||
|
||||
void printVoltage() {
|
||||
@@ -324,16 +268,16 @@ static void gui_solderingTempAdjust() {
|
||||
return;
|
||||
break;
|
||||
case BUTTON_B_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer + autoRepeatAcceleration >
|
||||
PRESS_ACCEL_INTERVAL_MAX) {
|
||||
if (xTaskGetTickCount() - autoRepeatTimer
|
||||
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
|
||||
systemSettings.SolderingTemp -= 10; // sub 10
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
autoRepeatAcceleration += PRESS_ACCEL_STEP;
|
||||
}
|
||||
break;
|
||||
case BUTTON_F_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer + autoRepeatAcceleration >
|
||||
PRESS_ACCEL_INTERVAL_MAX) {
|
||||
if (xTaskGetTickCount() - autoRepeatTimer
|
||||
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
|
||||
systemSettings.SolderingTemp += 10;
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
autoRepeatAcceleration += PRESS_ACCEL_STEP;
|
||||
@@ -348,10 +292,10 @@ static void gui_solderingTempAdjust() {
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if ((PRESS_ACCEL_INTERVAL_MAX - autoRepeatAcceleration) <
|
||||
PRESS_ACCEL_INTERVAL_MIN) {
|
||||
autoRepeatAcceleration =
|
||||
PRESS_ACCEL_INTERVAL_MAX - PRESS_ACCEL_INTERVAL_MIN;
|
||||
if ((PRESS_ACCEL_INTERVAL_MAX - autoRepeatAcceleration)
|
||||
< PRESS_ACCEL_INTERVAL_MIN) {
|
||||
autoRepeatAcceleration = PRESS_ACCEL_INTERVAL_MAX
|
||||
- PRESS_ACCEL_INTERVAL_MIN;
|
||||
}
|
||||
// constrain between 50-450 C
|
||||
if (systemSettings.temperatureInF) {
|
||||
@@ -398,12 +342,6 @@ static void gui_solderingTempAdjust() {
|
||||
}
|
||||
}
|
||||
|
||||
static uint16_t min(uint16_t a, uint16_t b) {
|
||||
if (a > b)
|
||||
return b;
|
||||
else
|
||||
return a;
|
||||
}
|
||||
static int gui_SolderingSleepingMode() {
|
||||
// Drop to sleep temperature and display until movement or button press
|
||||
|
||||
@@ -674,67 +612,58 @@ static void gui_solderingMode(uint8_t jumpToSleep) {
|
||||
}
|
||||
}
|
||||
|
||||
void showVersion(void) {
|
||||
void showDebugMenu(void) {
|
||||
uint8_t screen = 0;
|
||||
ButtonState b;
|
||||
for (;;) {
|
||||
OLED::clearScreen(); // Ensure the buffer starts clean
|
||||
OLED::setCursor(0, 0); // Position the cursor at the 0,0 (top left)
|
||||
OLED::setFont(1); // small font
|
||||
#ifdef MODEL_TS100
|
||||
OLED::print(SymbolVersionNumber); // Print version number
|
||||
#else
|
||||
OLED::print(SymbolVersionNumber); // Print version number
|
||||
#endif
|
||||
OLED::setCursor(0, 8); // second line
|
||||
OLED::print(DebugMenu[screen]);
|
||||
switch (screen) {
|
||||
case 1:
|
||||
OLED::printNumber(xPortGetFreeHeapSize(), 5);
|
||||
case 0: //Just prints date
|
||||
break;
|
||||
case 2:
|
||||
case 1:
|
||||
//High water mark for GUI
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(GUITaskHandle), 5);
|
||||
break;
|
||||
case 2:
|
||||
//High water mark for the Movement task
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(MOVTaskHandle), 5);
|
||||
break;
|
||||
case 3:
|
||||
//High water mark for the PID task
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(PIDTaskHandle), 5);
|
||||
break;
|
||||
case 4:
|
||||
OLED::printNumber(uxTaskGetStackHighWaterMark(MOVTaskHandle), 5);
|
||||
break;
|
||||
case 5:
|
||||
//system up time stamp
|
||||
OLED::printNumber(xTaskGetTickCount() / 100, 5);
|
||||
break;
|
||||
case 6:
|
||||
case 5:
|
||||
//Movement time stamp
|
||||
OLED::printNumber(lastMovementTime / 100, 5);
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
//Raw Tip
|
||||
OLED::printNumber(getTipRawTemp(0), 6);
|
||||
break;
|
||||
case 8:
|
||||
case 7:
|
||||
//Temp in C
|
||||
OLED::printNumber(tipMeasurementToC(getTipRawTemp(0)), 5);
|
||||
break;
|
||||
case 8:
|
||||
//Handle Temp
|
||||
OLED::printNumber(getHandleTemperature(), 3);
|
||||
break;
|
||||
case 9:
|
||||
//Voltage input
|
||||
printVoltage();
|
||||
break;
|
||||
case 10:
|
||||
OLED::printNumber(getHandleTemperature(), 3);
|
||||
break;
|
||||
case 11:
|
||||
OLED::printNumber(PCBVersion, 1); // Print PCB ID number
|
||||
break;
|
||||
case 12:
|
||||
#ifdef MODEL_TS80
|
||||
OLED::printNumber(idealQCVoltage, 3);
|
||||
#else
|
||||
OLED::printNumber(systemSettings.tipType, 3);
|
||||
#endif
|
||||
break;
|
||||
case 13:
|
||||
#ifdef MODEL_TS80
|
||||
OLED::printNumber(calculateTipR(), 5);
|
||||
#else
|
||||
OLED::printNumber(8500, 5);
|
||||
#endif
|
||||
// Print PCB ID number
|
||||
OLED::printNumber(PCBVersion, 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -746,7 +675,7 @@ void showVersion(void) {
|
||||
return;
|
||||
else if (b == BUTTON_F_SHORT) {
|
||||
screen++;
|
||||
screen = screen % 14;
|
||||
screen = screen % 11;
|
||||
}
|
||||
GUIDelay();
|
||||
}
|
||||
@@ -790,7 +719,7 @@ void startGUITask(void const *argument __unused) {
|
||||
for (;;) {
|
||||
ButtonState buttons = getButtonState();
|
||||
if (buttons != BUTTON_NONE) {
|
||||
OLED::displayOnOff(true); // turn lcd on
|
||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||
OLED::setFont(0);
|
||||
}
|
||||
if (tempWarningState == 2)
|
||||
@@ -812,7 +741,7 @@ void startGUITask(void const *argument __unused) {
|
||||
|
||||
case BUTTON_B_LONG:
|
||||
// Show the version information
|
||||
showVersion();
|
||||
showDebugMenu();
|
||||
break;
|
||||
case BUTTON_F_LONG:
|
||||
gui_solderingTempAdjust();
|
||||
@@ -836,17 +765,17 @@ void startGUITask(void const *argument __unused) {
|
||||
getInputVoltageX10(systemSettings.voltageDiv, 0);
|
||||
uint16_t tipTemp = tipMeasurementToC(getTipRawTemp(0));
|
||||
|
||||
if (tipTemp < 50) {
|
||||
if (systemSettings.sensitivity) {
|
||||
if ((xTaskGetTickCount() - lastMovementTime) > 6000
|
||||
&& (xTaskGetTickCount() - lastButtonTime) > 6000) {
|
||||
OLED::displayOnOff(false); // turn lcd off when no movement
|
||||
} else
|
||||
OLED::displayOnOff(true); // turn lcd on
|
||||
} else
|
||||
OLED::displayOnOff(true); // turn lcd on - disabled motion sleep
|
||||
} else
|
||||
OLED::displayOnOff(true); // turn lcd on when temp > 50C
|
||||
// Preemptively turn the display on. Turn it off if and only if
|
||||
// the tip temperature is below 50 degrees C *and* motion sleep
|
||||
// detection is enabled *and* there has been no activity (movement or
|
||||
// button presses) in a while.
|
||||
OLED::setDisplayState(OLED::DisplayState::ON);
|
||||
|
||||
if ((tipTemp < 50) && systemSettings.sensitivity &&
|
||||
(((xTaskGetTickCount() - lastMovementTime) > MOVEMENT_INACTIVITY_TIME) &&
|
||||
((xTaskGetTickCount() - lastButtonTime) > BUTTON_INACTIVITY_TIME))) {
|
||||
OLED::setDisplayState(OLED::DisplayState::OFF);
|
||||
}
|
||||
|
||||
// Clear the lcd buffer
|
||||
OLED::clearScreen();
|
||||
@@ -912,232 +841,3 @@ void startGUITask(void const *argument __unused) {
|
||||
GUIDelay();
|
||||
}
|
||||
}
|
||||
|
||||
/* StartPIDTask function */
|
||||
void startPIDTask(void const *argument __unused) {
|
||||
/*
|
||||
* We take the current tip temperature & evaluate the next step for the tip
|
||||
* control PWM.
|
||||
*/
|
||||
setTipMilliWatts(0); // disable the output driver if the output is set to be off
|
||||
#ifdef MODEL_TS80
|
||||
idealQCVoltage = calculateMaxVoltage(systemSettings.cutoutSetting);
|
||||
#endif
|
||||
uint8_t rawC = ctoTipMeasurement(101) - ctoTipMeasurement(100); // 1*C change in raw.
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
//Set power management code to the tip resistance in ohms * 10
|
||||
TickType_t lastPowerPulse = 0;
|
||||
#endif
|
||||
// Tip temp reading filter
|
||||
// Tip temp is read at a rate of PID_TIM_Hz
|
||||
history<int32_t, PID_TIM_HZ / 4> tempError = { { 0 }, 0, 0 };
|
||||
currentlyActiveTemperatureTarget = 0; // Force start with no output (off). If in sleep / soldering this will
|
||||
// be over-ridden rapidly
|
||||
pidTaskNotification = xTaskGetCurrentTaskHandle();
|
||||
for (;;) {
|
||||
|
||||
if (ulTaskNotifyTake(pdTRUE, 2000)) {
|
||||
// This is a call to block this thread until the ADC does its samples
|
||||
uint16_t rawTemp = getTipRawTemp(1); // get instantaneous reading
|
||||
if (currentlyActiveTemperatureTarget) {
|
||||
// Cap the max set point to 450C
|
||||
if (currentlyActiveTemperatureTarget > ctoTipMeasurement(450)) {
|
||||
//Maximum allowed output
|
||||
currentlyActiveTemperatureTarget = ctoTipMeasurement(450);
|
||||
} else if (currentlyActiveTemperatureTarget > 32700) {
|
||||
//Cap to max adc reading (32768)
|
||||
currentlyActiveTemperatureTarget = 32700;
|
||||
}
|
||||
|
||||
// As we get close to our target, temp noise causes the system
|
||||
// to be unstable. Use a rolling average to dampen it.
|
||||
// We overshoot by roughly 1/2 of 1 degree Fahrenheit.
|
||||
// This helps stabilize the display.
|
||||
int32_t tError = currentlyActiveTemperatureTarget - rawTemp
|
||||
+ (rawC / 4);
|
||||
tError = tError > INT16_MAX ? INT16_MAX : tError;
|
||||
tError = tError < INT16_MIN ? INT16_MIN : tError;
|
||||
tempError.update(tError);
|
||||
|
||||
// Now for the PID!
|
||||
|
||||
// P term - total power needed to hit target temp next cycle.
|
||||
// thermal mass = 1690 milliJ/*C for my tip.
|
||||
// = Watts*Seconds to raise Temp from room temp to +100*C, divided by 100*C.
|
||||
|
||||
int32_t milliWattsOut = tempToMilliWatts(tempError.average(),
|
||||
rawC);
|
||||
// note that milliWattsNeeded is sometimes negative, this counters overshoot
|
||||
// from I term's inertia.
|
||||
|
||||
// I term - energy needed to compensate for heat loss.
|
||||
// We track energy put into the system over some window.
|
||||
// Assuming the temp is stable, energy in = energy transfered.
|
||||
// (If it isn't, P will dominate).
|
||||
milliWattsOut += milliWattHistory.average();
|
||||
|
||||
// Not Used:
|
||||
// D term - use sudden temp change to counter fast cooling/heating.
|
||||
// In practice, this provides an early boost if temp is dropping
|
||||
// and counters extra power if the iron is no longer losing temp.
|
||||
// basically: temp - lastTemp
|
||||
// Unfortunately, our temp signal is too noisy to really help.
|
||||
|
||||
setTipMilliWatts(milliWattsOut);
|
||||
} else {
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
//If its a TS80, we want to have the option of using an occasional pulse to keep the power bank on
|
||||
// This is purely guesswork :'( as everyone implements stuff differently
|
||||
if (xTaskGetTickCount() - lastPowerPulse < 10) {
|
||||
// for the first 100mS turn on for a bit
|
||||
setTipMilliWatts(2000); // typically its around 5W to hold the current temp, so this wont raise temp much
|
||||
} else {
|
||||
setTipMilliWatts(0);
|
||||
}
|
||||
//Then wait until the next 0.5 seconds
|
||||
if (xTaskGetTickCount() - lastPowerPulse > 50) {
|
||||
lastPowerPulse = xTaskGetTickCount();
|
||||
}
|
||||
#else
|
||||
setTipMilliWatts(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
} else {
|
||||
|
||||
//ADC interrupt timeout
|
||||
setTipMilliWatts(0);
|
||||
setTipPWM(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define MOVFilter 8
|
||||
void startMOVTask(void const *argument __unused) {
|
||||
OLED::setRotation(true);
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
startQC(systemSettings.voltageDiv);
|
||||
while (pidTaskNotification == 0)
|
||||
osDelay(30); // To ensure we return after idealQCVoltage/tip resistance
|
||||
|
||||
seekQC(idealQCVoltage, systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
|
||||
|
||||
#else
|
||||
osDelay(250); // wait for accelerometer to stabilize
|
||||
#endif
|
||||
|
||||
OLED::setRotation(systemSettings.OrientationMode & 1);
|
||||
lastMovementTime = 0;
|
||||
history<int32_t, MOVFilter> datax = { { 0 }, 0, 0 };
|
||||
history<int32_t, MOVFilter> datay = { { 0 }, 0, 0 };
|
||||
history<int32_t, MOVFilter> dataz = { { 0 }, 0, 0 };
|
||||
|
||||
int16_t tempx = 0, tempy = 0, tempz = 0;
|
||||
if (systemSettings.sensitivity > 9)
|
||||
systemSettings.sensitivity = 9;
|
||||
#if ACCELDEBUG
|
||||
uint32_t max = 0;
|
||||
#endif
|
||||
Orientation rotation = ORIENTATION_FLAT;
|
||||
for (;;) {
|
||||
int32_t threshold = 1500 + (9 * 200);
|
||||
threshold -= systemSettings.sensitivity * 200; // 200 is the step size
|
||||
|
||||
if (PCBVersion == 2) {
|
||||
LIS2DH12::getAxisReadings(&tempx, &tempy, &tempz);
|
||||
rotation = LIS2DH12::getOrientation();
|
||||
} else if (PCBVersion == 1) {
|
||||
MMA8652FC::getAxisReadings(&tempx, &tempy, &tempz);
|
||||
rotation = MMA8652FC::getOrientation();
|
||||
}
|
||||
if (systemSettings.OrientationMode == 2) {
|
||||
if (rotation != ORIENTATION_FLAT) {
|
||||
OLED::setRotation(rotation == ORIENTATION_LEFT_HAND); // link the data through
|
||||
}
|
||||
}
|
||||
|
||||
datax.update(tempx);
|
||||
datay.update(tempx);
|
||||
dataz.update(tempx);
|
||||
|
||||
// Sum the deltas
|
||||
int32_t error = (abs(datax.average() - tempx)
|
||||
+ abs(datay.average() - tempy) + abs(dataz.average() - tempz));
|
||||
// So now we have averages, we want to look if these are different by more
|
||||
// than the threshold
|
||||
// If this has occurred then we update the tick timer
|
||||
if (error > threshold) {
|
||||
lastMovementTime = xTaskGetTickCount();
|
||||
}
|
||||
osDelay(100); // Slow down update rate
|
||||
}
|
||||
}
|
||||
|
||||
#define FLASH_LOGOADDR \
|
||||
(0x8000000 | 0xF800) /*second last page of flash set aside for logo image*/
|
||||
|
||||
bool showBootLogoIfavailable() {
|
||||
// check if the header is there (0xAA,0x55,0xF0,0x0D)
|
||||
// If so display logo
|
||||
uint8_t temp8[98 * 2];
|
||||
for (uint8_t i = 0; i < 98; i++) {
|
||||
uint16_t temp = *(uint16_t *) (FLASH_LOGOADDR + (i * 2));
|
||||
temp8[i * 2] = temp >> 8;
|
||||
temp8[i * 2 + 1] = temp & 0xFF;
|
||||
}
|
||||
|
||||
if (temp8[0] != 0xAA)
|
||||
return false;
|
||||
if (temp8[1] != 0x55)
|
||||
return false;
|
||||
if (temp8[2] != 0xF0)
|
||||
return false;
|
||||
if (temp8[3] != 0x0D)
|
||||
return false;
|
||||
|
||||
OLED::drawArea(0, 0, 96, 16, (uint8_t *) (temp8 + 4));
|
||||
OLED::refresh();
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Catch the IRQ that says that the conversion is done on the temperature
|
||||
* readings coming in Once these have come in we can unblock the PID so that it
|
||||
* runs again
|
||||
*/
|
||||
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef *hadc) {
|
||||
(void) hadc;
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
if (pidTaskNotification) {
|
||||
vTaskNotifyGiveFromISR(pidTaskNotification, &xHigherPriorityTaskWoken);
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
}
|
||||
void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void vApplicationStackOverflowHook(xTaskHandle *pxTask __unused,
|
||||
signed portCHAR *pcTaskName __unused) {
|
||||
// We dont have a good way to handle a stack overflow at this point in time
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
@@ -5,9 +5,10 @@
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#include <LIS2DH12.hpp>
|
||||
#include "cmsis_os.h"
|
||||
#include <array>
|
||||
|
||||
#include "LIS2DH12.hpp"
|
||||
#include "cmsis_os.h"
|
||||
|
||||
typedef struct {
|
||||
const uint8_t reg;
|
||||
@@ -36,14 +37,14 @@ void LIS2DH12::initalize() {
|
||||
}
|
||||
}
|
||||
|
||||
void LIS2DH12::getAxisReadings(int16_t* x, int16_t* y, int16_t* z) {
|
||||
uint8_t tempArr[6];
|
||||
FRToSI2C::Mem_Read(LIS2DH_I2C_ADDRESS, 0xA8, I2C_MEMADD_SIZE_8BIT,
|
||||
(uint8_t*) tempArr, 6);
|
||||
void LIS2DH12::getAxisReadings(int16_t& x, int16_t& y, int16_t& z) {
|
||||
std::array<int16_t, 3> sensorData;
|
||||
|
||||
(*x) = ((uint16_t) (tempArr[1] << 8 | tempArr[0]));
|
||||
(*y) = ((uint16_t) (tempArr[3] << 8 | tempArr[2]));
|
||||
(*z) = ((uint16_t) (tempArr[5] << 8 | tempArr[4]));
|
||||
FRToSI2C::Mem_Read(LIS2DH_I2C_ADDRESS, 0xA8, I2C_MEMADD_SIZE_8BIT,
|
||||
reinterpret_cast<uint8_t*>(sensorData.begin()),
|
||||
sensorData.size() * sizeof(int16_t));
|
||||
|
||||
x = sensorData[0];
|
||||
y = sensorData[1];
|
||||
z = sensorData[2];
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
|
||||
#include <MMA8652FC.hpp>
|
||||
#include <array>
|
||||
|
||||
#include "MMA8652FC.hpp"
|
||||
#include "cmsis_os.h"
|
||||
|
||||
typedef struct {
|
||||
@@ -62,12 +64,15 @@ Orientation MMA8652FC::getOrientation() {
|
||||
|
||||
return ORIENTATION_FLAT;
|
||||
}
|
||||
void MMA8652FC::getAxisReadings(int16_t *x, int16_t *y, int16_t *z) {
|
||||
uint8_t tempArr[6];
|
||||
FRToSI2C::Mem_Read( MMA8652FC_I2C_ADDRESS, OUT_X_MSB_REG, I2C_MEMADD_SIZE_8BIT,
|
||||
(uint8_t*) tempArr, 6);
|
||||
|
||||
(*x) = tempArr[0] << 8 | tempArr[1];
|
||||
(*y) = tempArr[2] << 8 | tempArr[3];
|
||||
(*z) = tempArr[4] << 8 | tempArr[5];
|
||||
void MMA8652FC::getAxisReadings(int16_t& x, int16_t& y, int16_t& z) {
|
||||
std::array<int16_t, 3> sensorData;
|
||||
|
||||
FRToSI2C::Mem_Read(MMA8652FC_I2C_ADDRESS, OUT_X_MSB_REG, I2C_MEMADD_SIZE_8BIT,
|
||||
reinterpret_cast<uint8_t*>(sensorData.begin()),
|
||||
sensorData.size() * sizeof(int16_t));
|
||||
|
||||
x = static_cast<int16_t>(__builtin_bswap16(*reinterpret_cast<uint16_t*>(&sensorData[0])));
|
||||
y = static_cast<int16_t>(__builtin_bswap16(*reinterpret_cast<uint16_t*>(&sensorData[1])));
|
||||
z = static_cast<int16_t>(__builtin_bswap16(*reinterpret_cast<uint16_t*>(&sensorData[2])));
|
||||
}
|
||||
@@ -18,7 +18,7 @@ uint8_t* OLED::firstStripPtr; // Pointers to the strips to allow for buffer
|
||||
uint8_t* OLED::secondStripPtr; // Pointers to the strips
|
||||
bool OLED::inLeftHandedMode; // Whether the screen is in left or not (used for
|
||||
// offsets in GRAM)
|
||||
bool OLED::displayOnOffState; // If the display is on or not
|
||||
OLED::DisplayState OLED::displayState;
|
||||
uint8_t OLED::fontWidth, OLED::fontHeight;
|
||||
int16_t OLED::cursor_x, OLED::cursor_y;
|
||||
uint8_t OLED::displayOffset;
|
||||
@@ -70,16 +70,18 @@ void OLED::initialize() {
|
||||
secondStripPtr = &screenBuffer[FRAMEBUFFER_START + OLED_WIDTH];
|
||||
fontHeight = 16;
|
||||
displayOffset = 0;
|
||||
displayOnOffState = true;
|
||||
memcpy(&screenBuffer[0], &REFRESH_COMMANDS[0], sizeof(REFRESH_COMMANDS));
|
||||
|
||||
HAL_Delay(50);
|
||||
HAL_GPIO_WritePin(OLED_RESET_GPIO_Port, OLED_RESET_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(50);
|
||||
// Send the setup settings
|
||||
FRToSI2C::Transmit(DEVICEADDR_OLED, (uint8_t*) OLED_Setup_Array,
|
||||
|
||||
// Set the display to be ON once the settings block is sent and send the
|
||||
// initialisation data to the OLED.
|
||||
|
||||
setDisplayState(DisplayState::ON);
|
||||
FRToSI2C::Transmit(DEVICEADDR_OLED, &OLED_Setup_Array[0],
|
||||
sizeof(OLED_Setup_Array));
|
||||
displayOnOff(true);
|
||||
}
|
||||
|
||||
/*
|
||||
7771
workspace/TS100/Core/Src/Translation.cpp
Normal file
7771
workspace/TS100/Core/Src/Translation.cpp
Normal file
File diff suppressed because it is too large
Load Diff
479
workspace/TS100/Core/Src/hardware.c
Normal file
479
workspace/TS100/Core/Src/hardware.c
Normal file
@@ -0,0 +1,479 @@
|
||||
/*
|
||||
* hardware.c
|
||||
*
|
||||
* Created on: 2Sep.,2017
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
|
||||
// These are all the functions for interacting with the hardware
|
||||
#include "hardware.h"
|
||||
#include "FreeRTOS.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
volatile uint16_t PWMSafetyTimer = 0;
|
||||
volatile int16_t CalibrationTempOffset = 0;
|
||||
uint16_t tipGainCalValue = 0;
|
||||
void setTipType(enum TipType tipType, uint8_t manualCalGain) {
|
||||
if (manualCalGain)
|
||||
tipGainCalValue = manualCalGain;
|
||||
else
|
||||
tipGainCalValue = lookupTipDefaultCalValue(tipType);
|
||||
}
|
||||
void setCalibrationOffset(int16_t offSet) {
|
||||
CalibrationTempOffset = offSet;
|
||||
}
|
||||
uint16_t getHandleTemperature() {
|
||||
// We return the current handle temperature in X10 C
|
||||
// TMP36 in handle, 0.5V offset and then 10mV per deg C (0.75V @ 25C for
|
||||
// example) STM32 = 4096 count @ 3.3V input -> But We oversample by 32/(2^2) =
|
||||
// 8 times oversampling Therefore 32768 is the 3.3V input, so 0.1007080078125
|
||||
// mV per count So we need to subtract an offset of 0.5V to center on 0C
|
||||
// (4964.8 counts)
|
||||
//
|
||||
int32_t result = getADC(0);
|
||||
result -= 4965; // remove 0.5V offset
|
||||
// 10mV per C
|
||||
// 99.29 counts per Deg C above 0C
|
||||
result *= 100;
|
||||
result /= 993;
|
||||
return result;
|
||||
}
|
||||
uint16_t tipMeasurementToC(uint16_t raw) {
|
||||
//((Raw Tip-RawOffset) * calibrationgain) / 1000 = tip delta in CX10
|
||||
// tip delta in CX10 + handleTemp in CX10 = tip absolute temp in CX10
|
||||
// Div answer by 10 to get final result
|
||||
|
||||
uint32_t tipDelta = ((raw - CalibrationTempOffset) * tipGainCalValue)
|
||||
/ 1000;
|
||||
tipDelta += getHandleTemperature();
|
||||
|
||||
return tipDelta / 10;
|
||||
}
|
||||
uint16_t ctoTipMeasurement(uint16_t temp) {
|
||||
//[ (temp-handle/10) * 10000 ]/calibrationgain = tip raw delta
|
||||
// tip raw delta + tip offset = tip ADC reading
|
||||
int32_t TipRaw = ((temp - (getHandleTemperature() / 10)) * 10000)
|
||||
/ tipGainCalValue;
|
||||
TipRaw += CalibrationTempOffset;
|
||||
return TipRaw;
|
||||
}
|
||||
|
||||
uint16_t tipMeasurementToF(uint16_t raw) {
|
||||
// Convert result from C to F
|
||||
return (tipMeasurementToC(raw) * 9) / 5 + 32;
|
||||
}
|
||||
uint16_t ftoTipMeasurement(uint16_t temp) {
|
||||
// Convert the temp back to C from F
|
||||
return ctoTipMeasurement(((temp - 32) * 5) / 9);
|
||||
}
|
||||
|
||||
uint16_t getTipInstantTemperature() {
|
||||
uint16_t sum;
|
||||
sum = hadc1.Instance->JDR1;
|
||||
sum += hadc1.Instance->JDR2;
|
||||
sum += hadc1.Instance->JDR3;
|
||||
sum += hadc1.Instance->JDR4;
|
||||
sum += hadc2.Instance->JDR1;
|
||||
sum += hadc2.Instance->JDR2;
|
||||
sum += hadc2.Instance->JDR3;
|
||||
sum += hadc2.Instance->JDR4;
|
||||
return sum; // 8x over sample
|
||||
}
|
||||
/*
|
||||
* Loopup table for the tip calibration values for
|
||||
* the gain of the tip's
|
||||
* This can be found by line of best fit of TipRaw on X, and TipTemp-handle on
|
||||
* Y. Then take the m term * 10000
|
||||
* */
|
||||
uint16_t lookupTipDefaultCalValue(enum TipType tipID) {
|
||||
#ifdef MODEL_TS100
|
||||
switch (tipID) {
|
||||
case TS_D24:
|
||||
return 141;
|
||||
break;
|
||||
case TS_BC2:
|
||||
return (133 + 129) / 2;
|
||||
break;
|
||||
case TS_C1:
|
||||
return 133;
|
||||
break;
|
||||
case TS_B2:
|
||||
return 133;
|
||||
default:
|
||||
return 132; // make this the average of all
|
||||
break;
|
||||
}
|
||||
#else
|
||||
switch (tipID) {
|
||||
case TS_D25:
|
||||
return 154;
|
||||
break;
|
||||
case TS_B02:
|
||||
return 154;
|
||||
break;
|
||||
default:
|
||||
return 154; // make this the average of all
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint16_t getTipRawTemp(uint8_t refresh) {
|
||||
static uint16_t lastSample = 0;
|
||||
|
||||
if (refresh) {
|
||||
lastSample = getTipInstantTemperature();
|
||||
}
|
||||
|
||||
return lastSample;
|
||||
}
|
||||
|
||||
uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample) {
|
||||
// ADC maximum is 32767 == 3.3V at input == 28.05V at VIN
|
||||
// Therefore we can divide down from there
|
||||
// Multiplying ADC max by 4 for additional calibration options,
|
||||
// ideal term is 467
|
||||
#define BATTFILTERDEPTH 32
|
||||
static uint8_t preFillneeded = 10;
|
||||
static uint32_t samples[BATTFILTERDEPTH];
|
||||
static uint8_t index = 0;
|
||||
if (preFillneeded) {
|
||||
for (uint8_t i = 0; i < BATTFILTERDEPTH; i++)
|
||||
samples[i] = getADC(1);
|
||||
preFillneeded--;
|
||||
}
|
||||
if (sample) {
|
||||
samples[index] = getADC(1);
|
||||
index = (index + 1) % BATTFILTERDEPTH;
|
||||
}
|
||||
uint32_t sum = 0;
|
||||
|
||||
for (uint8_t i = 0; i < BATTFILTERDEPTH; i++)
|
||||
sum += samples[i];
|
||||
|
||||
sum /= BATTFILTERDEPTH;
|
||||
return sum * 4 / divisor;
|
||||
}
|
||||
#ifdef MODEL_TS80
|
||||
uint8_t QCMode = 0;
|
||||
uint8_t QCTries = 0;
|
||||
void seekQC(int16_t Vx10, uint16_t divisor) {
|
||||
if (QCMode == 5)
|
||||
startQC(divisor);
|
||||
if (QCMode == 0)
|
||||
return; // NOT connected to a QC Charger
|
||||
|
||||
if (Vx10 < 45)
|
||||
return;
|
||||
if (Vx10 > 130)
|
||||
Vx10 = 130; //Cap max value at 13V
|
||||
// Seek the QC to the Voltage given if this adapter supports continuous mode
|
||||
// try and step towards the wanted value
|
||||
|
||||
// 1. Measure current voltage
|
||||
int16_t vStart = getInputVoltageX10(divisor, 0);
|
||||
int difference = Vx10 - vStart;
|
||||
|
||||
// 2. calculate ideal steps (0.2V changes)
|
||||
|
||||
int steps = difference / 2;
|
||||
if (QCMode == 3) {
|
||||
while (steps < 0) {
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET); //D+0.6
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET); //D-3.3V
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET); // D-3.3Vs
|
||||
vTaskDelay(3);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET); //-0.6V
|
||||
HAL_Delay(1);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
|
||||
|
||||
HAL_Delay(1);
|
||||
steps++;
|
||||
}
|
||||
while (steps > 0) {
|
||||
// step once up
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
||||
vTaskDelay(3);
|
||||
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
|
||||
HAL_Delay(1);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
|
||||
|
||||
HAL_Delay(1);
|
||||
steps--;
|
||||
}
|
||||
}
|
||||
// Re-measure
|
||||
/* Disabled due to nothing to test and code space of around 1k*/
|
||||
#ifdef QC2_ROUND_DOWN
|
||||
steps = vStart - getInputVoltageX10(195);
|
||||
if (steps < 0) steps = -steps;
|
||||
if (steps > (difference / 2)) {
|
||||
// No continuous mode, so QC2
|
||||
QCMode = 2;
|
||||
// Goto nearest
|
||||
if (Vx10 > 10.5) {
|
||||
// request 12V
|
||||
// D- = 0.6V, D+ = 0.6V
|
||||
// Clamp PB3
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);// pull down D+
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
||||
|
||||
} else {
|
||||
// request 9V
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Must be called after FreeRToS Starts
|
||||
void startQC(uint16_t divisor) {
|
||||
// Pre check that the input could be >5V already, and if so, dont both
|
||||
// negotiating as someone is feeding in hv
|
||||
uint16_t vin = getInputVoltageX10(divisor, 1);
|
||||
if (vin > 150)
|
||||
return; // Over voltage
|
||||
if (vin > 100) {
|
||||
QCMode = 1; // ALready at ~12V
|
||||
return;
|
||||
}
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
|
||||
// Tries to negotiate QC for 9V
|
||||
// This is a multiple step process.
|
||||
// 1. Set around 0.6V on D+ for 1.25 Seconds or so
|
||||
// 2. After this It should un-short D+->D- and instead add a 20k pulldown on
|
||||
// D-
|
||||
// 3. Now set D+ to 3.3V and D- to 0.6V to request 9V
|
||||
// OR both at 0.6V for 12V request (if the adapter can do it).
|
||||
// If 12V is implimented then should fallback to 9V after validation
|
||||
// Step 1. We want to pull D+ to 0.6V
|
||||
// Pull PB3 donwn to ground
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);// pull low to put 0.6V on D+
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_3;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);// pull low to put 0.6V on D+
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
||||
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_14 | GPIO_PIN_13;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
// Delay 1.25 seconds
|
||||
uint8_t enteredQC = 0;
|
||||
for (uint16_t i = 0; i < 130 && enteredQC == 0; i++) {
|
||||
// HAL_Delay(10);
|
||||
vTaskDelay(1);
|
||||
|
||||
}
|
||||
// Check if D- is low to spot a QC charger
|
||||
if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_11) == GPIO_PIN_RESET)
|
||||
enteredQC = 1;
|
||||
if (enteredQC) {
|
||||
// We have a QC capable charger
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
||||
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_10 | GPIO_PIN_8;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
||||
|
||||
// Wait for frontend ADC to stabilise
|
||||
QCMode = 4;
|
||||
for (uint8_t i = 0; i < 10; i++) {
|
||||
if (getInputVoltageX10(divisor, 1) > 80) {
|
||||
// yay we have at least QC2.0 or QC3.0
|
||||
QCMode = 3; // We have at least QC2, pray for 3
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_SET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
||||
return;
|
||||
}
|
||||
vTaskDelay(10); // 100mS
|
||||
}
|
||||
QCMode = 5;
|
||||
QCTries++;
|
||||
if (QCTries > 10) // 10 goes to get it going
|
||||
QCMode = 0;
|
||||
} else {
|
||||
// no QC
|
||||
QCMode = 0;
|
||||
|
||||
}
|
||||
if (QCTries > 10)
|
||||
QCMode = 0;
|
||||
}
|
||||
// Get tip resistance in milliohms
|
||||
uint32_t calculateTipR() {
|
||||
static uint32_t lastRes = 0;
|
||||
if (lastRes)
|
||||
return lastRes;
|
||||
// We inject a small current into the front end of the iron,
|
||||
// By measuring the Vdrop over the tip we can calculate the resistance
|
||||
// Turn PA0 into an output and drive high to inject (3.3V-0.6)/(6K8+Rtip)
|
||||
// current PA0->Diode -> 6K8 -> Tip -> GND So the op-amp will amplify the
|
||||
// small signal across the tip and convert this into an easily read voltage
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_RESET); // Set low first
|
||||
setTipPWM(0);
|
||||
vTaskDelay(1);
|
||||
uint32_t offReading = getTipRawTemp(1);
|
||||
for (uint8_t i = 0; i < 49; i++) {
|
||||
vTaskDelay(1); // delay to allow it to stabilize
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
offReading += getTipRawTemp(1);
|
||||
}
|
||||
|
||||
// Turn on
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_SET); // Set hgih
|
||||
vTaskDelay(1); // delay to allow it too stabilize
|
||||
uint32_t onReading = getTipInstantTemperature();
|
||||
for (uint8_t i = 0; i < 49; i++) {
|
||||
vTaskDelay(1); // delay to allow it to stabilize
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
onReading += getTipRawTemp(1);
|
||||
}
|
||||
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_0, GPIO_PIN_RESET); // Turn the output off finally
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
uint32_t difference = onReading - offReading;
|
||||
// V = IR, therefore I = V/R
|
||||
// We can divide this reading by a known "gain" to get the resulting
|
||||
// resistance This was determined emperically This tip is 4.688444162 ohms,
|
||||
// 4688 milliohms (Measured using 4 terminal measurement) 25x oversampling
|
||||
// reads this as around 47490 Almost perfectly 10x the milliohms value This
|
||||
// will drift massively with tip temp However we really only need 10x ohms
|
||||
lastRes = (difference / 21) + 1; // ceil
|
||||
return lastRes;
|
||||
}
|
||||
static unsigned int sqrt32(unsigned long n) {
|
||||
unsigned int c = 0x8000;
|
||||
unsigned int g = 0x8000;
|
||||
|
||||
for (;;) {
|
||||
if (g * g > n)
|
||||
g ^= c;
|
||||
c >>= 1;
|
||||
if (c == 0)
|
||||
return g;
|
||||
g |= c;
|
||||
}
|
||||
}
|
||||
int16_t calculateMaxVoltage(uint8_t useHP) {
|
||||
// This measures the tip resistance, then it calculates the appropriate
|
||||
// voltage To stay under ~18W. Mosfet is "9A", so no issues there
|
||||
// QC3.0 supports up to 18W, which is 2A @9V and 1.5A @12V
|
||||
uint32_t milliOhms = calculateTipR();
|
||||
// Check no tip
|
||||
if (milliOhms > 10000)
|
||||
return -1;
|
||||
//Because of tolerance, if a user has asked for the higher power mode, then just goto 12V and call it a day
|
||||
if (useHP)
|
||||
return 120;
|
||||
//
|
||||
// V = sqrt(18W*R)
|
||||
// Convert this to sqrt(18W)*sqrt(milli ohms)*sqrt(1/1000)
|
||||
|
||||
uint32_t Vx = sqrt32(milliOhms);
|
||||
if (useHP)
|
||||
Vx *= 1549; //sqrt(24)*sqrt(1/1000)*10000
|
||||
else
|
||||
Vx *= 1342; // sqrt(18) * sqrt(1/1000)*10000
|
||||
|
||||
// Round to nearest 200mV,
|
||||
// So divide by 100 to start, to get in Vxx
|
||||
Vx /= 100;
|
||||
if (Vx % 10 >= 5)
|
||||
Vx += 10;
|
||||
Vx /= 10;
|
||||
// Round to nearest increment of 2
|
||||
if (Vx % 2 == 1)
|
||||
Vx++;
|
||||
//Because of how bad the tolerance is on detecting the tip resistance is
|
||||
//Its more functional to bin this
|
||||
if (Vx < 90)
|
||||
Vx = 90;
|
||||
else if (Vx >= 105)
|
||||
Vx = 120;
|
||||
return Vx;
|
||||
}
|
||||
|
||||
#endif
|
||||
volatile uint8_t pendingPWM = 0;
|
||||
|
||||
void setTipPWM(uint8_t pulse) {
|
||||
PWMSafetyTimer = 10; // This is decremented in the handler for PWM so that the tip pwm is
|
||||
// disabled if the PID task is not scheduled often enough.
|
||||
|
||||
pendingPWM = pulse;
|
||||
}
|
||||
|
||||
// These are called by the HAL after the corresponding events from the system
|
||||
// timers.
|
||||
|
||||
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
|
||||
// Period has elapsed
|
||||
if (htim->Instance == TIM2) {
|
||||
// we want to turn on the output again
|
||||
PWMSafetyTimer--;
|
||||
// We decrement this safety value so that lockups in the
|
||||
// scheduler will not cause the PWM to become locked in an
|
||||
// active driving state.
|
||||
// While we could assume this could never happen, its a small price for
|
||||
// increased safety
|
||||
htim2.Instance->CCR4 = pendingPWM;
|
||||
if (htim2.Instance->CCR4 && PWMSafetyTimer) {
|
||||
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
|
||||
} else {
|
||||
HAL_TIM_PWM_Stop(&htim3, TIM_CHANNEL_1);
|
||||
}
|
||||
} else if (htim->Instance == TIM1) {
|
||||
// STM uses this for internal functions as a counter for timeouts
|
||||
HAL_IncTick();
|
||||
}
|
||||
}
|
||||
|
||||
void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) {
|
||||
// This was a when the PWM for the output has timed out
|
||||
if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_4) {
|
||||
HAL_TIM_PWM_Stop(&htim3, TIM_CHANNEL_1);
|
||||
}
|
||||
}
|
||||
|
||||
void vApplicationIdleHook(void) {
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN GET_IDLE_TASK_MEMORY */
|
||||
static StaticTask_t xIdleTaskTCBBuffer;
|
||||
static StackType_t xIdleStack[configMINIMAL_STACK_SIZE];
|
||||
|
||||
void vApplicationGetIdleTaskMemory(StaticTask_t **ppxIdleTaskTCBBuffer,
|
||||
StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) {
|
||||
*ppxIdleTaskTCBBuffer = &xIdleTaskTCBBuffer;
|
||||
*ppxIdleTaskStackBuffer = &xIdleStack[0];
|
||||
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
|
||||
/* place for user code */
|
||||
}
|
||||
/* USER CODE END GET_IDLE_TASK_MEMORY */
|
||||
376
workspace/TS100/Core/Src/main.cpp
Normal file
376
workspace/TS100/Core/Src/main.cpp
Normal file
@@ -0,0 +1,376 @@
|
||||
// By Ben V. Brown - V2.0 of the TS100 firmware
|
||||
#include <MMA8652FC.hpp>
|
||||
#include <gui.hpp>
|
||||
#include <main.hpp>
|
||||
#include "LIS2DH12.hpp"
|
||||
#include <history.hpp>
|
||||
#include <power.hpp>
|
||||
#include "Settings.h"
|
||||
#include "Translation.h"
|
||||
#include "cmsis_os.h"
|
||||
#include "stdlib.h"
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "string.h"
|
||||
|
||||
uint8_t PCBVersion = 0;
|
||||
// File local variables
|
||||
uint32_t currentlyActiveTemperatureTarget = 0;
|
||||
uint32_t lastMovementTime = 0;
|
||||
int16_t idealQCVoltage = 0;
|
||||
// FreeRTOS variables
|
||||
|
||||
osThreadId GUITaskHandle;
|
||||
static const size_t GUITaskStackSize = 1024/4;
|
||||
uint32_t GUITaskBuffer[GUITaskStackSize];
|
||||
osStaticThreadDef_t GUITaskControlBlock;
|
||||
|
||||
osThreadId PIDTaskHandle;
|
||||
static const size_t PIDTaskStackSize =512 / 4;
|
||||
uint32_t PIDTaskBuffer[PIDTaskStackSize];
|
||||
osStaticThreadDef_t PIDTaskControlBlock;
|
||||
osThreadId MOVTaskHandle;
|
||||
static const size_t MOVTaskStackSize = 512/4;
|
||||
uint32_t MOVTaskBuffer[MOVTaskStackSize];
|
||||
osStaticThreadDef_t MOVTaskControlBlock;
|
||||
|
||||
static TaskHandle_t pidTaskNotification = NULL;
|
||||
|
||||
void startGUITask(void const *argument);
|
||||
void startPIDTask(void const *argument);
|
||||
void startMOVTask(void const *argument);
|
||||
// End FreeRTOS
|
||||
|
||||
// Main sets up the hardware then hands over to the FreeRTOS kernel
|
||||
int main(void) {
|
||||
/* Reset of all peripherals, Initializes the Flash interface and the Systick.
|
||||
*/
|
||||
HAL_Init();
|
||||
Setup_HAL(); // Setup all the HAL objects
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
setTipMilliWatts(0); // force tip off
|
||||
FRToSI2C::init(&hi2c1);
|
||||
OLED::initialize(); // start up the LCD
|
||||
OLED::setFont(0); // default to bigger font
|
||||
// Testing for which accelerometer is mounted
|
||||
uint8_t buffer[1];
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
if (HAL_I2C_Mem_Read(&hi2c1, 29 << 1, 0x0F, I2C_MEMADD_SIZE_8BIT, buffer, 1,
|
||||
1000) == HAL_OK) {
|
||||
PCBVersion = 1;
|
||||
MMA8652FC::initalize(); // this sets up the I2C registers
|
||||
} else if (HAL_I2C_Mem_Read(&hi2c1, 25 << 1, 0x0F, I2C_MEMADD_SIZE_8BIT,
|
||||
buffer, 1, 1000) == HAL_OK) {
|
||||
PCBVersion = 2;
|
||||
// Setup the ST Accelerometer
|
||||
LIS2DH12::initalize(); // startup the accelerometer
|
||||
} else {
|
||||
PCBVersion = 3;
|
||||
systemSettings.SleepTime = 0;
|
||||
systemSettings.ShutdownTime = 0; // No accel -> disable sleep
|
||||
systemSettings.sensitivity = 0;
|
||||
}
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
restoreSettings(); // load the settings from flash
|
||||
setCalibrationOffset(systemSettings.CalibrationOffset);
|
||||
setTipType((enum TipType) systemSettings.tipType,
|
||||
systemSettings.customTipGain); // apply tip type selection
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
|
||||
/* Create the thread(s) */
|
||||
/* definition and creation of GUITask */
|
||||
|
||||
osThreadStaticDef(GUITask, startGUITask, osPriorityBelowNormal, 0,
|
||||
GUITaskStackSize, GUITaskBuffer, &GUITaskControlBlock);
|
||||
GUITaskHandle = osThreadCreate(osThread(GUITask), NULL);
|
||||
|
||||
/* definition and creation of PIDTask */
|
||||
osThreadStaticDef(PIDTask, startPIDTask, osPriorityRealtime, 0,
|
||||
PIDTaskStackSize, PIDTaskBuffer, &PIDTaskControlBlock);
|
||||
PIDTaskHandle = osThreadCreate(osThread(PIDTask), NULL);
|
||||
|
||||
if (PCBVersion < 3) {
|
||||
osThreadStaticDef(MOVTask, startMOVTask, osPriorityNormal, 0,
|
||||
MOVTaskStackSize, MOVTaskBuffer, &MOVTaskControlBlock);
|
||||
MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL);
|
||||
}
|
||||
|
||||
/* Start scheduler */
|
||||
osKernelStart();
|
||||
|
||||
/* We should never get here as control is now taken by the scheduler */
|
||||
while (1) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* StartPIDTask function */
|
||||
void startPIDTask(void const *argument __unused) {
|
||||
/*
|
||||
* We take the current tip temperature & evaluate the next step for the tip
|
||||
* control PWM.
|
||||
*/
|
||||
setTipMilliWatts(0); // disable the output driver if the output is set to be off
|
||||
#ifdef MODEL_TS80
|
||||
idealQCVoltage = calculateMaxVoltage(systemSettings.cutoutSetting);
|
||||
#endif
|
||||
uint8_t rawC = ctoTipMeasurement(101) - ctoTipMeasurement(100); // 1*C change in raw.
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
//Set power management code to the tip resistance in ohms * 10
|
||||
setupPower(calculateTipR() / 100);
|
||||
TickType_t lastPowerPulse = 0;
|
||||
#else
|
||||
setupPower(85);
|
||||
|
||||
#endif
|
||||
history<int32_t> tempError = { { 0 }, 0, 0 };
|
||||
currentlyActiveTemperatureTarget = 0; // Force start with no output (off). If in sleep / soldering this will
|
||||
// be over-ridden rapidly
|
||||
pidTaskNotification = xTaskGetCurrentTaskHandle();
|
||||
for (;;) {
|
||||
|
||||
if (ulTaskNotifyTake(pdTRUE, 2000)) {
|
||||
// This is a call to block this thread until the ADC does its samples
|
||||
uint16_t rawTemp = getTipRawTemp(1); // get instantaneous reading
|
||||
if (currentlyActiveTemperatureTarget) {
|
||||
// Cap the max set point to 450C
|
||||
if (currentlyActiveTemperatureTarget > ctoTipMeasurement(450)) {
|
||||
//Maximum allowed output
|
||||
currentlyActiveTemperatureTarget = ctoTipMeasurement(450);
|
||||
} else if (currentlyActiveTemperatureTarget > 32400) {
|
||||
//Cap to max adc reading
|
||||
currentlyActiveTemperatureTarget = 32400;
|
||||
}
|
||||
|
||||
// As we get close to our target, temp noise causes the system
|
||||
// to be unstable. Use a rolling average to dampen it.
|
||||
// We overshoot by roughly 1/2 of 1 degree Fahrenheit.
|
||||
// This helps stabilize the display.
|
||||
int32_t tError = currentlyActiveTemperatureTarget - rawTemp
|
||||
+ (rawC / 4);
|
||||
tError = tError > INT16_MAX ? INT16_MAX : tError;
|
||||
tError = tError < INT16_MIN ? INT16_MIN : tError;
|
||||
tempError.update(tError);
|
||||
|
||||
// Now for the PID!
|
||||
int32_t milliWattsOut = 0;
|
||||
|
||||
// P term - total power needed to hit target temp next cycle.
|
||||
// thermal mass = 1690 milliJ/*C for my tip.
|
||||
// = Watts*Seconds to raise Temp from room temp to +100*C, divided by 100*C.
|
||||
// we divide milliWattsNeeded by 20 to let the I term dominate near the set point.
|
||||
// This is necessary because of the temp noise and thermal lag in the system.
|
||||
// Once we have feed-forward temp estimation we should be able to better tune this.
|
||||
|
||||
#ifdef MODEL_TS100
|
||||
const uint16_t mass = 2020 / 20; // divide here so division is compile-time.
|
||||
#endif
|
||||
#ifdef MODEL_TS80
|
||||
const uint16_t mass = 2020 / 50;
|
||||
#endif
|
||||
|
||||
int32_t milliWattsNeeded = tempToMilliWatts(tempError.average(),
|
||||
mass, rawC);
|
||||
// note that milliWattsNeeded is sometimes negative, this counters overshoot
|
||||
// from I term's inertia.
|
||||
milliWattsOut += milliWattsNeeded;
|
||||
|
||||
// I term - energy needed to compensate for heat loss.
|
||||
// We track energy put into the system over some window.
|
||||
// Assuming the temp is stable, energy in = energy transfered.
|
||||
// (If it isn't, P will dominate).
|
||||
milliWattsOut += milliWattHistory.average();
|
||||
|
||||
// D term - use sudden temp change to counter fast cooling/heating.
|
||||
// In practice, this provides an early boost if temp is dropping
|
||||
// and counters extra power if the iron is no longer losing temp.
|
||||
// basically: temp - lastTemp
|
||||
// Unfortunately, our temp signal is too noisy to really help.
|
||||
|
||||
setTipMilliWatts(milliWattsOut);
|
||||
} else {
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
//If its a TS80, we want to have the option of using an occasional pulse to keep the power bank on
|
||||
// This is purely guesswork :'( as everyone implements stuff differently
|
||||
if (xTaskGetTickCount() - lastPowerPulse < 10) {
|
||||
// for the first 100mS turn on for a bit
|
||||
setTipMilliWatts(5000); // typically its around 5W to hold the current temp, so this wont raise temp much
|
||||
} else
|
||||
setTipMilliWatts(0);
|
||||
//Then wait until the next 0.5 seconds
|
||||
if (xTaskGetTickCount() - lastPowerPulse > 50) {
|
||||
lastPowerPulse = xTaskGetTickCount();
|
||||
}
|
||||
#else
|
||||
setTipMilliWatts(0);
|
||||
#endif
|
||||
}
|
||||
|
||||
HAL_IWDG_Refresh(&hiwdg);
|
||||
} else {
|
||||
asm("bkpt");
|
||||
|
||||
//ADC interrupt timeout
|
||||
setTipMilliWatts(0);
|
||||
setTipPWM(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define MOVFilter 8
|
||||
void startMOVTask(void const *argument __unused) {
|
||||
OLED::setRotation(true);
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
startQC(systemSettings.voltageDiv);
|
||||
while (pidTaskNotification == 0)
|
||||
osDelay(30); // To ensure we return after idealQCVoltage/tip resistance
|
||||
|
||||
seekQC(idealQCVoltage, systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
|
||||
|
||||
#else
|
||||
osDelay(250); // wait for accelerometer to stabilize
|
||||
#endif
|
||||
|
||||
OLED::setRotation(systemSettings.OrientationMode & 1);
|
||||
lastMovementTime = 0;
|
||||
int16_t datax[MOVFilter] = { 0 };
|
||||
int16_t datay[MOVFilter] = { 0 };
|
||||
int16_t dataz[MOVFilter] = { 0 };
|
||||
uint8_t currentPointer = 0;
|
||||
int16_t tx = 0, ty = 0, tz = 0;
|
||||
int32_t avgx = 0, avgy = 0, avgz = 0;
|
||||
if (systemSettings.sensitivity > 9)
|
||||
systemSettings.sensitivity = 9;
|
||||
#if ACCELDEBUG
|
||||
uint32_t max = 0;
|
||||
#endif
|
||||
Orientation rotation = ORIENTATION_FLAT;
|
||||
for (;;) {
|
||||
int32_t threshold = 1500 + (9 * 200);
|
||||
threshold -= systemSettings.sensitivity * 200; // 200 is the step size
|
||||
|
||||
if (PCBVersion == 2) {
|
||||
LIS2DH12::getAxisReadings(tx, ty, tz);
|
||||
rotation = LIS2DH12::getOrientation();
|
||||
} else if (PCBVersion == 1) {
|
||||
MMA8652FC::getAxisReadings(tx, ty, tz);
|
||||
rotation = MMA8652FC::getOrientation();
|
||||
}
|
||||
if (systemSettings.OrientationMode == 2) {
|
||||
if (rotation != ORIENTATION_FLAT) {
|
||||
OLED::setRotation(rotation == ORIENTATION_LEFT_HAND); // link the data through
|
||||
}
|
||||
}
|
||||
datax[currentPointer] = (int32_t) tx;
|
||||
datay[currentPointer] = (int32_t) ty;
|
||||
dataz[currentPointer] = (int32_t) tz;
|
||||
currentPointer = (currentPointer + 1) % MOVFilter;
|
||||
avgx = avgy = avgz = 0;
|
||||
// calculate averages
|
||||
for (uint8_t i = 0; i < MOVFilter; i++) {
|
||||
avgx += datax[i];
|
||||
avgy += datay[i];
|
||||
avgz += dataz[i];
|
||||
}
|
||||
avgx /= MOVFilter;
|
||||
avgy /= MOVFilter;
|
||||
avgz /= MOVFilter;
|
||||
|
||||
// Sum the deltas
|
||||
int32_t error = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
||||
// So now we have averages, we want to look if these are different by more
|
||||
// than the threshold
|
||||
|
||||
// If error has occurred then we update the tick timer
|
||||
if (error > threshold) {
|
||||
lastMovementTime = xTaskGetTickCount();
|
||||
}
|
||||
|
||||
osDelay(100); // Slow down update rate
|
||||
#ifdef MODEL_TS80
|
||||
if (currentlyActiveTemperatureTarget) {
|
||||
seekQC(idealQCVoltage, systemSettings.voltageDiv); // Run the QC seek again to try and compensate for cable V drop
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#define FLASH_LOGOADDR \
|
||||
(0x8000000 | 0xF800) /*second last page of flash set aside for logo image*/
|
||||
|
||||
bool showBootLogoIfavailable() {
|
||||
// check if the header is there (0xAA,0x55,0xF0,0x0D)
|
||||
// If so display logo
|
||||
// TODO REDUCE STACK ON THIS ONE, USE DRAWING IN THE READ LOOP
|
||||
uint16_t temp[98];
|
||||
|
||||
for (uint8_t i = 0; i < (98); i++) {
|
||||
temp[i] = *(uint16_t *) (FLASH_LOGOADDR + (i * 2));
|
||||
}
|
||||
uint8_t temp8[98 * 2];
|
||||
for (uint8_t i = 0; i < 98; i++) {
|
||||
temp8[i * 2] = temp[i] >> 8;
|
||||
temp8[i * 2 + 1] = temp[i] & 0xFF;
|
||||
}
|
||||
|
||||
if (temp8[0] != 0xAA)
|
||||
return false;
|
||||
if (temp8[1] != 0x55)
|
||||
return false;
|
||||
if (temp8[2] != 0xF0)
|
||||
return false;
|
||||
if (temp8[3] != 0x0D)
|
||||
return false;
|
||||
|
||||
OLED::drawArea(0, 0, 96, 16, (uint8_t *) (temp8 + 4));
|
||||
OLED::refresh();
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* Catch the IRQ that says that the conversion is done on the temperature
|
||||
* readings coming in Once these have come in we can unblock the PID so that it
|
||||
* runs again
|
||||
*/
|
||||
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef *hadc) {
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
if (hadc == &hadc1) {
|
||||
if (pidTaskNotification) {
|
||||
vTaskNotifyGiveFromISR(pidTaskNotification,
|
||||
&xHigherPriorityTaskWoken);
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
}
|
||||
}
|
||||
}
|
||||
void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
asm("bkpt");
|
||||
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
//asm("bkpt");
|
||||
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c __unused) {
|
||||
FRToSI2C::CpltCallback();
|
||||
}
|
||||
void vApplicationStackOverflowHook(xTaskHandle *pxTask __unused,
|
||||
signed portCHAR *pcTaskName __unused) {
|
||||
asm("bkpt");
|
||||
// We dont have a good way to handle a stack overflow at this point in time
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
@@ -10427,6 +10427,8 @@ typedef struct
|
||||
((INSTANCE) == TIM3) || \
|
||||
((INSTANCE) == TIM4))
|
||||
|
||||
#define IS_TIM_SYNCHRO_INSTANCE(INSTANCE) IS_TIM_MASTER_INSTANCE(INSTANCE)
|
||||
|
||||
#define IS_TIM_DMABURST_INSTANCE(INSTANCE)\
|
||||
(((INSTANCE) == TIM1) || \
|
||||
((INSTANCE) == TIM2) || \
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user