Add index.html with basic documentation
This commit is contained in:
parent
14727e0124
commit
3a78fec456
5 changed files with 173 additions and 10 deletions
|
|
@ -18,7 +18,7 @@
|
|||
#include "server.h"
|
||||
|
||||
#define WIFI_SCAN_LIST_SIZE 10
|
||||
#define LUA_FILE_PATH "/assets"
|
||||
#define LFS_PATH "/assets"
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
|
|
@ -40,7 +40,7 @@ void init_filesystem() {
|
|||
ESP_LOGI(TAG, "Initializing File System");
|
||||
|
||||
esp_vfs_littlefs_conf_t conf = {
|
||||
.base_path = LUA_FILE_PATH,
|
||||
.base_path = LFS_PATH,
|
||||
.partition_label = "assets",
|
||||
.format_if_mount_failed = false,
|
||||
.dont_mount = false,
|
||||
|
|
@ -50,7 +50,7 @@ void init_filesystem() {
|
|||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Failed to mount or format filesystem");
|
||||
} else {
|
||||
ESP_LOGI(TAG, "Filesystem mounted at %s", LUA_FILE_PATH);
|
||||
ESP_LOGI(TAG, "Filesystem mounted at %s", LFS_PATH);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ void run_lua_file(const char *file_name, const char *test_name) {
|
|||
|
||||
// Construct the full file path
|
||||
char full_path[128];
|
||||
snprintf(full_path, sizeof(full_path), LUA_FILE_PATH"/%s", file_name);
|
||||
snprintf(full_path, sizeof(full_path), LFS_PATH"/%s", file_name);
|
||||
|
||||
if (luaL_dofile(L, full_path) == LUA_OK) {
|
||||
lua_pop(L, lua_gettop(L));
|
||||
|
|
@ -286,10 +286,10 @@ void app_main(void) {
|
|||
register_http_routes(server);
|
||||
}
|
||||
|
||||
// Run script in assets/boot.lua; this is executed as a FreeRTOS task
|
||||
// Run script in assets/scripts/boot.lua; this is executed as a FreeRTOS task
|
||||
// that may not be interrupted
|
||||
void runLuaFile (void* arg) {
|
||||
run_lua_file("boot.lua", "E-Paper Startup Script");
|
||||
run_lua_file("scripts/boot.lua", "E-Paper Startup Script");
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
xTaskCreate(runLuaFile, "run_lua_file", 4096, NULL, tskIDLE_PRIORITY, NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue