small changes and many new sensors

This commit is contained in:
2023-10-30 14:30:02 +01:00
parent 07917fe5ba
commit aad07c1b0a
21 changed files with 1642 additions and 297 deletions

View File

@@ -18,6 +18,8 @@
struct FontBuilder {
uint8_t spaceBetween = 1;
/** resulting font */
struct Result {
@@ -33,6 +35,8 @@ struct FontBuilder {
void dump(const char* name) const {
std::cout << "#include <ESP8266lib/ext/lcd/Draw.h>" << std::endl;
std::cout << "static const uint8_t " << name << "_data[] = {";
for (uint8_t i : data) {
std::cout << (int) i << ",";
@@ -76,6 +80,10 @@ struct FontBuilder {
}
void setSpaceBetween(uint8_t space) {
this->spaceBetween = space;
}
void addDummy() {
// update
res.offsets.push_back(curX);
@@ -202,7 +210,7 @@ struct FontBuilder {
std::cout << " " << c << " : " << rect.width() << " cur: " << curX << std::endl;
p.drawText(curX+drawOffsetX, atHeight, str);
curX += std::ceil(rect.width()) + 1; // 1 pixel space between chars
curX += std::ceil(rect.width()) + spaceBetween; // 1 pixel space between chars
}
p.end();