PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BaseAnimation.h 1.1KB

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #ifndef BASE_ANIMATION_H__
  2. #define BASE_ANIMATION_H__
  3. #include <Arduino.h>
  4. #include "ILI9341_t3.h"
  5. #include "MathUtil.h"
  6. class BaseAnimation {
  7. public:
  8. BaseAnimation(){};
  9. virtual void init( ILI9341_t3 tft );
  10. virtual uint_fast16_t bgColor( void );
  11. virtual void reset( ILI9341_t3 tft );
  12. virtual String title();
  13. virtual boolean willForceTransition( void );
  14. virtual boolean forceTransitionNow( void );
  15. virtual void perFrame( ILI9341_t3 tft, FrameParams frameParams );
  16. };
  17. void BaseAnimation::init( ILI9341_t3 tft ) {
  18. // Extend me
  19. }
  20. uint_fast16_t BaseAnimation::bgColor( void ) {
  21. // Extend me
  22. return 0xf81f; // Everyone loves magenta
  23. }
  24. void BaseAnimation::reset( ILI9341_t3 tft ) {
  25. // Extend me
  26. }
  27. String BaseAnimation::title() {
  28. return "BaseAnimation";
  29. }
  30. boolean BaseAnimation::willForceTransition( void ) {
  31. return false; // Default: SuperTFT will transition animations automatically
  32. }
  33. boolean BaseAnimation::forceTransitionNow( void ) {
  34. // Extend me
  35. return false; // Default: SuperTFT will transition animations automatically
  36. }
  37. void BaseAnimation::perFrame( ILI9341_t3 tft, FrameParams frameParams ) {
  38. // Extend me
  39. }
  40. #endif