Skip to content

Commit

Permalink
Update Loggable.h
Browse files Browse the repository at this point in the history
  • Loading branch information
VyaasBaskar authored Jan 27, 2025
1 parent c25c5ad commit 028d893
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/frc846/include/frc846/base/Loggable.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class Loggable {
// Returns the value of the preference for a double.
double GetPreferenceValue_double(std::string key);

// Returns the value of the preference for a boolean.
// Returns the value of the preference for a boolean.
bool GetPreferenceValue_bool(std::string key);

// Returns the value of the preference for an integer.
Expand All @@ -110,9 +110,9 @@ class Loggable {
template <typename U> void SetPreferenceValue(std::string key, U value) {
static_assert(units::traits::is_unit_t<U>(), "must be a unit type");

std::string fullkey = fmt::format(
std::string modkey = fmt::format(
"{} ({})", key, units::abbreviation(units::make_unit<U>(0)));
SetPreferenceValue(fullkey, value.template to<double>());
SetPreferenceValue(modkey, value.template to<double>());
}

// Sets but does NOT initialize the value of the preference for a double.
Expand Down Expand Up @@ -149,4 +149,4 @@ class Loggable {
frc846::base::FunkyLogger logger;
};

} // namespace frc846::base
} // namespace frc846::base

0 comments on commit 028d893

Please sign in to comment.