mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-20 07:25:06 +00:00
Fixes and improvements (#445)
- Remove unnecessary CS work-around for Cardputers - Don't compile WifiMock when not necessary - Fix for running apps on devices without SPIRAM - Disable backlight dimming by default
This commit is contained in:
parent
2ca8ae62fb
commit
719f7bcece
@ -3,7 +3,6 @@
|
|||||||
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
||||||
|
|
||||||
constexpr auto SDCARD_PIN_CS = GPIO_NUM_12;
|
constexpr auto SDCARD_PIN_CS = GPIO_NUM_12;
|
||||||
constexpr auto LCD_PIN_CS = GPIO_NUM_37;
|
|
||||||
|
|
||||||
using tt::hal::sdcard::SpiSdCardDevice;
|
using tt::hal::sdcard::SpiSdCardDevice;
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ std::shared_ptr<SdCardDevice> createSdCard() {
|
|||||||
GPIO_NUM_NC,
|
GPIO_NUM_NC,
|
||||||
SdCardDevice::MountBehaviour::AtBoot,
|
SdCardDevice::MountBehaviour::AtBoot,
|
||||||
tt::hal::spi::getLock(SPI3_HOST),
|
tt::hal::spi::getLock(SPI3_HOST),
|
||||||
std::vector { LCD_PIN_CS },
|
std::vector<gpio_num_t>(),
|
||||||
SPI3_HOST
|
SPI3_HOST
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
#include <Tactility/hal/sdcard/SpiSdCardDevice.h>
|
||||||
|
|
||||||
constexpr auto SDCARD_PIN_CS = GPIO_NUM_12;
|
constexpr auto SDCARD_PIN_CS = GPIO_NUM_12;
|
||||||
constexpr auto LCD_PIN_CS = GPIO_NUM_37;
|
|
||||||
|
|
||||||
using tt::hal::sdcard::SpiSdCardDevice;
|
using tt::hal::sdcard::SpiSdCardDevice;
|
||||||
|
|
||||||
@ -15,7 +14,7 @@ std::shared_ptr<SdCardDevice> createSdCard() {
|
|||||||
GPIO_NUM_NC,
|
GPIO_NUM_NC,
|
||||||
SdCardDevice::MountBehaviour::AtBoot,
|
SdCardDevice::MountBehaviour::AtBoot,
|
||||||
tt::hal::spi::getLock(SPI3_HOST),
|
tt::hal::spi::getLock(SPI3_HOST),
|
||||||
std::vector { LCD_PIN_CS },
|
std::vector<gpio_num_t>(),
|
||||||
SPI3_HOST
|
SPI3_HOST
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
#ifdef ESP_PLATFORM
|
||||||
|
#include <sdkconfig.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef CONFIG_ESP_WIFI_ENABLED
|
#ifndef CONFIG_ESP_WIFI_ENABLED
|
||||||
|
|
||||||
#include <Tactility/service/wifi/Wifi.h>
|
#include <Tactility/service/wifi/Wifi.h>
|
||||||
|
|||||||
@ -92,7 +92,7 @@ bool load(DisplaySettings& settings) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool timeout_enabled = true;
|
bool timeout_enabled = false;
|
||||||
auto timeout_enabled_entry = map.find(SETTINGS_KEY_TIMEOUT_ENABLED);
|
auto timeout_enabled_entry = map.find(SETTINGS_KEY_TIMEOUT_ENABLED);
|
||||||
if (timeout_enabled_entry != map.end()) {
|
if (timeout_enabled_entry != map.end()) {
|
||||||
timeout_enabled = (timeout_enabled_entry->second == "1" || timeout_enabled_entry->second == "true" || timeout_enabled_entry->second == "True");
|
timeout_enabled = (timeout_enabled_entry->second == "1" || timeout_enabled_entry->second == "true" || timeout_enabled_entry->second == "True");
|
||||||
@ -118,7 +118,7 @@ DisplaySettings getDefault() {
|
|||||||
.orientation = getDefaultOrientation(),
|
.orientation = getDefaultOrientation(),
|
||||||
.gammaCurve = 1,
|
.gammaCurve = 1,
|
||||||
.backlightDuty = 200,
|
.backlightDuty = 200,
|
||||||
.backlightTimeoutEnabled = true,
|
.backlightTimeoutEnabled = false,
|
||||||
.backlightTimeoutMs = 60000
|
.backlightTimeoutMs = 60000
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,10 +111,14 @@ def write_core_variables(output_file, device_properties: ConfigParser):
|
|||||||
output_file.write("# Target\n")
|
output_file.write("# Target\n")
|
||||||
output_file.write(f"CONFIG_IDF_TARGET=\"{idf_target}\"\n")
|
output_file.write(f"CONFIG_IDF_TARGET=\"{idf_target}\"\n")
|
||||||
output_file.write("# CPU\n")
|
output_file.write("# CPU\n")
|
||||||
output_file.write(f"CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y\n")
|
output_file.write("CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y\n")
|
||||||
output_file.write(f"CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=240\n")
|
output_file.write("CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=240\n")
|
||||||
output_file.write(f"CONFIG_{idf_target.upper()}_DEFAULT_CPU_FREQ_240=y\n")
|
output_file.write(f"CONFIG_{idf_target.upper()}_DEFAULT_CPU_FREQ_240=y\n")
|
||||||
output_file.write(f"CONFIG_{idf_target.upper()}_DEFAULT_CPU_FREQ_MHZ=240\n")
|
output_file.write(f"CONFIG_{idf_target.upper()}_DEFAULT_CPU_FREQ_MHZ=240\n")
|
||||||
|
if idf_target != "esp32": # Not available on original ESP32
|
||||||
|
output_file.write("# Enable usage of MALLOC_CAP_EXEC on IRAM:\n")
|
||||||
|
output_file.write("CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=n\n")
|
||||||
|
output_file.write("CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=n\n")
|
||||||
|
|
||||||
def write_flash_variables(output_file, device_properties: ConfigParser):
|
def write_flash_variables(output_file, device_properties: ConfigParser):
|
||||||
flash_size = get_property_or_exit(device_properties, "hardware", "flashSize")
|
flash_size = get_property_or_exit(device_properties, "hardware", "flashSize")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user