diff --git a/src/cloudlog.rs b/src/cloudlog.rs index 014f63c..9f681f7 100644 --- a/src/cloudlog.rs +++ b/src/cloudlog.rs @@ -1,5 +1,4 @@ use serde::Serialize; -use serde_json; use reqwest::Client; #[derive(Serialize)] @@ -8,13 +7,10 @@ pub struct RadioData { pub radio: String, pub frequency : String, pub mode: String, + pub power: String, } #[tokio::main] pub async fn upload(url: &str, radio_data: &RadioData) { - let radio_data_json = serde_json::to_string(radio_data).unwrap(); - - let res = Client::new().post(url).json(&radio_data_json).send().await.unwrap(); - - println!("{}", radio_data_json); -} \ No newline at end of file + let _res = Client::new().post(url).json(&radio_data).send().await.unwrap(); +} diff --git a/src/main.rs b/src/main.rs index a7dbe4f..a3e9558 100644 --- a/src/main.rs +++ b/src/main.rs @@ -10,8 +10,9 @@ fn main() { let rd = RadioData { key: settings.cloudlog.key, radio: settings.cloudlog.identifier, - frequency: String::from("2400170000"), + frequency: String::from("14017000"), mode: String::from("CW"), + power: String::from("5"), }; cloudlog::upload(&settings.cloudlog.url, &rd);