Fixes and improvements (#132)
- Fix glitch when turning on WiFi: It would temporarily show "No networks found" right before starting the first scan. - Fix spinner to use Assets.h - Replace statusbar battery icons - Better statusbar icon for when WiFi is on but not connected - Replace statusbar WiFi icons and Wifi Manage RSSI/lock icons - Fix for crash when timer is null in I2cScanner - Deprecate Spacer - Fixes for toolbar layout (simplified) - Improved ImageViewer app: center image and add filename text on the bottom - Add LV debug params to sdkconfig.developer - Disabled LV spinner, msgbox and window widgets. These have equivalents in Tactility.
This commit is contained in:
committed by
GitHub
parent
b4592dd7d1
commit
f34440eb6f
@@ -1,6 +1,5 @@
|
||||
#include "StringUtils.h"
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
namespace tt::string {
|
||||
@@ -29,6 +28,15 @@ bool getPathParent(const char* path, char* output) {
|
||||
}
|
||||
}
|
||||
|
||||
std::string getLastPathSegment(const std::string& path) {
|
||||
auto index = path.find_last_of('/');
|
||||
if (index != std::string::npos) {
|
||||
return path.substr(index + 1);
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> split(const std::string&input, const std::string&delimiter) {
|
||||
size_t token_index = 0;
|
||||
size_t delimiter_index;
|
||||
|
||||
@@ -23,6 +23,12 @@ int findLastIndex(const char* text, size_t from_index, char find);
|
||||
*/
|
||||
bool getPathParent(const char* path, char* output);
|
||||
|
||||
/**
|
||||
* Given a filesystem path as input, get the last segment of a path
|
||||
* @param[in] path input path
|
||||
*/
|
||||
std::string getLastPathSegment(const std::string& path);
|
||||
|
||||
/**
|
||||
* Splits the provided input into separate pieces with delimiter as separator text.
|
||||
* When the input string is empty, the output list will be empty too.
|
||||
|
||||
Reference in New Issue
Block a user