SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
Toggle main menu visibility
Loading...
Searching...
No Matches
thermal.hpp
Go to the documentation of this file.
1
/*
2
* SatNOGS-COMMS MCU software
3
*
4
* Copyright (C) 2025, Libre Space Foundation <http://libre.space>
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*
19
* SPDX-License-Identifier: GNU General Public License v3.0 or later
20
*/
21
22
#pragma once
23
24
#include <
utils/moving_avg.hpp
>
25
#include <zephyr/kernel.h>
26
27
namespace
satnogs::comms
28
{
29
45
class
thermal
46
{
47
public
:
48
static
constexpr
uint32_t
task_wdg_period
= 60000;
49
50
class
state
51
{
52
public
:
53
bool
uhf_triggered
;
55
bool
sband_triggered
;
57
bool
uhf_sensor_valid
;
59
bool
sband_sensor_valid
;
61
bool
pcb_sensor_valid
;
63
64
state
()
65
:
uhf_triggered
(false),
66
sband_triggered
(false),
67
uhf_sensor_valid
(false),
68
sband_sensor_valid
(false),
69
pcb_sensor_valid
(false)
70
{
71
}
72
};
73
74
static
thermal
&
75
get_instance
()
76
{
77
static
thermal instance;
78
return
instance;
79
}
80
81
void
82
start
();
83
84
state
85
get_state
()
const
86
{
87
return
m_state;
88
}
89
90
private
:
91
state m_state;
92
bool
m_uhf_triggered;
93
bool
m_sband_triggered;
94
bool
m_uhf_sensor_valid;
95
bool
m_sband_sensor_valid;
96
bool
m_pcb_sensor_valid;
97
utils::moving_avg<float, float, 3>
m_uhf_temp;
98
utils::moving_avg<float, float, 3>
m_sband_temp;
99
utils::moving_avg<float, float, 3>
m_pcb_temp;
100
k_tid_t m_tid;
101
102
thermal
();
103
104
static
void
105
thermal_thread(
void
*arg1,
void
*arg2,
void
*arg3);
106
};
107
108
}
// namespace satnogs::comms
satnogs::comms::thermal::state::sband_sensor_valid
bool sband_sensor_valid
Definition
thermal.hpp:59
satnogs::comms::thermal::state::sband_triggered
bool sband_triggered
Definition
thermal.hpp:55
satnogs::comms::thermal::state::uhf_triggered
bool uhf_triggered
Definition
thermal.hpp:53
satnogs::comms::thermal::state::uhf_sensor_valid
bool uhf_sensor_valid
Definition
thermal.hpp:57
satnogs::comms::thermal::state::state
state()
Definition
thermal.hpp:64
satnogs::comms::thermal::state::pcb_sensor_valid
bool pcb_sensor_valid
Definition
thermal.hpp:61
satnogs::comms::thermal
Thermal monitoring.
Definition
thermal.hpp:46
satnogs::comms::thermal::start
void start()
Activates and starts the thermal monitoring mechanism.
Definition
thermal.cpp:45
satnogs::comms::thermal::task_wdg_period
static constexpr uint32_t task_wdg_period
Definition
thermal.hpp:48
satnogs::comms::thermal::get_state
state get_state() const
Definition
thermal.hpp:85
satnogs::comms::thermal::get_instance
static thermal & get_instance()
Definition
thermal.hpp:75
satnogs::comms::utils::moving_avg
Definition
moving_avg.hpp:31
moving_avg.hpp
satnogs::comms
Definition
bsp.cpp:28
src
thermal.hpp
Generated by
1.17.0