File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { MODAL_TYPE } from '@interfaces/animation/enums'
22import { NOTIFICATION_TYPE } from '@interfaces/notifications/enums'
33import Terminal from '@pages/Terminal'
44import { useNavigate } from '@solidjs/router'
5+ import { logger } from '@src/logger'
56import { download } from '@src/utils'
67import { addNotification } from '@store/actions/notifications/addNotification'
78import { getFirmwareLogs } from '@store/actions/terminal/getFirmwareLogs'
@@ -64,7 +65,13 @@ export const TerminalContainer = () => {
6465 } )
6566 return
6667 }
67- download ( detailedLogs ( ) . toString ( ) , 'esp-web-tools-logs.txt' )
68+ download (
69+ `
70+ ${ detailedLogs ( ) . toString ( ) }
71+ ------------------------------ LOGGER ------------------------
72+ ${ logger . getLogs ( ) } ` ,
73+ 'esp-web-tools-logs.txt' ,
74+ )
6875 } }
6976 onClickBack = { ( ) => {
7077 navigate ( '/' )
Original file line number Diff line number Diff line change @@ -392,6 +392,8 @@ export class EspApiCore {
392392 ) : Promise < string > {
393393 await this . _switchDeviceMode ( port , 'wifi' )
394394
395+ await sleep ( 1000 )
396+
395397 const commands = [
396398 { command : COMMAND . SET_MDNS , data : { hostname : mdns } } ,
397399 {
@@ -401,6 +403,7 @@ export class EspApiCore {
401403 ]
402404
403405 await this . _sendCommands ( { portName : port , commands } )
406+ await sleep ( 1500 )
404407 await this . _sendCommands ( { portName : port , commands : [ { command : COMMAND . CONNECT_WIFI } ] } )
405408
406409 const response : string = await invoke ( ESP_COMMAND . GET_WIFI_CONNECTION_STATUS , {
@@ -419,11 +422,11 @@ export class EspApiCore {
419422
420423 const connectionStatus = data [ COMMAND . GET_WIFI_STATUS ]
421424
422- if ( ! connectionStatus || connectionStatus . status !== 'success' ) {
425+ if ( ! connectionStatus || connectionStatus ? .status !== 'success' ) {
423426 throw new Error ( 'Failed to setup wireless connection' )
424427 }
425428
426- if ( connectionStatus . data . status !== 'connected' ) {
429+ if ( connectionStatus ? .data ? .status !== 'connected' ) {
427430 throw new Error ( 'Failed to setup wireless connection' )
428431 }
429432
You can’t perform that action at this time.
0 commit comments