mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Merge develop into main (#418)
- WiFi code cleanup - When WifiConnect opens and SSID is filled in, automatically focus on the password field - When no touch screen is present, toolbar close buttons should be automatically selected - When `device.py` selects a device, print it on screen
This commit is contained in:
parent
a4f4784ed9
commit
eba1f8955a
@ -2,19 +2,12 @@
|
|||||||
|
|
||||||
## Before release
|
## Before release
|
||||||
|
|
||||||
- Create function that tests available memory and logs when it's low:
|
|
||||||
- Add low memory warning when calling DevelopmentService::handleAppInstall()
|
|
||||||
- Add low memory warning when calling tt::app::install
|
|
||||||
- Add statusbar icon that shows low/critical memory warnings
|
|
||||||
- Change ButtonControl to work with interrupts and xQueue
|
- Change ButtonControl to work with interrupts and xQueue
|
||||||
- TCA9534 keyboards should use interrupts
|
- TCA9534 keyboards should use interrupts
|
||||||
- GT911 drivers should use interrupts if it's stable
|
- GT911 drivers should use interrupts if it's stable
|
||||||
- Elecrow Basic & Advance 3.5" memory issue: not enough memory for App Hub
|
- Elecrow Basic & Advance 3.5" memory issue: not enough memory for App Hub
|
||||||
- App Hub crashes if you close it while an app is being installed
|
- App Hub crashes if you close it while an app is being installed
|
||||||
- Fix glitches when installing app via App Hub with 4.3" Waveshare
|
- Fix glitches when installing app via App Hub with 4.3" Waveshare
|
||||||
- Wi-Fi should connect to the access point with the strongest signal over similarly named APs
|
|
||||||
- Wi-Fi connect app should focus on password field when SSID was passed on
|
|
||||||
- Auto-select the close button of an app by default on non-touch devices?
|
|
||||||
- Calculator bugs (see GitHub issue)
|
- Calculator bugs (see GitHub issue)
|
||||||
- Try out speed optimizations: https://docs.espressif.com/projects/esp-faq/en/latest/software-framework/peripherals/lcd.html
|
- Try out speed optimizations: https://docs.espressif.com/projects/esp-faq/en/latest/software-framework/peripherals/lcd.html
|
||||||
(relates to CONFIG_ESP32S3_DATA_CACHE_LINE_64B that is in use for RGB displays via the `device.properties` fix/workaround)
|
(relates to CONFIG_ESP32S3_DATA_CACHE_LINE_64B that is in use for RGB displays via the `device.properties` fix/workaround)
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
#include "WifiApSettings.h"
|
#include "WifiApSettings.h"
|
||||||
|
|
||||||
#ifdef ESP_PLATFORM
|
#ifdef ESP_PLATFORM
|
||||||
#include "esp_wifi.h"
|
#include <esp_wifi.h>
|
||||||
#else
|
#else
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
// From esp_wifi_types.h in ESP-IDF 5.2
|
// From esp_wifi_types.h in ESP-IDF 5.2
|
||||||
|
|||||||
@ -192,6 +192,10 @@ void View::init(AppContext& app, lv_obj_t* parent) {
|
|||||||
std::string ssid;
|
std::string ssid;
|
||||||
if (optSsidParameter(bundle, ssid)) {
|
if (optSsidParameter(bundle, ssid)) {
|
||||||
lv_textarea_set_text(ssid_textarea, ssid.c_str());
|
lv_textarea_set_text(ssid_textarea, ssid.c_str());
|
||||||
|
|
||||||
|
if (!ssid.empty()) {
|
||||||
|
lv_group_focus_obj(password_textarea);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string password;
|
std::string password;
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#define LV_USE_PRIVATE_API 1 // For actual lv_obj_t declaration
|
#define LV_USE_PRIVATE_API 1 // For actual lv_obj_t declaration
|
||||||
|
|
||||||
|
#include <Tactility/TactilityConfig.h>
|
||||||
|
#include <Tactility/lvgl/Keyboard.h>
|
||||||
#include <Tactility/lvgl/Toolbar.h>
|
#include <Tactility/lvgl/Toolbar.h>
|
||||||
|
|
||||||
#include <Tactility/service/loader/Loader.h>
|
#include <Tactility/service/loader/Loader.h>
|
||||||
@ -140,6 +142,13 @@ lv_obj_t* toolbar_create(lv_obj_t* parent, const std::string& title) {
|
|||||||
|
|
||||||
toolbar_set_nav_action(obj, LV_SYMBOL_CLOSE, &stop_app, nullptr);
|
toolbar_set_nav_action(obj, LV_SYMBOL_CLOSE, &stop_app, nullptr);
|
||||||
|
|
||||||
|
// If we don't have a touch device, we assume there's some other kind of input like a keyboard, an encoder or button control
|
||||||
|
// In that scenario we want to automatically have the close button selected so the user doesn't have to press the widget selection
|
||||||
|
// an extra time for every screen.
|
||||||
|
if (!hal::hasDevice(hal::Device::Type::Touch)) {
|
||||||
|
lv_group_focus_obj(toolbar->close_button);
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -195,7 +195,7 @@ void connect(const settings::WifiApSettings& ap, bool remember) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Manual connect (e.g. via app) should stop auto-connecting until the connection is established
|
// Stop auto-connecting until the connection is established
|
||||||
wifi->pause_auto_connect = true;
|
wifi->pause_auto_connect = true;
|
||||||
wifi->connection_target = ap;
|
wifi->connection_target = ap;
|
||||||
wifi->connection_target_remember = remember;
|
wifi->connection_target_remember = remember;
|
||||||
@ -274,11 +274,12 @@ std::vector<ApRecord> getScanResults() {
|
|||||||
if (wifi->scan_list_count > 0) {
|
if (wifi->scan_list_count > 0) {
|
||||||
uint16_t i = 0;
|
uint16_t i = 0;
|
||||||
for (; i < wifi->scan_list_count; ++i) {
|
for (; i < wifi->scan_list_count; ++i) {
|
||||||
|
const auto& scanned_item = wifi->scan_list[i];
|
||||||
records.push_back((ApRecord) {
|
records.push_back((ApRecord) {
|
||||||
.ssid = (const char*)wifi->scan_list[i].ssid,
|
.ssid = reinterpret_cast<const char*>(scanned_item.ssid),
|
||||||
.rssi = wifi->scan_list[i].rssi,
|
.rssi = scanned_item.rssi,
|
||||||
.channel = wifi->scan_list[i].primary,
|
.channel = scanned_item.primary,
|
||||||
.auth_mode = wifi->scan_list[i].authmode
|
.auth_mode = scanned_item.authmode
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -404,7 +405,17 @@ static bool copy_scan_list(std::shared_ptr<Wifi> wifi) {
|
|||||||
TT_LOG_I(TAG, "Scanned %u APs. Showing %u:", record_count, safe_record_count);
|
TT_LOG_I(TAG, "Scanned %u APs. Showing %u:", record_count, safe_record_count);
|
||||||
for (uint16_t i = 0; i < safe_record_count; i++) {
|
for (uint16_t i = 0; i < safe_record_count; i++) {
|
||||||
wifi_ap_record_t* record = &wifi->scan_list[i];
|
wifi_ap_record_t* record = &wifi->scan_list[i];
|
||||||
TT_LOG_I(TAG, " - SSID %s (RSSI %d, channel %d)", record->ssid, record->rssi, record->primary);
|
TT_LOG_I(TAG, " - SSID %s, RSSI %d, channel %d, BSSID %02X%02X%02X%02X%02X%02X",
|
||||||
|
record->ssid,
|
||||||
|
record->rssi,
|
||||||
|
record->primary,
|
||||||
|
record->bssid[0],
|
||||||
|
record->bssid[1],
|
||||||
|
record->bssid[2],
|
||||||
|
record->bssid[3],
|
||||||
|
record->bssid[4],
|
||||||
|
record->bssid[5]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -228,6 +228,11 @@ def main(device_id: str, is_dev: bool):
|
|||||||
device_properties = read_device_properties(device_id)
|
device_properties = read_device_properties(device_id)
|
||||||
with open(output_file_path, "w") as output_file:
|
with open(output_file_path, "w") as output_file:
|
||||||
write_properties(output_file, device_properties, device_id, is_dev)
|
write_properties(output_file, device_properties, device_id, is_dev)
|
||||||
|
if is_dev:
|
||||||
|
dev_mode_postfix = " in dev mode"
|
||||||
|
else:
|
||||||
|
dev_mode_postfix = ""
|
||||||
|
print(f"Created sdkconfig for {device_id}{dev_mode_postfix}")
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if "--help" in sys.argv:
|
if "--help" in sys.argv:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user