Included impedance topic.

This commit is contained in:
2025-08-06 15:45:06 +02:00
parent 4512191795
commit 2d8c6d23fd
2 changed files with 17 additions and 35 deletions

View File

@@ -5,8 +5,8 @@ use postcard_rpc::{
};
use std::convert::Infallible;
use bioz_icd_rs::{
AccelRange, PingEndpoint, GetUniqueIdEndpoint, SetGreenLedEndpoint, StartAccel, StartAccelerationEndpoint,
StopAccelerationEndpoint,
PingEndpoint, GetUniqueIdEndpoint, SetGreenLedEndpoint, StartImpedance, StartImpedanceEndpoint,
StopImpedanceEndpoint,
};
#[derive(Debug)]
@@ -80,22 +80,21 @@ impl WorkbookClient {
Ok(())
}
pub async fn start_accelerometer(
pub async fn start_impedancemeter(
&self,
interval_ms: u32,
range: AccelRange,
) -> Result<(), WorkbookError<Infallible>> {
self.client
.send_resp::<StartAccelerationEndpoint>(&StartAccel { interval_ms, range })
.send_resp::<StartImpedanceEndpoint>(&StartImpedance { interval_ms })
.await?;
Ok(())
}
pub async fn stop_accelerometer(&self) -> Result<bool, WorkbookError<Infallible>> {
pub async fn stop_impedancemeter(&self) -> Result<bool, WorkbookError<Infallible>> {
let res = self
.client
.send_resp::<StopAccelerationEndpoint>(&())
.send_resp::<StopImpedanceEndpoint>(&())
.await?;
Ok(res)