Download the file
  1. #ifndef FORMATTER_H
  2. #define FORMATTER_H
  3.  
  4. #define BUFLEN 6 // Enough for 99999 pictures and 60.0 seconds
  5.  
  6. #include "Print.h"
  7.  
  8. class Formatter: public Print {
  9. public:
  10. Formatter() { zero(); }
  11. void zero();
  12. size_t write(uint8_t c);
  13. void align_right(uint8_t width);
  14. char * get_buffer() { return buffer; }
  15.  
  16. private:
  17. char buffer[BUFLEN];
  18. int offset;
  19. };
  20.  
  21. #endif
  22. // vim:ft=arduino
  23.