Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor for more readable code and more C++ #100

Open
wants to merge 36 commits into
base: DEV
Choose a base branch
from
Open

Conversation

boerge1
Copy link

@boerge1 boerge1 commented Nov 1, 2021

Ich habe ein paar Stunden verbracht und die DEV Version umgeschrieben.
Der Code ist jetzt lesbarer und C++ hat Einzug gehalten.
Ich habe mich bemüht, das alte Verhalten nicht zu ändern, außer dass nach dem Startup und nach dem Karte auflegen als Feedback ein kurzer Ton kommt.

Folgende Issues oder neue Features wurden implementiert:

bernd and others added 9 commits October 30, 2021 16:39
* Refactor all into classes
* use enums for better readable code
* remove global variables
* fix issue xfjx#37 (Rückwärtsspulen im Spezialmodus (Album))
* fix issue xfjx#87 (mute because 3 button pressed when adminmenü locked)
* fix issue xfjx#70 (Don't leak memory when removing modifiers)
* add startup jingle
* restore old modifier codes
* renaming and improvements in buttons
* fix resetting EEPROM for addresses > 0xff
* do not repeatSingle after admin menue
* if the same card is used after removing: the track is continued
* fix bug: no pause if card is removed before track was started
* add settings (EEPROM) for this feature
New feature: pause on card removed
@xfjx
Copy link
Owner

xfjx commented Nov 29, 2021

Hallo boerge,

das sieht tatsächlich sehr gut aus ;)

Könntest du mir wohl deine Kontaktdaten per Mail zukommen lassen? Ich arbeite aktuell auch an einem kompletten Rewrite, eventuell magst du da auch mal drüber schauen und ggf. unterstützen? Ziel wäre dabei, dass ganze noch deutlich modularer und erweiterbar zu machen.

Am besten einfach eine Mail an Thorsten@voss.earth

Danke

boerge1 added 19 commits December 9, 2021 19:34
* fix bug: writing card not possible
  (introduced by pause if card removed feature)
* put all constants into new file constants.hpp
* make activeHigh/Low for pins configurable
* refactor logging (with severity)
* do increase/decrease volume by setvolume()
* fix bug: no delete of modifier
* fix bug: no play after pause - up/down - pause
* refactor handling chip card (do more in class Chip_card)
* change some loggings to save program space
* simplify logging (use constexpr function)
* fix buttons in voice menu (if !settings.invertVolumeButtons)
* first draft version
* improvements and fixes
* improvements and fixes
* remove remaining delays
* Change version and Readme
* this can be used for ShortCuts as well as for cards
* fix bug not storing
@phschoen
Copy link

is there any update if this pr can be integrated soon? just asking since there the last pr/commit is 2 years ago.

@boerge1
Copy link
Author

boerge1 commented Mar 16, 2022

@phschoen
I think this PR will be never merged as no other PR is merged. But of course you can use my DEV branch. I made many improvements, the main is using a state machine instead of "spaghetti code" and waits.

@boerge1
Copy link
Author

boerge1 commented Mar 16, 2022

Ich habe noch weiter entwickelt und diesen PR erweitert:

  • völlig neues Logging
  • es lassen sich viele Sachen in der Datei const.hpp konfigurieren
  • Implementierung einer State Machine
  • alle Tracks werden beim Auflegen der Karte in eine Queue geschrieben und nicht erst beim nextTrack ermittelt
  • neuer Mode für Short Cut und Karte: wiederhole die letzte Karte
  • ein Short Cut lässt sich jetzt löschen (nach Auswahl des Short Cuts einfach das Admin Menü abbrechen)
  • Konfigurationsdateien für VS Code + plattformio

Achtung: es ist jetzt c++17 erforderlich. Wer nicht plattformio verwendet, muss die Datei platform.txt editieren
compiler.cpp.flags=-c -g -Os {compiler.warning_flags} -std=gnu++17 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto

@phschoen
Copy link

@boerge1 danke fürs update. ich bin mittlerweile auch auf deinem dev branch. 👍
@xfjx schade das es keine Updates mehr gibt vielleicht überlegst du dir eine community github Organisation/branch mit mehreren Review Leuten zu eröffnen, sodass die Arbeit nicht an nur einem hängt.

boerge1 and others added 5 commits April 9, 2022 15:50
@boerge1
Copy link
Author

boerge1 commented Nov 3, 2022

Wird fortgesetzt im Projekt https://github.com/tonuino/TonUINO-TNG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants