Files
OptoTest/OpticalChannelTester/Display.h
2026-08-05 16:49:05 +03:00

20 lines
453 B
C++

#pragma once
#include <Arduino.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
class Display {
public:
Display();
bool begin();
void show(const char *line1, const char *line2);
bool available() const { return ok_; }
static void formatFrequency(float hz, char *out, size_t size);
static void formatDuration(uint64_t us, char *out, size_t size);
private:
void fit(char *text);
Adafruit_SSD1306 oled_;
bool ok_ = false;
};