mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-08-19 01:14:43 -05:00
chore: add more debug logs
This commit is contained in:
@@ -8,7 +8,7 @@ use crate::{config::Config, socket};
|
||||
use anyhow::Context;
|
||||
use lact_schema::{Pong, Request, Response, SystemInfo};
|
||||
use serde::Serialize;
|
||||
use std::{fs, process::Command};
|
||||
use std::{fmt::Debug, fs, process::Command};
|
||||
use tokio::{
|
||||
io::{AsyncBufReadExt, AsyncWriteExt, BufReader},
|
||||
net::{UnixListener, UnixStream},
|
||||
@@ -98,7 +98,8 @@ async fn handle_request<'a>(request: Request<'a>, handler: &'a Handler) -> anyho
|
||||
}
|
||||
}
|
||||
|
||||
fn ok_response<T: Serialize>(data: T) -> anyhow::Result<Vec<u8>> {
|
||||
fn ok_response<T: Serialize + Debug>(data: T) -> anyhow::Result<Vec<u8>> {
|
||||
debug!("responding with {data:?}");
|
||||
Ok(serde_json::to_vec(&Response::Ok(data))?)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ use glib::clone;
|
||||
use gtk::prelude::*;
|
||||
use gtk::*;
|
||||
use lact_client::schema::{ClocksTable, ClocksTableGen};
|
||||
use tracing::debug;
|
||||
|
||||
const VOLTAGE_OFFSET_RANGE: f64 = 250.0;
|
||||
const WARNING_TEXT: &str = "Warning: changing these values may lead to system instability and potentially damage your hardware!";
|
||||
@@ -67,6 +68,8 @@ impl ClocksFrame {
|
||||
}
|
||||
|
||||
pub fn set_table(&self, table: ClocksTableGen) -> anyhow::Result<()> {
|
||||
debug!("using clocks table {table:?}");
|
||||
|
||||
// The upper value "0.0" is used to hide the adjustment when info is not available
|
||||
if let Some((current_sclk_max, sclk_min, sclk_max)) =
|
||||
extract_value_and_range(&table, |table| {
|
||||
|
||||
Reference in New Issue
Block a user