]> git.scottworley.com Git - tattlekey/blobdiff - client/config.c
client: Change wire format!: Add epoch
[tattlekey] / client / config.c
index 83a3eb3e9381e052353067dbab570b6a12094615..a708df4aed9095b91f7333c69a612a73ed6af681 100644 (file)
@@ -22,8 +22,25 @@ const uint config_button_pin = 18;
  * times in short succession.  (We also use this to de-bounce. :) */
 const u32_t config_minimum_seconds_between_button_presses = 1;
 
-/* Send each report multiple times. */
-const uint config_resend_count = 5;
+/* 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. */
+const uint config_resend_count = 16;
 
 /* These control the size of the per-send-count press queues.
 When the button is pressed more than config_maximum_queue_size times