mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-26 20:56:37 +00:00
Minor driver tweaks
This commit is contained in:
parent
7c4537225b
commit
ac2aa275c5
@ -151,7 +151,6 @@ static lv_fs_res_t fs_open(lv_fs_drv_t* drv, void* file_p, const char* path, lv_
|
|||||||
sprintf(buf, LV_FS_PC_PATH "\\%s", path);
|
sprintf(buf, LV_FS_PC_PATH "\\%s", path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LV_LOG_USER(LV_FS_PC_PATH "/%%s");
|
|
||||||
LV_LOG_USER(buf);
|
LV_LOG_USER(buf);
|
||||||
|
|
||||||
file_t f = fopen(buf, flags);
|
file_t f = fopen(buf, flags);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#define BACKLIGHT_CHANNEL 0
|
#define BACKLIGHT_CHANNEL 0
|
||||||
|
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||||
uint8_t temprature_sens_read();
|
uint8_t temprature_sens_read();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -425,7 +425,7 @@ void Esp32Device::get_info(JsonDocument& doc)
|
|||||||
|
|
||||||
void Esp32Device::get_sensors(JsonDocument& doc)
|
void Esp32Device::get_sensors(JsonDocument& doc)
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
#if defined(CONFIG_IDF_TARGET_ESP32)
|
||||||
JsonObject sensor = doc.createNestedObject(F("ESP32"));
|
JsonObject sensor = doc.createNestedObject(F("ESP32"));
|
||||||
uint32_t temp = (temprature_sens_read() - 32) * 100 / 1.8;
|
uint32_t temp = (temprature_sens_read() - 32) * 100 / 1.8;
|
||||||
sensor[F("Temperature")] = serialized(String(1.0f * temp / 100, 2));
|
sensor[F("Temperature")] = serialized(String(1.0f * temp / 100, 2));
|
||||||
|
@ -55,9 +55,9 @@ void TftEspi::show_info()
|
|||||||
// if(tftSetup.r3_y_offset != 0) Serial.printf("R3 y offset = %i \n", tftSetup.r3_y_offset);
|
// if(tftSetup.r3_y_offset != 0) Serial.printf("R3 y offset = %i \n", tftSetup.r3_y_offset);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tftPinInfo(F("MOSI"), tftSetup.pin_tft_mosi);
|
tftPinInfo(F("TFT_MOSI"), tftSetup.pin_tft_mosi);
|
||||||
tftPinInfo(F("MISO"), tftSetup.pin_tft_miso);
|
tftPinInfo(F("TFT_MISO"), tftSetup.pin_tft_miso);
|
||||||
tftPinInfo(F("SCLK"), tftSetup.pin_tft_clk);
|
tftPinInfo(F("TFT_SCLK"), tftSetup.pin_tft_clk);
|
||||||
|
|
||||||
#if defined(ARDUINO_ARCH_ESP8266)
|
#if defined(ARDUINO_ARCH_ESP8266)
|
||||||
if(tftSetup.overlap == true) {
|
if(tftSetup.overlap == true) {
|
||||||
@ -124,7 +124,7 @@ void TftEspi::set_invert(bool invert)
|
|||||||
char buffer[4];
|
char buffer[4];
|
||||||
memcpy_P(buffer, invert ? PSTR(D_YES) : PSTR(D_NO), sizeof(buffer));
|
memcpy_P(buffer, invert ? PSTR(D_YES) : PSTR(D_NO), sizeof(buffer));
|
||||||
|
|
||||||
LOG_VERBOSE(TAG_TFT, F("Invert Disp: %s"), buffer);
|
LOG_VERBOSE(TAG_TFT, F("Invert Color: %s"), buffer);
|
||||||
tft.invertDisplay(invert);
|
tft.invertDisplay(invert);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class TftEspi : BaseTft {
|
|||||||
{
|
{
|
||||||
if(pin != -1) {
|
if(pin != -1) {
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
snprintf_P(buffer, sizeof(buffer), PSTR("%-11s: %s (GPIO %02d)"), String(pinfunction).c_str(),
|
snprintf_P(buffer, sizeof(buffer), PSTR("%-12s: %s (GPIO %02d)"), String(pinfunction).c_str(),
|
||||||
haspDevice.gpio_name(pin).c_str(), pin);
|
haspDevice.gpio_name(pin).c_str(), pin);
|
||||||
LOG_VERBOSE(TAG_TFT, buffer);
|
LOG_VERBOSE(TAG_TFT, buffer);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user