@ -290,6 +290,7 @@ class MeshCoreConnector extends ChangeNotifier {
bool _caplogAwaitingStart = false ;
bool _caplogAwaitingStart = false ;
Completer < CaplogAck > ? _caplogAckCompleter ;
Completer < CaplogAck > ? _caplogAckCompleter ;
Completer < CaplogDeviceStatus > ? _caplogStatusCompleter ;
Completer < CaplogDeviceStatus > ? _caplogStatusCompleter ;
int _caplogChunks = 0 ; / / CHUNK frames in the active download ( diagnostic )
String ? _firmwareVersion ;
String ? _firmwareVersion ;
String ? _deviceModel ;
String ? _deviceModel ;
int ? _offbandCaps ;
int ? _offbandCaps ;
@ -4354,10 +4355,15 @@ class MeshCoreConnector extends ChangeNotifier {
switch ( event . status ) {
switch ( event . status ) {
case CaplogStatus . started:
case CaplogStatus . started:
_caplogAwaitingStart = false ;
_caplogAwaitingStart = false ;
_caplogChunks = 0 ;
break ;
case CaplogStatus . chunk:
_caplogChunks + + ;
break ;
break ;
case CaplogStatus . completed:
case CaplogStatus . completed:
_appDebugLogService ? . info (
_appDebugLogService ? . info (
' Caplog download complete: ${ event . bytes ! . length } bytes ' ,
' Caplog download complete: ${ event . bytes ! . length } bytes in '
' $ _caplogChunks chunks ' ,
tag: ' Caplog ' ,
tag: ' Caplog ' ,
) ;
) ;
completer . complete ( event . bytes ) ;
completer . complete ( event . bytes ) ;
@ -4365,17 +4371,17 @@ class MeshCoreConnector extends ChangeNotifier {
case CaplogStatus . truncated:
case CaplogStatus . truncated:
_appDebugLogService ? . warn (
_appDebugLogService ? . warn (
' Caplog download truncated: ${ event . bytes ! . length } of '
' Caplog download truncated: ${ event . bytes ! . length } of '
' ${ event . expected } bytes ' ,
' ${ event . expected } bytes in $ _caplogChunks chunks ' ,
tag: ' Caplog ' ,
tag: ' Caplog ' ,
) ;
) ;
completer . completeError (
completer . completeError (
CaplogTruncatedException (
CaplogTruncatedException (
received: event . bytes ! . length ,
received: event . bytes ! . length ,
expected: event . expected ! ,
expected: event . expected ! ,
chunks: _caplogChunks ,
) ,
) ,
) ;
) ;
break ;
break ;
case CaplogStatus . chunk:
case CaplogStatus . ignored:
case CaplogStatus . ignored:
break ;
break ;
}
}