Skip to content

Commit

Permalink
fix invalid ota state
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed May 15, 2024
1 parent 6f1c7a7 commit 03d3af3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Frontend/pages/ota_update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class _OtaUpdateState extends ConsumerState<OtaUpdate> {
super.initState();
baseStatefulDevice = ref.read(knownDevicesProvider)[widget.device];
firmwareInfo ??= baseStatefulDevice?.fwInfo.value;
downloadFirmware();
WakelockPlus.enabled.then((value) => wakelockEnabledBeforehand = value);
}

Expand Down Expand Up @@ -236,7 +235,7 @@ class _OtaUpdateState extends ConsumerState<OtaUpdate> {
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Upload Progress: ${current} / ${firmwareFile!.length} = ${uploadProgress.toStringAsPrecision(3)}'),
Text('Upload Progress: ${current} / ${firmwareFile?.length} = ${uploadProgress.toStringAsPrecision(3)}'),
Text('MTU: ${baseStatefulDevice!.mtu.value}'),
Text('OtaState: ${otaState.name}'),
Text('DeviceState: ${baseStatefulDevice!.deviceState.value}'),
Expand Down

0 comments on commit 03d3af3

Please sign in to comment.