Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/SimplePublish.cpp (1 of 27 files). Show all
Unified · Split
| @@ -126,7 +126,8 @@ bool RunPublisher(uint16_t port) · 125 unmodified lines | ||
| 126 | 126 | // send random values every 33 milliseconds |
| 127 | 127 | PublishTimer = NewSharedPtr<Timer>(33, [](Timer*, void*) |
| 128 | 128 | { |
| 129 | − static uint32_t count = MeasurementsToPublish.size(); | |
| 129 | + // If metadata can change, the following integer should not be static: | |
| 130 | + static uint32_t count = ConvertUInt32(MeasurementsToPublish.size()); | |
| 130 | 131 | const int64_t timestamp = ToTicks(UtcNow()); |
| 131 | 132 | vector<MeasurementPtr> measurements; |
| 132 | 133 | |