projects
/
trinked.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65036d7
)
add detection of reconnect
author
Teodor Sigaev
<teodor@sigaev.ru>
Wed, 20 Apr 2016 19:19:39 +0000
(22:19 +0300)
committer
Teodor Sigaev
<teodor@sigaev.ru>
Wed, 20 Apr 2016 19:19:39 +0000
(22:19 +0300)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index
f283be0
..
b4d75a1
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-93,6
+93,12
@@
main_loop() {
trinketClose();
+ if (collected > 0 && prevDose[collected - 1] > curDose)
+ {
+ tlog(TL_WARN, "Reconnect or full reset detected");
+ collected = 0;
+ }
+
if (collected <= tics) {
prevDose[collected++] = curDose;
} else {