-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sns susptemp #143
base: master
Are you sure you want to change the base?
Sns susptemp #143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
namespace hyped::sensors { | ||
|
||
Temperature::Temperature(const uint8_t pin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AmbientTemperature
ambient_temperature.hpp
|
||
namespace hyped::sensors { | ||
|
||
Temperature_susp::Temperature_susp(const uint8_t pin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BrakeAndSuspenionTemperature for class?
brake_and_suspension_temperature.cpp for file?
Open to ideas on this, but the current naming isn't ideal
@@ -132,6 +132,19 @@ void Main::checkTemperature() | |||
} | |||
} | |||
|
|||
void Main::checkSuspensionTemperature() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ITemperature_susp isn't defined anywhere + define the interface within the header instead of interface.hpp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also same naming comment from the other file applies here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Brakes and Suspension Temperature"
|
||
Temperature::Temperature(const uint8_t pin) | ||
: pin_(pin), | ||
log_("TEMPERATURE", utils::System::getSystem().config_.log_level_sensors) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Ambient Temperature"
/** | ||
* @brief int from data structs | ||
*/ | ||
data::Temperature_suspData temperature_susp_data_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably just keep data::TemperatureData and even then you'd need to define it within data
@@ -132,6 +132,19 @@ void Main::checkTemperature() | |||
} | |||
} | |||
|
|||
void Main::checkSuspensionTemperature() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.