Merge pull request #3248 from proddy/littlefs-migrate

Littlefs migrate
This commit is contained in:
Proddy
2026-09-20 22:38:39 +02:00
committed by GitHub
24 changed files with 429 additions and 111 deletions
+20 -23
View File
@@ -98,13 +98,13 @@ let system_status = {
wifi_rssi: -41,
esp_platform: 'ESP32',
build_flags: 'DEMO',
cpu_type: 'ESP32',
cpu_type: 'ESP32-D0WD-V3',
cpu_rev: 0,
cpu_cores: 2,
cpu_freq_mhz: 240,
max_alloc_heap: 191,
arduino_version: 'ESP32 Arduino v2.0.17',
sdk_version: 'v4.4.7',
arduino_version: 'Tasmota Arduino v3.3.8',
sdk_version: '5.5.4.260407',
partition: 'app0',
flash_chip_size: 16384,
flash_chip_speed: 80000000,
@@ -127,13 +127,13 @@ let system_status = {
},
{
partition: 'app1',
version: '3.8.1-dev.40',
version: '3.8.3',
install_date: '2025-03-01T13:29:13.999Z',
size: 4672
},
{
partition: 'factory',
version: '3.8.1-dev.39',
version: '3.8.4',
install_date: '2025-03-01T13:29:13.999Z',
size: 4672
}
@@ -141,24 +141,22 @@ let system_status = {
// partitions: [],
developer_mode: settings.developer_mode,
disable_reset: settings.disable_reset,
model: '',
board: '',
// model: 'BBQKees Electronics EMS Gateway E32 V2 (E32 V2.0 P3/2024011)',
// board: 'E32V2',
// status: 0,
status: 3
model: 'BBQKees Electronics E32V2.2 rev.2.2/2024074',
board: 'E32V2_2',
status: 0
// status: 3
};
// Test Versioning
// Test the versioning
let DEV_VERSION_IS_UPGRADEABLE: boolean;
let STABLE_VERSION_IS_UPGRADEABLE: boolean;
let THIS_VERSION: string;
let LATEST_STABLE_VERSION = '3.8.3';
let LATEST_STABLE_VERSION = '3.8.4';
let LATEST_DEV_VERSION = '3.9.0-dev.1';
// scenarios for testing versioning
// let version_test = 0; // on latest stable, or switch to dev
let version_test = 1; // on latest dev, or switch back to stable
let version_test = 0; // on latest stable, or switch to dev
// let version_test = 1; // on latest dev, or switch back to stable
// let version_test = 2; // upgrade an older stable to latest stable or switch to latest dev
// let version_test = 3; // upgrade dev to latest, or switch to stable
// let version_test = 4; // downgrade to an older dev, or switch back to stable
@@ -446,25 +444,24 @@ function executeCommand(name: string) {
}
// called by Action endpoint upgradeImportantMessages
// 0 is do nothing
// 1 is a special upgrade and needs an export->factory reset->import
// 2 is a major upgrade
function upgradeImportantMessages(version: string) {
// 0 is do nothing
// 1 means 3.9 and factory reset required
// 2 means a major version upgrade
let upgradeImportantMessageType_n = 0;
// check file extensions
// check file extensions first
if (version.endsWith('.md5') || version.endsWith('.json')) {
upgradeImportantMessageType_n = 0; // digest / backup restore: no upgrade warning
} else if (version.endsWith('.bin')) {
// extract the version number from the filename and if its going from 3.8.x to 3.9.x, then set upgradeImportantMessageType_n to 1
const versionNumber = version.split('.');
if (versionNumber[0] === '3' && versionNumber[1] === '8') {
upgradeImportantMessageType_n = 1; // make it 1, factory reset required
upgradeImportantMessageType_n = 2; // major upgrade
}
} else {
// this is a version string like "3.9.0"
upgradeImportantMessageType_n = 1; // make it 1, for testing, meaning a factory reset is required
// the parameter is a version string like "3.9.0"
upgradeImportantMessageType_n = 2; // major upgrade
}
console.log(