blob: d9d02f06011de285bb4122f9b13ee4dcb21c41d0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#ifndef CAMERA_H__
#define CAMERA_H__
/* *************************************
* Includes
* *************************************/
#include <stdint.h>
/* *************************************
* Defines
* *************************************/
/* *************************************
* Structs and enums
* *************************************/
/* *************************************
* Class definition
* *************************************/
class Camera
{
public:
Camera(void);
void handler(void);
void setLock(const bool bLock)
{
_bLocked = bLock;
}
uint8_t getX(const uint8_t x) const;
uint8_t getY(const uint8_t y) const;
/* Event handlers. */
void onLeftBtnPressed(void);
void onRightBtnPressed(void);
void onUpBtnPressed(void);
void onDownBtnPressed(void);
private:
bool _bLocked;
int16_t _xOffset;
int16_t _yOffset;
int16_t _xSpeed;
int16_t _ySpeed;
uint8_t _speedTimer;
};
#endif /* CAMERA_H__ */
|