mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-03-17 21:32:52 +01:00
make sure to clear the OLED
This commit is contained in:
parent
3a0a33b195
commit
c78f5b04c8
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -8,7 +8,7 @@
|
||||
"interface/ftdi/esp32_devkitj_v1.cfg",
|
||||
"target/esp32s3.cfg"
|
||||
],
|
||||
"idf.port": "/dev/cu.usbserial-1464301",
|
||||
"idf.port": "/dev/cu.usbserial-1464401",
|
||||
"idf.pythonBinPath": "/Users/skot/.espressif/python_env/idf4.4_py3.9_env/bin/python",
|
||||
"idf.toolsPath": "/Users/skot/.espressif",
|
||||
"files.associations": {
|
||||
|
@ -261,6 +261,10 @@ int OLED_fill(uint8_t ucData) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
void OLED_clear(void) {
|
||||
OLED_fill(0x00);
|
||||
}
|
||||
|
||||
int OLED_clearLine(uint8_t line) {
|
||||
uint8_t temp[128];
|
||||
|
||||
|
@ -47,5 +47,6 @@ int OLED_setPixel(int x, int y, uint8_t ucPixel);
|
||||
bool OLED_setContrast(uint8_t ucContrast);
|
||||
int OLED_clearLine(uint8_t);
|
||||
bool OLED_status(void);
|
||||
void OLED_clear(void);
|
||||
|
||||
#endif // OLED96_H
|
||||
|
@ -12,6 +12,8 @@
|
||||
#include "adc.h"
|
||||
#include "oled.h"
|
||||
|
||||
#define USE_OLED 1 //Set to 1 to use OLED, 0 to not use it
|
||||
|
||||
static const char *TAG = "system";
|
||||
|
||||
void init_system(void) {
|
||||
@ -40,9 +42,15 @@ void init_system(void) {
|
||||
vTaskDelay(500 / portTICK_RATE_MS);
|
||||
|
||||
//oled
|
||||
#ifdef USE_OLED
|
||||
if (!OLED_init()) {
|
||||
ESP_LOGI(TAG, "OLED init failed!");
|
||||
} else {
|
||||
ESP_LOGI(TAG, "OLED init success!");
|
||||
OLED_clear();
|
||||
OLED_writeString(0, 0, "The bitaxe!");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void get_stats(void) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user