From 3d1c4e2bfd95adf49fe4436206b56dd83870e476 Mon Sep 17 00:00:00 2001
From: Nicholas Sherlock <n.sherlock@gmail.com>
Date: Wed, 19 Aug 2015 20:11:01 +1200
Subject: [PATCH] Fix display of logs with powerup times in excess of 35
 minutes

---
 src/blackbox_render.c                                         | 2 +-
 visual-studio/blackbox_decode/blackbox_decode.vcxproj         | 1 +
 visual-studio/blackbox_decode/blackbox_decode.vcxproj.filters | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/blackbox_render.c b/src/blackbox_render.c
index b7eff46..193e0a7 100644
--- a/src/blackbox_render.c
+++ b/src/blackbox_render.c
@@ -235,7 +235,7 @@ void loadFrameIntoPoints(flightLog_t *log, bool frameValid, int32_t *frame, uint
 
     if (frameType == 'P' || frameType == 'I') {
         if (frameValid) {
-            datapointsAddFrame(points, frame[FLIGHT_LOG_FIELD_INDEX_TIME], frame);
+            datapointsAddFrame(points, (uint32_t) frame[FLIGHT_LOG_FIELD_INDEX_TIME], frame);
         } else {
             datapointsAddGap(points);
         }
diff --git a/visual-studio/blackbox_decode/blackbox_decode.vcxproj b/visual-studio/blackbox_decode/blackbox_decode.vcxproj
index 0986fde..b4e4bc5 100644
--- a/visual-studio/blackbox_decode/blackbox_decode.vcxproj
+++ b/visual-studio/blackbox_decode/blackbox_decode.vcxproj
@@ -61,6 +61,7 @@
     <ClCompile Include="..\..\src\imu.c" />
     <ClCompile Include="..\..\src\parser.c" />
     <ClCompile Include="..\..\src\platform.c" />
+    <ClCompile Include="..\..\src\stats.c" />
     <ClCompile Include="..\..\src\stream.c" />
     <ClCompile Include="..\..\src\tools.c" />
     <ClCompile Include="..\..\src\units.c" />
diff --git a/visual-studio/blackbox_decode/blackbox_decode.vcxproj.filters b/visual-studio/blackbox_decode/blackbox_decode.vcxproj.filters
index ad46cee..f0b3c7a 100644
--- a/visual-studio/blackbox_decode/blackbox_decode.vcxproj.filters
+++ b/visual-studio/blackbox_decode/blackbox_decode.vcxproj.filters
@@ -51,6 +51,9 @@
     <ClCompile Include="..\..\src\blackbox_fielddefs.c">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="..\..\src\stats.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\src\parser.h">