31 lines
823 B
Dart
31 lines
823 B
Dart
import 'dart:io';
|
|
import 'dart:async';
|
|
import 'package:sweepstore/debug.dart';
|
|
|
|
void main() async {
|
|
int refreshCount = 0;
|
|
while (true) {
|
|
// Clear console
|
|
if (Platform.isWindows) {
|
|
print(Process.runSync("cls", [], runInShell: true).stdout);
|
|
} else {
|
|
print(Process.runSync("clear", [], runInShell: true).stdout);
|
|
}
|
|
|
|
refreshCount++;
|
|
|
|
// Read example.bin
|
|
final file = File('example.bin');
|
|
|
|
if (await file.exists()) {
|
|
final data = await file.readAsBytes();
|
|
print('Binary dump of example.bin (${data.length} bytes) - Refresh #$refreshCount\n');
|
|
print(binaryDump(data));
|
|
print('\n--- Refreshing in 1 seconds ---');
|
|
} else {
|
|
print('Error: example.bin not found - Refresh #$refreshCount');
|
|
}
|
|
|
|
await Future.delayed(Duration(seconds: 1));
|
|
}
|
|
} |