Browse Source

Merge branch 'master' of https://tree.clementinecomputing.com/clementinecomputing/popufare

clementinecomputing 5 năm trước cách đây
mục cha
commit
d847ee890b

BIN
busunit/DIUv2/html/assets/389214__joe-anderson22__microwave-beeps.mp3


+ 2 - 1
busunit/DIUv2/html/js/diu_ui-ORG.js

@@ -1620,7 +1620,8 @@ function init() {
   ele.addEventListener('mouseup', ui_pattern_mouseup);
 
   g_snd.button_press = new Audio("assets/459992_florianreichelt_beep_short.mp3");
-  g_snd.accept_fare = new Audio("assets/443026__qubodup__public-domain-beep-sound.mp3");
+  //g_snd.accept_fare = new Audio("assets/443026__qubodup__public-domain-beep-sound.mp3");
+  g_snd.accept_fare = new Audio("assets/389214__joe-anderson22__microwave-beeps.mp3");
   g_snd.reject_fare = new Audio("assets/368780__gurie__start-sound-beep.mp3");
   g_snd.rule_error = new Audio("assets/363920__samsterbirdies__8-bit-error.mp3");
 

+ 13 - 2
busunit/PIU/piu_main.c

@@ -31,6 +31,7 @@
 #include "../commhub/commhub.h"
 #include "../commhub/client_utils.h"
 
+#define PIU_MINDER_VERSION "1.0.1"
 
 int piu_fd = -1;
 int hub_fd = -1;
@@ -321,6 +322,13 @@ int main(int argc, char **argv) {
   _usec_ratelimit_prv = _usec_ratelimit_now;
   _usec_ratelimit_del = 1000000;
 
+  if ( (argc>1) && (
+        (strncmp(argv[1], "-h", 3)==0) ||
+        (strncmp(argv[1], "-v", 3)==0) ) ) {
+    printf("piu_minder version: %s\n", PIU_MINDER_VERSION);
+    exit(0);
+  }
+
 
   configure_signal_handlers(argv[0]);
   maintain_ipc_hub_connect(argv[0]);
@@ -510,9 +518,12 @@ int main(int argc, char **argv) {
                   //
                   trav += 3;
 
-                  // Ignore null reads.
+                  // Ignore null reads and
+                  // spurious 1-bit reads
                   //
-                  if(strcmp(trav,"0|0")) {
+                  if ( (strcmp(trav,"0|0")!=0) &&
+                       (strcmp(trav,"1|0")!=0) &&
+                       (strcmp(trav,"1|1")!=0) ) {
                     prepare_message(&outgoing_msg, MAILBOX_TOKEN_RFID, trav, strlen(trav) + 1);
                     send_message(hub_fd, &outgoing_msg);
                   }