Sns susptemp - #143
Conversation
|
|
||
| namespace hyped::sensors { | ||
|
|
||
| Temperature::Temperature(const uint8_t pin) |
There was a problem hiding this comment.
AmbientTemperature as class name and ambient_temperature.cpp for file name is probably better
| #include <utils/logger.hpp> | ||
| namespace hyped::sensors { | ||
|
|
||
| class Temperature : public ITemperature { |
There was a problem hiding this comment.
AmbientTemperature
ambient_temperature.hpp
|
|
||
| namespace hyped::sensors { | ||
|
|
||
| Temperature_susp::Temperature_susp(const uint8_t pin) |
There was a problem hiding this comment.
BrakeAndSuspenionTemperature for class?
brake_and_suspension_temperature.cpp for file?
Open to ideas on this, but the current naming isn't ideal
| } | ||
| } | ||
|
|
||
| void Main::checkSuspensionTemperature() |
There was a problem hiding this comment.
You've defined this but you aren't calling it anywhere yet
| #include <utils/logger.hpp> | ||
| namespace hyped::sensors { | ||
|
|
||
| class Temperature_susp : public ITemperature_susp { |
There was a problem hiding this comment.
ITemperature_susp isn't defined anywhere + define the interface within the header instead of interface.hpp
There was a problem hiding this comment.
Also same naming comment from the other file applies here
There was a problem hiding this comment.
I think both types of temperature managers could be using the same interface ITemperature. Then it would make sense to have files temperature.cpp and temperature.hpp that contain the interface and both classes, AmbientTemperature and BrakeAndSuspsenionTemperature.
|
|
||
| Temperature_susp::Temperature_susp(const uint8_t pin) | ||
| : pin_(pin), | ||
| log_("TEMPERATURE", utils::System::getSystem().config_.log_level_sensors) |
There was a problem hiding this comment.
"Brakes and Suspension Temperature"
|
|
||
| Temperature::Temperature(const uint8_t pin) | ||
| : pin_(pin), | ||
| log_("TEMPERATURE", utils::System::getSystem().config_.log_level_sensors) |
| /** | ||
| * @brief int from data structs | ||
| */ | ||
| data::Temperature_suspData temperature_susp_data_; |
There was a problem hiding this comment.
Can probably just keep data::TemperatureData and even then you'd need to define it within data
| } | ||
| } | ||
|
|
||
| void Main::checkSuspensionTemperature() |
There was a problem hiding this comment.
Also needs to be defined in main.hpp
Added Brakes and Suspension temperature sensor code.
Additional calculation added to temperature sensor code based on analogue calculation.
Shut down pod sequence added to main.cpp if we go over 85 degrees Celcius.