correctly handle flashStart

This commit is contained in:
andreas 2023-10-01 17:53:57 +02:00
parent 1d7f62f637
commit 38dae47fa5
1 changed files with 3 additions and 3 deletions

View File

@ -255,7 +255,7 @@ class ESPInstaller{
} }
let info=await checkChip(this.getChipId(),imageData,isFull); let info=await checkChip(this.getChipId(),imageData,isFull);
let fileList = [ let fileList = [
{ data: imageData, address: info.flashAddress } { data: imageData, address: info.flashStart }
]; ];
let txt = isFull ? "baseImage (all data will be erased)" : "update"; let txt = isFull ? "baseImage (all data will be erased)" : "update";
if (!confirm(`ready to install ${version}\n${txt}`)) { if (!confirm(`ready to install ${version}\n${txt}`)) {
@ -276,7 +276,7 @@ class ESPInstaller{
* @param {*} imageData the data to be flashed * @param {*} imageData the data to be flashed
* @param {*} version the info shown in the dialog * @param {*} version the info shown in the dialog
* @param {*} checkChip will be called with the found chipId and the data * @param {*} checkChip will be called with the found chipId and the data
* must return an info with flashAddress * must return an info with flashStart
* @returns * @returns
*/ */
async runFlash(isFull,imageData,version,checkChip){ async runFlash(isFull,imageData,version,checkChip){
@ -284,7 +284,7 @@ class ESPInstaller{
await this.connect(); await this.connect();
let info= await checkChip(this.getChipId(),imageData,isFull); //just check let info= await checkChip(this.getChipId(),imageData,isFull); //just check
let fileList = [ let fileList = [
{ data: imageData, address: info.flashAddress } { data: imageData, address: info.flashStart }
]; ];
let txt = isFull ? "baseImage (all data will be erased)" : "update"; let txt = isFull ? "baseImage (all data will be erased)" : "update";
if (!confirm(`ready to install ${version}\n${txt}`)) { if (!confirm(`ready to install ${version}\n${txt}`)) {