Move mockdata/HAL_Value.h to hal/Value.h

Also prefix the MakeBoolean et al functions with HAL_ to avoid namespace
pollution.
This commit is contained in:
Peter Johnson
2019-09-23 23:28:49 -07:00
parent 1b266717a8
commit e8d6f8a2c1
37 changed files with 185 additions and 179 deletions

View File

@@ -1,5 +1,5 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */
/* Copyright (c) 2017-2019 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. */
@@ -23,16 +23,20 @@ class AnalogInData {
HAL_SIMDATAVALUE_DEFINE_NAME(AccumulatorDeadband)
public:
SimDataValue<HAL_Bool, MakeBoolean, GetInitializedName> initialized{false};
SimDataValue<int32_t, MakeInt, GetAverageBitsName> averageBits{7};
SimDataValue<int32_t, MakeInt, GetOversampleBitsName> oversampleBits{0};
SimDataValue<double, MakeDouble, GetVoltageName> voltage{0.0};
SimDataValue<HAL_Bool, MakeBoolean, GetAccumulatorInitializedName>
SimDataValue<HAL_Bool, HAL_MakeBoolean, GetInitializedName> initialized{
false};
SimDataValue<int32_t, HAL_MakeInt, GetAverageBitsName> averageBits{7};
SimDataValue<int32_t, HAL_MakeInt, GetOversampleBitsName> oversampleBits{0};
SimDataValue<double, HAL_MakeDouble, GetVoltageName> voltage{0.0};
SimDataValue<HAL_Bool, HAL_MakeBoolean, GetAccumulatorInitializedName>
accumulatorInitialized{false};
SimDataValue<int64_t, MakeLong, GetAccumulatorValueName> accumulatorValue{0};
SimDataValue<int64_t, MakeLong, GetAccumulatorCountName> accumulatorCount{0};
SimDataValue<int32_t, MakeInt, GetAccumulatorCenterName> accumulatorCenter{0};
SimDataValue<int32_t, MakeInt, GetAccumulatorDeadbandName>
SimDataValue<int64_t, HAL_MakeLong, GetAccumulatorValueName> accumulatorValue{
0};
SimDataValue<int64_t, HAL_MakeLong, GetAccumulatorCountName> accumulatorCount{
0};
SimDataValue<int32_t, HAL_MakeInt, GetAccumulatorCenterName>
accumulatorCenter{0};
SimDataValue<int32_t, HAL_MakeInt, GetAccumulatorDeadbandName>
accumulatorDeadband{0};
virtual void ResetData();