Add mechanism to control Shuffleboard recordings and add event markers (#1414)

This commit is contained in:
Sam Carlberg
2018-11-19 02:15:30 -05:00
committed by Peter Johnson
parent 69cb53b51b
commit 45f4472d42
8 changed files with 433 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
#pragma once
namespace frc {
// Maintainer note: this enum is mirrored in WPILibJ and in Shuffleboard
// Modifying the enum or enum strings requires a corresponding change to the
// Java enum and the enum in Shuffleboard
enum ShuffleboardEventImportance { kTrivial, kLow, kNormal, kHigh, kCritical };
inline wpi::StringRef ShuffleboardEventImportanceName(
ShuffleboardEventImportance importance) {
switch (importance) {
case kTrivial:
return "TRIVIAL";
case kLow:
return "LOW";
case kNormal:
return "NORMAL";
case kHigh:
return "HIGH";
case kCritical:
return "CRITICAL";
default:
return "NORMAL";
}
}
} // namespace frc