Refactors source file naming convention
Updates source file names to adhere to a consistent lowercase convention, improving code maintainability and readability. This change ensures consistency across the codebase and aligns with common coding standards.
This commit is contained in:
parent
b9bfe8df68
commit
f7818c63ec
11 changed files with 27 additions and 27 deletions
|
|
@ -24,20 +24,20 @@ set(CMAKE_CXX_STANDARD 20)
|
||||||
# Define the executable and its source files
|
# Define the executable and its source files
|
||||||
add_executable(dixon
|
add_executable(dixon
|
||||||
main.cpp
|
main.cpp
|
||||||
DixonNodeState.cpp
|
dixon_node_state.cpp
|
||||||
DixonNodeState.h
|
dixon_node_state.h
|
||||||
DixonBrain.cpp
|
dixon_brain.cpp
|
||||||
DixonBrain.h
|
dixon_brain.h
|
||||||
CardioCenter/Heart.cpp
|
CardioCenter/heart.cpp
|
||||||
CardioCenter/Heart.h
|
CardioCenter/heart.h
|
||||||
Logging/DixonLogger.h)
|
logging/dixon_logger.h)
|
||||||
|
|
||||||
# Create the Dependency
|
# Create the Dependency
|
||||||
# This tells CMake: "Before you build Dixon, you MUST run BumpVersion."
|
# This tells CMake: "Before you build Dixon, you MUST run BumpVersion."
|
||||||
add_dependencies(dixon BumpVersion)
|
add_dependencies(dixon BumpVersion)
|
||||||
|
|
||||||
# Generate the header from the template
|
# Generate the header from the template
|
||||||
configure_file(Version.h.in "${CMAKE_CURRENT_BINARY_DIR}/Version.h")
|
configure_file(version.h.in "${CMAKE_CURRENT_BINARY_DIR}/Version.h")
|
||||||
|
|
||||||
# Consolidated Include Paths
|
# Consolidated Include Paths
|
||||||
target_include_directories(dixon PRIVATE
|
target_include_directories(dixon PRIVATE
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "Heart.h"
|
#include "heart.h"
|
||||||
#include <gpiod.hpp>
|
#include <gpiod.hpp>
|
||||||
|
|
||||||
#include "../DixonNodeState.h"
|
#include "../dixon_node_state.h"
|
||||||
|
|
||||||
namespace cardio
|
namespace cardio
|
||||||
{
|
{
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "../Logging/DixonLogger.h"
|
#include "../logging/dixon_logger.h"
|
||||||
#include <gpiod.hpp>
|
#include <gpiod.hpp>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
|
|
@ -22,6 +22,6 @@ namespace cardio
|
||||||
gpiod::chip chip_;
|
gpiod::chip chip_;
|
||||||
bool isOn_;
|
bool isOn_;
|
||||||
gpiod::line_request request_;
|
gpiod::line_request request_;
|
||||||
Dixon::DixonLogger logger_;
|
dixon::DixonLogger logger_;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#include "DixonBrain.h"
|
#include "dixon_brain.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include "Logging/DixonLogger.h"
|
#include "logging/dixon_logger.h"
|
||||||
|
|
||||||
DixonBrain::DixonBrain()
|
DixonBrain::DixonBrain()
|
||||||
: heart_(),
|
: heart_(),
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include "DixonNodeState.h"
|
#include "dixon_node_state.h"
|
||||||
#include "CardioCenter/Heart.h"
|
#include "CardioCenter/heart.h"
|
||||||
#include "Logging/DixonLogger.h"
|
#include "logging/dixon_logger.h"
|
||||||
|
|
||||||
class DixonBrain
|
class DixonBrain
|
||||||
{
|
{
|
||||||
|
|
@ -20,5 +20,5 @@ private:
|
||||||
cardio::Heart heart_;
|
cardio::Heart heart_;
|
||||||
DixonNodeState& state_;
|
DixonNodeState& state_;
|
||||||
std::thread loopThread_;
|
std::thread loopThread_;
|
||||||
Dixon::DixonLogger logger_;
|
dixon::DixonLogger logger_;
|
||||||
};
|
};
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include "DixonNodeState.h"
|
#include "dixon_node_state.h"
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include<atomic>
|
#include<atomic>
|
||||||
#include "Logging/DixonLogger.h"
|
#include "logging/dixon_logger.h"
|
||||||
|
|
||||||
|
|
||||||
enum class NodeStatus : int {
|
enum class NodeStatus : int {
|
||||||
|
|
@ -31,7 +31,7 @@ private:
|
||||||
DixonNodeState() : logger_("DixonNodeState"){}
|
DixonNodeState() : logger_("DixonNodeState"){}
|
||||||
~DixonNodeState() = default;
|
~DixonNodeState() = default;
|
||||||
|
|
||||||
Dixon::DixonLogger logger_;
|
dixon::DixonLogger logger_;
|
||||||
|
|
||||||
std::atomic<bool> connected_ = false;
|
std::atomic<bool> connected_ = false;
|
||||||
std::atomic<NodeStatus> node_status_ = NodeStatus::Stopped;
|
std::atomic<NodeStatus> node_status_ = NodeStatus::Stopped;
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
namespace Dixon {
|
namespace dixon {
|
||||||
class DixonLogger {
|
class DixonLogger {
|
||||||
private:
|
private:
|
||||||
std::string_view m_name;
|
std::string_view m_name;
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "DixonBrain.h"
|
#include "dixon_brain.h"
|
||||||
#include "Version.h" // The generated header
|
#include "Version.h" // The generated header
|
||||||
#include "Logging/DixonLogger.h"
|
#include "logging/dixon_logger.h"
|
||||||
|
|
||||||
|
|
||||||
void signal_thread_func(sigset_t set) {
|
void signal_thread_func(sigset_t set) {
|
||||||
int sig;
|
int sig;
|
||||||
Dixon::DixonLogger logger("signal_thread_func");
|
dixon::DixonLogger logger("signal_thread_func");
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
// This blocks until a signal actually happens
|
// This blocks until a signal actually happens
|
||||||
|
|
@ -43,7 +43,7 @@ sigset_t prepare_signal_set()
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
Dixon::DixonLogger logger("main");
|
dixon::DixonLogger logger("main");
|
||||||
|
|
||||||
// The "Splash Screen"
|
// The "Splash Screen"
|
||||||
logger.info("Dixon core is starting. Version: {}", DIXON_VERSION);
|
logger.info("Dixon core is starting. Version: {}", DIXON_VERSION);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
1.0.57
|
1.0.58
|
||||||
Loading…
Reference in a new issue