Skip to content

Commit

Permalink
ZUSI WS size seems to be a problem (@esp-idf)
Browse files Browse the repository at this point in the history
  • Loading branch information
higaski committed Jan 19, 2025
1 parent 3e8b0b9 commit e1426fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/widgets/mdu_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ class _MduDialogState extends ConsumerState<MduDialog> {
int i = 0;
int failCount = 0;
while (i < blocks.length) {
// Transmit 256 (or less) blocks
final n = min(blockSize, blocks.length - i);
// Number of blocks transmit at once
final n = min(256, blocks.length - i);
for (var j = 0; j < n; ++j) {
_mdu.zppUpdate((i + j) * blockSize, Uint8List.fromList(blocks[i + j]));
}
Expand Down Expand Up @@ -371,8 +371,8 @@ class _MduDialogState extends ConsumerState<MduDialog> {
int i = 0;
int failCount = 0;
while (i < blocks.length) {
// Transmit 64 (or less) blocks
final n = min(blockSize, blocks.length - i);
// Number of blocks transmit at once
final n = min(64, blocks.length - i);
for (var j = 0; j < n; ++j) {
_mdu.zsuUpdate((i + j) * blockSize, Uint8List.fromList(blocks[i + j]));
}
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/zusi_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ class _ZusiDialogState extends ConsumerState<ZusiDialog> {
int i = 0;
int failCount = 0;
while (i < blocks.length) {
// Transmit 256 (or less) blocks
final n = min(blockSize, blocks.length - i);
// Number of blocks transmit at once
final n = min(16, blocks.length - i);
for (var j = 0; j < n; ++j) {
_zusi.writeZpp((i + j) * blockSize, Uint8List.fromList(blocks[i + j]));
}
Expand Down

0 comments on commit e1426fd

Please sign in to comment.