[glass] Fix plots (#2943)

This commit is contained in:
Peter Johnson
2020-12-17 07:27:29 -08:00
committed by GitHub
parent 1ba0a2cedd
commit 98dfc26208
6 changed files with 34 additions and 40 deletions

View File

@@ -15,6 +15,7 @@
#include <imgui_internal.h>
#include <imgui_stdlib.h>
#include <wpi/StringRef.h>
#include <wpi/timestamp.h>
#include <wpigui.h>
#include "glass/ContextInternal.h"
@@ -211,6 +212,10 @@ Context* glass::GetCurrentContext() { return gContext; }
void glass::SetCurrentContext(Context* ctx) { gContext = ctx; }
void glass::ResetTime() { gContext->zeroTime = wpi::Now(); }
uint64_t glass::GetZeroTime() { return gContext->zeroTime; }
Storage::Value& Storage::GetValue(wpi::StringRef key) {
auto it = std::find(m_keys.begin(), m_keys.end(), key);
if (it == m_keys.end()) {