Guillermo Stedile / RA8875

Dependencies:   GPS

Dependents:   SNOCC_V1 SNOCC_V2

Fork of RA8875 by SNOCC

Committer:
WiredHome
Date:
Sun Mar 23 16:27:55 2014 +0000
Revision:
63:ed787f5fcdc4
Adding PNG support - which works for tiny png files but memory requirements may exclude it for larger images.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
WiredHome 63:ed787f5fcdc4 1 #ifndef SLIDINGWINDOW_H
WiredHome 63:ed787f5fcdc4 2 #define SLIDINGWINDOW_H
WiredHome 63:ed787f5fcdc4 3 #include <mbed.h>
WiredHome 63:ed787f5fcdc4 4
WiredHome 63:ed787f5fcdc4 5 // Used by PNG.cpp
WiredHome 63:ed787f5fcdc4 6
WiredHome 63:ed787f5fcdc4 7 class SlidingWindow
WiredHome 63:ed787f5fcdc4 8 {
WiredHome 63:ed787f5fcdc4 9 public:
WiredHome 63:ed787f5fcdc4 10 typedef enum
WiredHome 63:ed787f5fcdc4 11 {
WiredHome 63:ed787f5fcdc4 12 noerror,
WiredHome 63:ed787f5fcdc4 13 outofmemory
WiredHome 63:ed787f5fcdc4 14 } Status_T;
WiredHome 63:ed787f5fcdc4 15 SlidingWindow(int desiredSize, int allowedSize);
WiredHome 63:ed787f5fcdc4 16 ~SlidingWindow();
WiredHome 63:ed787f5fcdc4 17
WiredHome 63:ed787f5fcdc4 18 bool set(int x, unsigned char value);
WiredHome 63:ed787f5fcdc4 19 unsigned char get(int foreDistance, int backDistance);
WiredHome 63:ed787f5fcdc4 20 Status_T status(void) {
WiredHome 63:ed787f5fcdc4 21 return m_status;
WiredHome 63:ed787f5fcdc4 22 }
WiredHome 63:ed787f5fcdc4 23 private:
WiredHome 63:ed787f5fcdc4 24 unsigned char * m_buf;
WiredHome 63:ed787f5fcdc4 25 int m_forewardUsed;
WiredHome 63:ed787f5fcdc4 26 int m_backwardUsed;
WiredHome 63:ed787f5fcdc4 27 int m_desiredSize;
WiredHome 63:ed787f5fcdc4 28 int m_allowedSize;
WiredHome 63:ed787f5fcdc4 29 unsigned char * m_used;
WiredHome 63:ed787f5fcdc4 30 Status_T m_status;
WiredHome 63:ed787f5fcdc4 31 };
WiredHome 63:ed787f5fcdc4 32
WiredHome 63:ed787f5fcdc4 33 #endif // SLIDINGWINDOW_H