diff options
author | Lennart Weller <lhw@ring0.de> | 2012-05-30 11:44:51 +0200 |
---|---|---|
committer | Lennart Weller <lhw@ring0.de> | 2012-05-30 11:44:51 +0200 |
commit | 79727379cd4f561bd9c7dbe423805bf86223c276 (patch) | |
tree | 10f2ecc43e84c32330cc07517e1d754c666770bc /main.vala | |
parent | 34ba5054315e3888003fc007956e67976aed08f5 (diff) | |
download | serial-barcode-scanner-79727379cd4f561bd9c7dbe423805bf86223c276.tar.bz2 |
Revert "event based version"
Moved commit to branch for testing purposes
This reverts commit 34ba5054315e3888003fc007956e67976aed08f5.
Diffstat (limited to 'main.vala')
-rw-r--r-- | main.vala | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -10,13 +10,11 @@ public static int main(string[] args) { dev = new Device(args[1], 9600, 8, 1); db = new Database("shop.db"); - dev.received_barcode.connect((data) => { - if(interpret(data)) + while(true) { + string message = dev.receive(); + if(interpret((string) message)) dev.blink(10); - }); - - new MainLoop(null, false).run(); - return 0; + } } public static bool interpret(string data) { |