mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Adding helper text & re-enable ts80 pulse
This commit is contained in:
@@ -273,13 +273,6 @@ def writeLanguage(languageCode, defs, f):
|
||||
|
||||
f.write(to_unicode("// ---- " + langName + " ----\n\n"))
|
||||
|
||||
try:
|
||||
cyrillic = lang['cyrillicGlyphs']
|
||||
except KeyError:
|
||||
cyrillic = False
|
||||
|
||||
if cyrillic:
|
||||
f.write(to_unicode("#define CYRILLIC_GLYPHS\n\n"))
|
||||
|
||||
# ----- Writing SettingsDescriptions
|
||||
obj = lang['menuOptions']
|
||||
@@ -294,7 +287,7 @@ def writeLanguage(languageCode, defs, f):
|
||||
f.write(
|
||||
to_unicode("\"" +
|
||||
convStr(symbolConversionTable, (obj[eid]['desc'])) +
|
||||
"\",\n"))
|
||||
"\"," + "//{} \n".format(obj[eid]['desc'])))
|
||||
if 'feature' in mod:
|
||||
f.write(to_unicode("#endif\n"))
|
||||
|
||||
@@ -309,11 +302,11 @@ def writeLanguage(languageCode, defs, f):
|
||||
if eid not in obj:
|
||||
f.write(
|
||||
to_unicode("const char* " + eid + " = \"" +
|
||||
convStr(symbolConversionTable, (mod['default'])) + "\";\n"))
|
||||
convStr(symbolConversionTable, (mod['default'])) + "\";"+ "//{} \n".format(mod['default'])))
|
||||
else:
|
||||
f.write(
|
||||
to_unicode("const char* " + eid + " = \"" +
|
||||
convStr(symbolConversionTable, (obj[eid])) + "\";\n"))
|
||||
convStr(symbolConversionTable, (obj[eid])) + "\";"+ "//{} \n".format(obj[eid])))
|
||||
|
||||
f.write(to_unicode("\n"))
|
||||
|
||||
@@ -325,7 +318,7 @@ def writeLanguage(languageCode, defs, f):
|
||||
eid = mod['id']
|
||||
f.write(
|
||||
to_unicode("const char* " + eid + " = \"" +
|
||||
convStr(symbolConversionTable, obj[eid]) + "\";\n"))
|
||||
convStr(symbolConversionTable, obj[eid]) + "\";"+ "//{} \n".format(obj[eid])))
|
||||
|
||||
f.write(to_unicode("\n"))
|
||||
|
||||
@@ -334,7 +327,7 @@ def writeLanguage(languageCode, defs, f):
|
||||
for x in constants:
|
||||
f.write(
|
||||
to_unicode("const char* " + x[0] + " = \"" +
|
||||
convStr(symbolConversionTable, x[1]) + "\";\n"))
|
||||
convStr(symbolConversionTable, x[1]) + "\";"+ "//{} \n".format(x[1])))
|
||||
|
||||
f.write(to_unicode("\n"))
|
||||
# Write out tip model strings
|
||||
@@ -342,10 +335,10 @@ def writeLanguage(languageCode, defs, f):
|
||||
f.write(to_unicode("const char* TipModelStrings[] = {\n"))
|
||||
f.write(to_unicode("#ifdef MODEL_TS100\n"))
|
||||
for c in getTipModelEnumTS100():
|
||||
f.write(to_unicode("\t \"" + convStr(symbolConversionTable, c) + "\",\n"))
|
||||
f.write(to_unicode("\t \"" + convStr(symbolConversionTable, c) + "\","+ "//{} \n".format(c)))
|
||||
f.write(to_unicode("#else\n"))
|
||||
for c in getTipModelEnumTS80():
|
||||
f.write(to_unicode("\t \"" + convStr(symbolConversionTable, c) + "\",\n"))
|
||||
f.write(to_unicode("\t \"" + convStr(symbolConversionTable, c) + "\","+ "//{} \n".format(c)))
|
||||
f.write(to_unicode("#endif\n"))
|
||||
|
||||
f.write(to_unicode("};\n\n"))
|
||||
|
||||
@@ -939,7 +939,7 @@ void startPIDTask(void const *argument __unused) {
|
||||
#ifdef MODEL_TS80
|
||||
//Set power management code to the tip resistance in ohms * 10
|
||||
setupPower(calculateTipR() / 100);
|
||||
//size_t lastPowerPulse = 0;
|
||||
TickType_t lastPowerPulse = 0;
|
||||
#else
|
||||
setupPower(85);
|
||||
|
||||
@@ -1013,18 +1013,16 @@ void startPIDTask(void const *argument __unused) {
|
||||
|
||||
#ifdef MODEL_TS80
|
||||
//If its a TS80, we want to have the option of using an occasional pulse to keep the power bank on
|
||||
//~200ms @ a low wattage
|
||||
//Doesnt keep all power banks awake but helps with some
|
||||
/*if (xTaskGetTickCount() - lastPowerPulse < 20) {
|
||||
// for the first 200mS turn on for a bit
|
||||
setTipMilliWatts(4000); // typically its around 5W to hold the current temp, so this wont raise temp much
|
||||
// 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 second
|
||||
if (xTaskGetTickCount() - lastPowerPulse > 100) {
|
||||
//Then wait until the next 0.5 seconds
|
||||
if (xTaskGetTickCount() - lastPowerPulse > 50) {
|
||||
lastPowerPulse = xTaskGetTickCount();
|
||||
}*/
|
||||
setTipMilliWatts(0);
|
||||
}
|
||||
#else
|
||||
setTipMilliWatts(0);
|
||||
#endif
|
||||
@@ -1048,7 +1046,7 @@ void startMOVTask(void const *argument __unused) {
|
||||
#ifdef MODEL_TS80
|
||||
startQC(systemSettings.voltageDiv);
|
||||
while (pidTaskNotification == 0)
|
||||
osDelay(20); // To ensure we return after idealQCVoltage/tip resistance
|
||||
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
|
||||
|
||||
@@ -1103,29 +1101,6 @@ void startMOVTask(void const *argument __unused) {
|
||||
|
||||
// Sum the deltas
|
||||
int32_t error = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
||||
|
||||
#if ACCELDEBUG
|
||||
// Debug for Accel
|
||||
|
||||
OLED::setFont(1);
|
||||
OLED::setCursor(0, 0);
|
||||
OLED::printNumber(abs(avgx - (int32_t)tx), 5);
|
||||
OLED::print(" ");
|
||||
OLED::printNumber(abs(avgy - (int32_t)ty), 5);
|
||||
if (error > max) {
|
||||
max = (abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz));
|
||||
}
|
||||
OLED::setCursor(0, 8);
|
||||
OLED::printNumber(max, 5);
|
||||
OLED::print(" ");
|
||||
|
||||
OLED::printNumber((abs(avgx - tx) + abs(avgy - ty) + abs(avgz - tz)), 5);
|
||||
OLED::refresh();
|
||||
if (HAL_GPIO_ReadPin(KEY_A_GPIO_Port, KEY_A_Pin) == GPIO_PIN_RESET) {
|
||||
max = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
// So now we have averages, we want to look if these are different by more
|
||||
// than the threshold
|
||||
|
||||
|
||||
Reference in New Issue
Block a user