aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjonnieZG <[email protected]>2018-03-05 13:06:43 +0100
committerBen V. Brown <[email protected]>2018-03-05 23:06:43 +1100
commita30569eda256dd29dc4ec76a82a92853ee4b931b (patch)
tree7a3b1b912f7e821ece6c070afcae2e8536a3f010
parent677b278478e0718b1cee0f40caf379c25bb6759b (diff)
downloadIronOS-a30569eda256dd29dc4ec76a82a92853ee4b931b.tar.gz
IronOS-a30569eda256dd29dc4ec76a82a92853ee4b931b.zip
Fast menu scroll (#218)
* Enabled DOUBLE line for Croatian * Menu desciption scroll sped * Better description smooth-scrolling routine. * Tearing fixed. The screen will update only when required.
-rw-r--r--workspace/TS100/.settings/language.settings.xml52
-rw-r--r--workspace/TS100/src/main.cpp20
2 files changed, 39 insertions, 33 deletions
diff --git a/workspace/TS100/.settings/language.settings.xml b/workspace/TS100/.settings/language.settings.xml
index ee99e4da..81ca6911 100644
--- a/workspace/TS100/.settings/language.settings.xml
+++ b/workspace/TS100/.settings/language.settings.xml
@@ -1,27 +1,25 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project>
- <configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998" name="Debug">
- <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="-1709715799185984995" 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 &quot;${INPUTS}&quot;" prefer-non-shared="true">
- <language-scope id="org.eclipse.cdt.core.gcc"/>
- <language-scope id="org.eclipse.cdt.core.g++"/>
- </provider>
- </extension>
- </configuration>
- <configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573" 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="-1709715799185984995" 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 &quot;${INPUTS}&quot;" prefer-non-shared="true">
- <language-scope id="org.eclipse.cdt.core.gcc"/>
- <language-scope id="org.eclipse.cdt.core.g++"/>
- </provider>
- </extension>
- </configuration>
-</project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998" name="Debug">
+ <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 class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1452291918433808979" 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 &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <language-scope id="org.eclipse.cdt.core.gcc"/>
+ <language-scope id="org.eclipse.cdt.core.g++"/>
+ </provider>
+ </extension>
+ </configuration>
+ <configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573" 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 class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="1452291918433808979" 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 &quot;${INPUTS}&quot;" prefer-non-shared="true">
+ <language-scope id="org.eclipse.cdt.core.gcc"/>
+ <language-scope id="org.eclipse.cdt.core.g++"/>
+ </provider>
+ </extension>
+ </configuration>
+</project>
diff --git a/workspace/TS100/src/main.cpp b/workspace/TS100/src/main.cpp
index 0c39fcc1..be2c83bf 100644
--- a/workspace/TS100/src/main.cpp
+++ b/workspace/TS100/src/main.cpp
@@ -21,6 +21,7 @@ uint8_t PCBVersion = 0;
uint16_t currentlyActiveTemperatureTarget = 0;
uint32_t lastMovementTime = 0;
uint32_t lastButtonTime = 0;
+int16_t lastOffset = 0;
// FreeRTOS variables
osThreadId GUITaskHandle;
@@ -334,12 +335,13 @@ static void gui_settingsMenu() {
while ((settingsMenu[currentScreen].incrementHandler.func != NULL)
&& earlyExit == false) {
lcd.setFont(0);
- lcd.clearScreen();
lcd.setCursor(0, 0);
if (xTaskGetTickCount() - lastButtonTime < 400) {
- settingsMenu[currentScreen].draw.func();
+ lcd.clearScreen();
+ settingsMenu[currentScreen].draw.func();
+ lastOffset = 0;
} else {
// Draw description
// draw string starting from descriptionOffset
@@ -349,10 +351,16 @@ static void gui_settingsMenu() {
descriptionStart = HAL_GetTick();
int16_t descriptionOffset = ((((HAL_GetTick() - descriptionStart)
- / 30) % (maxOffset * 3))) * 4;
- //^ Rolling offset based on time
- lcd.setCursor(((7 * 12) - descriptionOffset), 0);
- lcd.print(settingsMenu[currentScreen].description);
+ / 20) % (maxOffset * 2))) * 6;
+
+ if (lastOffset == 0 || lastOffset!=descriptionOffset) {
+ lcd.clearScreen();
+
+ //^ Rolling offset based on time
+ lcd.setCursor(((7 * 12) - descriptionOffset), 0);
+ lcd.print(settingsMenu[currentScreen].description);
+ lastOffset = descriptionOffset;
+ }
}