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

35
data/Vector.h Normal file
View File

@@ -0,0 +1,35 @@
#ifndef DATA_VECTOR_H
#define DATA_VECTOR_H
#include <cstdint>
template <typename T> class Vector {
private:
T* data = nullptr;
size_t nextIdx = 0;
size_t total = 8;
public:
Vector() {
data = (T*) malloc(total*sizeof(T));
}
void push_back(T elem) {
data[nextIdx] = elem;
++nextIdx;
}
T& operator[] (const size_t idx) {
return data[idx];
}
size_t size() const {
return nextIdx;
}
};
#endif // DATA_VECTOR_H