diff --git a/src/shared/sensors/SensorData.h b/src/shared/sensors/SensorData.h index 28c752cdec01263b489cb312791131f174f630d4..6f3daac7044b102851af358b8d9ef187481e2910 100644 --- a/src/shared/sensors/SensorData.h +++ b/src/shared/sensors/SensorData.h @@ -332,4 +332,20 @@ struct CurrentData } }; +/** + * @brief Structure to handle voltage data. + */ +struct VoltageData +{ + uint64_t voltageTimestamp = 0; + float voltage = 0; + + static std::string header() { return "timestamp,voltage\n"; } + + void print(std::ostream& os) const + { + os << voltageTimestamp << "," << voltage << "\n"; + } +}; + } // namespace Boardcore