add boolean type

This commit is contained in:
2025-12-25 12:44:26 -05:00
parent ebbf864af9
commit 8cfaf468e9
12 changed files with 113 additions and 14 deletions

View File

@@ -170,6 +170,9 @@ async fn main() -> Result<(), Box<dyn Error>> {
let cos_tlm_handle = tlm
.register("simple_producer/cos".into(), TelemetryDataType::Float64)
.await?;
let bool_tlm_handle = tlm
.register("simple_producer/bool".into(), TelemetryDataType::Boolean)
.await?;
let sin2_tlm_handle = tlm
.register("simple_producer/sin2".into(), TelemetryDataType::Float32)
@@ -239,6 +242,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
Value::Float64((f64::TAU() * (index as f64) / (1000.0_f64)).cos()),
publish_time,
));
tasks.push(bool_tlm_handle.publish(Value::Boolean(index % 1000 > 500), publish_time));
tasks.push(sin2_tlm_handle.publish(
Value::Float32((f32::TAU() * (index as f32) / (500.0_f32)).sin()),
publish_time,