]> git.scottworley.com Git - tattlekey/blobdiff - client/config.h
client: New epoch if seq wraps
[tattlekey] / client / config.h
index ee3dba88a147c071cb14963c4a95271c45ee3129..3a61793a372d6895de3d9324b9673aec20587d73 100644 (file)
@@ -1,3 +1,20 @@
+/* tattlekey: A one-key UDP keyboard
+ * Copyright (C) 2023  Scott Worley <scottworley@scottworley.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ */
+
 #ifndef CONFIG_H
 #define CONFIG_H
 
@@ -25,7 +42,24 @@ extern const uint config_button_pin;
  * times in short succession.  (We also use this to de-bounce. :) */
 extern const u32_t config_minimum_seconds_between_button_presses;
 
-/* Send each report multiple times. */
+/* Send each report multiple times. Re-sends are sent with exponential delay:
+ *   #1 sent immediately
+ *   #2 after 1 seconds
+ *   #3 after 2 seconds
+ *   #4 after 4 seconds
+ *   #5 after 8 seconds
+ *   ...
+ *   #11 after 8 minutes
+ *   #12 after 17 minutes
+ *   #13 after 34 minutes
+ *   #14 after 68 minutes
+ *   #15 after 2 hours
+ *   #16 after 4 hours
+ *   #17 after 9 hours
+ *   etc.
+ * This provides some robustness against network outages, automatically
+ * replaying the log periodically to be collected after connectivity
+ * is restored. */
 extern const uint config_resend_count;
 
 /* These control the size of the per-send-count press queues.