[hamradio-commits] [dump1090] 16/373: Interactive mode with --ifile: play at natural speed.
Matthew Ernisse
mernisse-guest at moszumanska.debian.org
Thu Oct 23 14:58:00 UTC 2014
This is an automated email from the git hooks/post-receive script.
mernisse-guest pushed a commit to branch backport
in repository dump1090.
commit 840a005d166120af5b68a75d7c4d955b624b2686
Author: antirez <antirez at gmail.com>
Date: Mon Jan 7 01:47:39 2013 +0100
Interactive mode with --ifile: play at natural speed.
---
dump1090.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/dump1090.c b/dump1090.c
index df9cad5..ca29d1b 100644
--- a/dump1090.c
+++ b/dump1090.c
@@ -337,6 +337,14 @@ void readDataFromFile(void) {
continue;
}
+ if (Modes.interactive) {
+ /* When --ifile and --interactive are used together, slow down
+ * playing at the natural rate of the RTLSDR received. */
+ pthread_mutex_unlock(&Modes.data_mutex);
+ usleep(5000);
+ pthread_mutex_lock(&Modes.data_mutex);
+ }
+
toread = Modes.data_len;
p = Modes.data;
while(toread) {
@@ -1234,7 +1242,7 @@ void interactiveReceiveData(struct modesMessage *mm) {
* since the aircraft that is currently on head sent a message,
* othewise with multiple aircrafts at the same time we have an
* useless shuffle of positions on the screen. */
- if (Modes.aircrafts != a && (time(NULL) - a->seen) >= 1) {
+ if (0 && Modes.aircrafts != a && (time(NULL) - a->seen) >= 1) {
aux = Modes.aircrafts;
while(aux->next != a) aux = aux->next;
/* Now we are a node before the aircraft to remove. */
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/dump1090.git
More information about the pkg-hamradio-commits
mailing list