Skip to content

Commit 3ffce24

Browse files
dbg
1 parent 9d2ece6 commit 3ffce24

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

kernel/src/services/FirmwareService.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,10 @@ export class FirmwareService {
129129
}
130130

131131
if (this.selectedFirmwareId === 'auto') {
132+
console.log('Auto-detecting firmware...');
132133
return this.downloadAutoDetectedFirmware();
133134
} else {
135+
console.log('FirmwareService: Downloading firmware for:', this.selectedFirmwareId);
134136
return this.downloadSpecificFirmware(this.selectedFirmwareId);
135137
}
136138
}
@@ -158,6 +160,8 @@ export class FirmwareService {
158160

159161
// TODO: This is where we can add our logic of fetching from GitHub
160162
private async downloadSpecificFirmware(firmwareId: string): Promise<string> {
163+
164+
console.log("Downloading firmware for:", firmwareId);
161165
const selectedFirmware = this.firmwareOptions[firmwareId]
162166
if (!selectedFirmware || !selectedFirmware.url) {
163167
throw new Error(`Invalid firmware selection or no URL for: ${firmwareId}`);
@@ -170,10 +174,12 @@ export class FirmwareService {
170174
}
171175
});
172176

173-
if (!result.ok) {
174-
console.log("Error fetching firmware:", result.status, result.statusText);
175-
throw new Error(`Failed to fetch firmware: ${result.status} ${result.statusText}`);
176-
}
177+
console.log('Firmware fetch result:', result);
178+
179+
// if (!result.ok) {
180+
// console.log("Error fetching firmware:", result.status, result.statusText);
181+
// throw new Error(`Failed to fetch firmware: ${result.status} ${result.statusText}`);
182+
// }
177183

178184
this.firmwareBlob = await result.blob();
179185
const uint8Array = new Uint8Array(await this.firmwareBlob.arrayBuffer());

kernel/src/services/FlashService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export class FlashService {
9393

9494
let targetFirmware = 'esp32';
9595

96+
// TODO: will have to change this to also perform detection for all other board types
9697
if (chipType.includes('C6')) {
9798
targetFirmware = 'esp32-c6';
9899
} else if (chipType.includes('C3')) {
@@ -115,8 +116,9 @@ export class FlashService {
115116
}
116117
}
117118

118-
progressOverlay.setStatus('Downloading firmware...');
119+
progressOverlay.setStatus('Flash Process: Downloading firmware...');
119120
let firmwareString = await this.firmwareService.downloadFirmware();
121+
console.log('Firmware string from within flash process:', firmwareString);
120122

121123
const flashOptions = {
122124
fileArray: [{

0 commit comments

Comments
 (0)