many updates..

new sensors.. display.. led.. drawing.. stuff..
This commit is contained in:
kazu
2019-01-17 23:12:01 +01:00
parent 90e9fee101
commit 5cb02880b3
30 changed files with 5305 additions and 97 deletions

39
ext/lcd/ui/UIStructs.h Normal file
View File

@@ -0,0 +1,39 @@
#ifndef UI_STRUCTS_H
#define UI_STRUCTS_H
#include <cstdint>
struct UIPoint {
uint16_t x;
uint16_t y;
UIPoint() : x(0), y(0) {;}
UIPoint(uint16_t x, uint16_t y) : x(x), y(y) {;}
};
struct UIRect {
uint16_t x;
uint16_t y;
uint16_t w;
uint16_t h;
UIRect() : x(0), y(0), w(0), h(0) {;}
UIRect(const uint16_t x, const uint16_t y, const uint16_t w, const uint16_t h) : x(x), y(y), w(w), h(h) {;}
bool contains(const uint16_t x, const uint16_t y) const {
return
(this->x <= x) &&
(this->y <= y) &&
(x <= this->x+this->w) &&
(y <= this->y+this->h);
}
};
#endif // UI_STRUCTS_H