This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from NathanaelGandhi/ng/rename
fix: rename package to linux_thermal_zone_base
- Loading branch information
Showing
7 changed files
with
69 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# thermal_zone_publisher | ||
[](https://results.pre-commit.ci/latest/github/NathanaelGandhi/thermal_zone/main) | ||
[](https://github.com/NathanaelGandhi/thermal_zone/actions/workflows/release-drafter.yml) | ||
[](https://github.com/NathanaelGandhi/thermal_zone/actions/workflows/mirror-release-to-humble.yaml) | ||
# linux_thermal_zone_base | ||
[](https://results.pre-commit.ci/latest/github/NathanaelGandhi/linux_thermal_zone_base/main) | ||
[](https://github.com/NathanaelGandhi/linux_thermal_zone_base/actions/workflows/release-drafter.yml) | ||
[](https://github.com/NathanaelGandhi/linux_thermal_zone_base/actions/workflows/mirror-release-to-humble.yaml) | ||
|
||
ROS2 node for thermal zone(s) found on linux systems at ```/sys/class/thermal/thermal_zone*``` | ||
|
||
## Interfaces | ||
See [thermal_zone_interfaces](https://github.com/NathanaelGandhi/thermal_zone_interfaces) package | ||
See [linux_thermal_zone_interfaces](https://github.com/NathanaelGandhi/linux_thermal_zone_interfaces) package |
32 changes: 32 additions & 0 deletions
32
include/linux_thermal_zone_base/linux_thermal_zone_base_node.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
#include <rclcpp/rclcpp.hpp> | ||
#include <string> | ||
|
||
#include "linux_thermal_zone_interfaces/msg/linux_thermal_zone.hpp" | ||
#include "linux_thermal_zone_interfaces/msg/linux_thermal_zone_base_node_hk.hpp" | ||
|
||
class LinuxThermalZoneBaseNode : public rclcpp::Node | ||
{ | ||
public: | ||
explicit LinuxThermalZoneBaseNode(const std::string & node_name); | ||
~LinuxThermalZoneBaseNode(); | ||
|
||
protected: | ||
private: | ||
size_t thermal_pub_count_; | ||
rclcpp::TimerBase::SharedPtr timer_1s_; | ||
rclcpp::TimerBase::SharedPtr timer_10s_; | ||
rclcpp::Publisher<linux_thermal_zone_interfaces::msg::LinuxThermalZone>::SharedPtr | ||
publisher_thermal_; | ||
rclcpp::Publisher<linux_thermal_zone_interfaces::msg::LinuxThermalZoneBaseNodeHk>::SharedPtr | ||
publisher_node_hk_; | ||
|
||
void timer_1s_callback(void); | ||
void timer_10s_callback(void); | ||
std::vector<linux_thermal_zone_interfaces::msg::LinuxThermalZone> GetZoneMsgVector(void); | ||
linux_thermal_zone_interfaces::msg::LinuxThermalZone GetZoneMsg( | ||
std::string key, uint8_t zone_index); | ||
double GetZoneTemperature(std::string prefix); | ||
uint8_t CountMatchingDirectories(const std::string & pattern); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>thermal_zone</name> | ||
<name>linux_thermal_zone_base</name> | ||
<version>0.0.0</version> | ||
<description>ROS2 node for thermal zone(s) found on linux systems</description> | ||
<description>ROS2 base for Linux Thermal Zone(s)</description> | ||
<maintainer email="[email protected]">Nathanael Gandhi</maintainer> | ||
<license>MIT</license> | ||
|
||
<depend>rclcpp</depend> | ||
<depend>thermal_zone_interfaces</depend> | ||
<depend>linux_thermal_zone_interfaces</depend> | ||
|
||
<buildtool_depend>ament_cmake</buildtool_depend> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters