Skip to content

Commit

Permalink
add 8812eu_temperature
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle committed Dec 1, 2024
1 parent d2be63f commit 2da1b76
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/telemetry/models/aohdsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ void AOHDSystem::process_onboard_computer_status(const mavlink_onboard_computer_
{
set_curr_cpuload_perc(msg.cpu_cores[0]);
set_curr_soc_temp_degree(msg.temperature_core[0]);
set_curr_txc_temp_degree(msg.temperature_core[1]);
// temporary, we repurpose this value
set_curr_cpu_freq_mhz(msg.storage_type[0]);
set_curr_isp_freq_mhz(msg.storage_type[1]);
Expand Down
1 change: 1 addition & 0 deletions app/telemetry/models/aohdsystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class AOHDSystem : public QObject
// based on RPI SOC
L_RO_PROP(int,curr_cpuload_perc,set_curr_cpuload_perc,0)
L_RO_PROP(int,curr_soc_temp_degree,set_curr_soc_temp_degree,0)
L_RO_PROP(int,curr_txc_temp_degree,set_curr_txc_temp_degree,0)
L_RO_PROP(int,curr_cpu_freq_mhz,set_curr_cpu_freq_mhz,0)
L_RO_PROP(int,curr_isp_freq_mhz,set_curr_isp_freq_mhz,0)
L_RO_PROP(int,curr_h264_freq_mhz,set_curr_h264_freq_mhz,0)
Expand Down
8 changes: 6 additions & 2 deletions app/telemetry/settings/documentedparam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,18 @@ static std::vector<std::shared_ptr<XParam>> get_parameters_list(){
{"DISABLE",""},
{"DEFAULT","DEFAULT"},
{"/dev/serial0","/dev/serial0"},
{"/dev/ttyAMA1","/dev/ttyAMA1"},
{"/dev/ttyAMA2","/dev/ttyAMA2"},
{"/dev/ttyAMA3","/dev/ttyAMA3"},
{"/dev/ttyAMA4","//dev/ttyAMA4"},
{"/dev/serial1","/dev/serial1"},
{"/dev/ttyS1","/dev/ttyS1"},
{"/dev/ttyS2","/dev/ttyS2"},
{"/dev/ttyUSB0","/dev/ttyUSB0"},
{"/dev/ttyUSB1","/dev/ttyUSB1"},
{"/dev/ttyACM0","/dev/ttyACM0"},
{"/dev/ttyACM1","/dev/ttyACM1"},
{"/dev/ttyS7","/dev/ttyS7"},
{"/dev/ttyAMA4","//dev/ttyAMA4"}
{"/dev/ttyS7","/dev/ttyS7"}
};
append_string(ret,"FC_UART_CONN",ImprovedStringSetting{fc_uart_conn_values},
"Telemetry FC<->Air unit. Make sure FC_UART_BAUD matches your FC. DEFAULT - primary telemetry serial of this platform (see wiki)."
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/elements/AppSettings.qml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Settings {
property double esc_temp_warn: 75
property double esc_temp_caution: 60

property bool show_battery_temp: true
property bool show_battery_temp: false
property bool battery_temp_declutter: false
//samsung 35e has -10 to 60 temp range
property double battery_temp_warn: 60
Expand Down
2 changes: 1 addition & 1 deletion qml/ui/widgets/SOCStatusWidgetAir.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import OpenHD 1.0

SOCStatusWidgetGeneric {
id: airStatusWidget
width: 112
width: 150
height: 24

visible: settings.show_air_status && settings.show_widgets
Expand Down
29 changes: 27 additions & 2 deletions qml/ui/widgets/SOCStatusWidgetGeneric.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import OpenHD 1.0

BaseWidget {
id: airStatusWidget
width: 112
height: 24

visible: settings.show_air_status && settings.show_widgets
Expand All @@ -27,6 +26,8 @@ BaseWidget {
property int m_soc_temperature_deg_warn: m_is_air ? settings.air_status_temp_warn : settings.ground_status_temp_warn
property int m_soc_temperature_deg_caution: m_is_air ? settings.air_status_temp_caution : settings.ground_status_temp_caution

property int m_txc_temperature_deg: m_is_air ? _ohdSystemAir.curr_txc_temp_degree : _ohdSystemGround.curr_txc_temp_degree

// These do not need warning level(s) and are hidden in the action popup
property int m_curr_cpu_freq_mhz: m_is_air ?_ohdSystemAir.curr_cpu_freq_mhz : _ohdSystemGround.curr_cpu_freq_mhz
property int m_curr_isp_freq_mhz: m_is_air ?_ohdSystemAir.curr_isp_freq_mhz : _ohdSystemGround.curr_isp_freq_mhz
Expand Down Expand Up @@ -499,7 +500,7 @@ BaseWidget {
text: Number(m_soc_temperature_deg).toLocaleString(Qt.locale(),
'f', 0) + "°"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.right: temp_transceiver.left
anchors.rightMargin: 0
verticalAlignment: Text.AlignVCenter
font.pixelSize: 14
Expand All @@ -509,5 +510,29 @@ BaseWidget {
style: Text.Outline
styleColor: settings.color_glow
}

Text {
id: temp_transceiver
x: 0
y: 0
width: 36
height: 30
visible: m_txc_temperature_deg > 0
color: m_txc_temperature_deg <= 80 ? "white" : "red"
opacity: bw_current_opacity
text: Number(m_txc_temperature_deg).toLocaleString(Qt.locale(),
'f', 0) + "°"
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 2
verticalAlignment: Text.AlignVCenter
font.pixelSize: 14
font.family: settings.font_text
horizontalAlignment: Text.AlignRight
elide: Text.ElideRight
style: Text.Outline
styleColor: settings.color_glow
}

}
}
2 changes: 1 addition & 1 deletion qml/ui/widgets/SOCStatusWidgetGround.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import OpenHD 1.0

SOCStatusWidgetGeneric {
id: groundStatusWidget
width: 112
width: 150
height: 24

visible: settings.show_ground_status && settings.show_widgets
Expand Down

0 comments on commit 2da1b76

Please sign in to comment.