Convert to 64 bit timestamps in dma edge counting.
Change-Id: If6dbb578e7408ca6a8e87ad43d65d593db8d59eb
diff --git a/frc971/wpilib/dma_edge_counting.cc b/frc971/wpilib/dma_edge_counting.cc
index 8487ce9..4cf4440 100644
--- a/frc971/wpilib/dma_edge_counting.cc
+++ b/frc971/wpilib/dma_edge_counting.cc
@@ -36,7 +36,7 @@
}
if (remaining == 0) {
- if (sample_time_ < current_sample.GetTime()) {
+ if (sample_time_ < static_cast<int64_t>(current_sample.GetTime())) {
// If the latest DMA sample happened after we started polling, then
// just use the values from it because they're more recent.
for (auto &c : handlers_) {
diff --git a/frc971/wpilib/dma_edge_counting.h b/frc971/wpilib/dma_edge_counting.h
index c71e7ae..813f59c 100644
--- a/frc971/wpilib/dma_edge_counting.h
+++ b/frc971/wpilib/dma_edge_counting.h
@@ -195,7 +195,7 @@
::std::vector<DMASampleHandlerInterface *> handlers_;
// The time at which we most recently read the sensor values.
- uint32_t sample_time_ = 0;
+ int64_t sample_time_ = 0;
DISALLOW_COPY_AND_ASSIGN(DMASynchronizer);
};