Upgraded to new display

This commit is contained in:
Andrea Martelloni 2025-07-01 21:10:02 +10:00
parent defc0dccce
commit 3526e8ba0e
3 changed files with 2 additions and 48 deletions

View file

@ -1,6 +1,6 @@
// #include "src/memllib/interface/InterfaceBase.hpp" // #include "src/memllib/interface/InterfaceBase.hpp"
#include "src/memllib/interface/MIDIInOut.hpp" #include "src/memllib/interface/MIDIInOut.hpp"
#include "display.hpp" #include "src/memllib/hardware/memlnaut/display.hpp"
#include "src/memllib/audio/AudioAppBase.hpp" #include "src/memllib/audio/AudioAppBase.hpp"
#include "src/memllib/audio/AudioDriver.hpp" #include "src/memllib/audio/AudioDriver.hpp"
#include "src/memllib/hardware/memlnaut/MEMLNaut.hpp" #include "src/memllib/hardware/memlnaut/MEMLNaut.hpp"

View file

@ -1,46 +0,0 @@
#ifndef __DISPLAY_H
#define __DISPLAY_H
#include <TFT_eSPI.h>
#include <deque>
#define DISPLAY_MEM __not_in_flash("display")
TFT_eSPI DISPLAY_MEM tft = TFT_eSPI(); // Invoke custom library
class display {
public:
void setup() {
tft.begin();
tft.setRotation(1);
tft.fillScreen(TFT_BLACK);
tft.setFreeFont(&FreeSans9pt7b);
tft.setTextColor(0xFC9F);
}
void post(String str) {
redraw = true;
lines.push_back(str);
if(lines.size() > 11) {
lines.pop_front();
}
}
void update() {
if (redraw) {
redraw = false;
tft.fillScreen(TFT_BLACK);
constexpr int32_t lineheight = 20;
for(size_t i=0; i < lines.size(); i++) {
tft.drawString(lines[i].c_str(), 10,i*lineheight);
}
}
}
private:
std::deque<String> lines;
bool redraw=false;
};
#endif

@ -1 +1 @@
Subproject commit ebc5d7401fa2ee96409087eba9213b3a33fc12b9 Subproject commit 96d0c879fcbbebc1ee57198251029f849c99a278