Fix handling of special channels in log_to_mcap

Because RegisterWithoutStarting starts the clocks at 0.0, and because
the various options for creating startup handlers didn't obviously help
in this situation, fix the special configuration and timestamp channels
to not produce messages at t=0.0.

Change-Id: Ifaab480c7f37a6b9fea0317d3a5a529bdb3c3c86
Signed-off-by: James Kuszmaul <jabukuszmaul@gmail.com>
diff --git a/aos/util/mcap_logger.h b/aos/util/mcap_logger.h
index 70a1328..c3fdda1 100644
--- a/aos/util/mcap_logger.h
+++ b/aos/util/mcap_logger.h
@@ -143,6 +143,11 @@
                     const Context &context, ChunkStatus *chunk);
   void WriteChunk(ChunkStatus *chunk);
 
+  // Writes out the special configuration channel. This gets called right before
+  // the first actual message is written so that we can have a reasonable
+  // monotonic clock time.
+  void WriteConfigurationMessage();
+
   // The helpers for writing records which appear in the Summary section will
   // return SummaryOffset's so that they can be referenced in the SummaryOffset
   // section.
@@ -199,6 +204,7 @@
   uint16_t configuration_id_ = 0;
   FlatbufferDetachedBuffer<Channel> configuration_channel_;
   FlatbufferDetachedBuffer<Configuration> configuration_;
+  bool wrote_configuration_ = false;
 
   // Memory buffer to use for compressing data.
   std::vector<uint8_t> compression_buffer_;