Skip to content

Micro String Template Engine for Arduino - Modified for event driven system

License

Notifications You must be signed in to change notification settings

nmcgann/ArduinoMicroStringTemplateEngine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ArduinoMicroStringTemplateEngine

Micro String Template Engine for Arduino - Modified for event driven system

Essentially a re-write, but based on the original concept.

  • Re-written to use the same logic in all routines (state machine).
  • C++ templated to handle variable array sizes without using sizeof()
  • Callback verions added to call routines corresponding to each template placeholder.
  • Placeholders can run from 0 to 99. Can handle single digit and two digit versions.
  • Callback pointer table can be in PROGMEM when template strings are also in PROGMEM.
  • Illegal placeholders are ignored.
  • Single .h file, no .cpp.

The callback idea allows a printed string to be self-populating as the callback routines can go off and fetch data to print. The callbacks are passed the Print& pr parameter so can do pr.print() themselves.

The point behind the re-write was to allow a simple event-driven refresh of an LCD screen page where the values of variables were automatically fetched and formatted and inserted into the shell of the screen text.

About

Micro String Template Engine for Arduino - Modified for event driven system

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%