more lines
This commit is contained in:
@@ -122,6 +122,21 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
let sin_tlm_handle = tlm.register("simple_producer/sin".into(), TelemetryDataType::Float32).await?;
|
||||
let cos_tlm_handle = tlm.register("simple_producer/cos".into(), TelemetryDataType::Float64).await?;
|
||||
|
||||
let sin2_tlm_handle = tlm.register("simple_producer/sin2".into(), TelemetryDataType::Float32).await?;
|
||||
let cos2_tlm_handle = tlm.register("simple_producer/cos2".into(), TelemetryDataType::Float64).await?;
|
||||
|
||||
let sin3_tlm_handle = tlm.register("simple_producer/sin3".into(), TelemetryDataType::Float32).await?;
|
||||
let cos3_tlm_handle = tlm.register("simple_producer/cos3".into(), TelemetryDataType::Float64).await?;
|
||||
|
||||
let sin4_tlm_handle = tlm.register("simple_producer/sin4".into(), TelemetryDataType::Float32).await?;
|
||||
let cos4_tlm_handle = tlm.register("simple_producer/cos4".into(), TelemetryDataType::Float64).await?;
|
||||
|
||||
let sin5_tlm_handle = tlm.register("simple_producer/sin5".into(), TelemetryDataType::Float32).await?;
|
||||
let cos5_tlm_handle = tlm.register("simple_producer/cos5".into(), TelemetryDataType::Float64).await?;
|
||||
|
||||
let sin6_tlm_handle = tlm.register("simple_producer/sin6".into(), TelemetryDataType::Float32).await?;
|
||||
let cos6_tlm_handle = tlm.register("simple_producer/cos6".into(), TelemetryDataType::Float64).await?;
|
||||
|
||||
let cancellation_token = CancellationToken::new();
|
||||
{
|
||||
let cancellation_token = cancellation_token.clone();
|
||||
@@ -149,6 +164,66 @@ async fn main() -> Result<(), Box<dyn Error>> {
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
sin2_tlm_handle.publish(
|
||||
Value::Float32(
|
||||
(f32::TAU() * (index as f32) / (500.0_f32)).sin()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
cos2_tlm_handle.publish(
|
||||
Value::Float64(
|
||||
(f64::TAU() * (index as f64) / (500.0_f64)).cos()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
sin3_tlm_handle.publish(
|
||||
Value::Float32(
|
||||
(f32::TAU() * (index as f32) / (333.0_f32)).sin()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
cos3_tlm_handle.publish(
|
||||
Value::Float64(
|
||||
(f64::TAU() * (index as f64) / (333.0_f64)).cos()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
sin4_tlm_handle.publish(
|
||||
Value::Float32(
|
||||
(f32::TAU() * (index as f32) / (250.0_f32)).sin()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
cos4_tlm_handle.publish(
|
||||
Value::Float64(
|
||||
(f64::TAU() * (index as f64) / (250.0_f64)).cos()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
sin5_tlm_handle.publish(
|
||||
Value::Float32(
|
||||
(f32::TAU() * (index as f32) / (200.0_f32)).sin()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
cos5_tlm_handle.publish(
|
||||
Value::Float64(
|
||||
(f64::TAU() * (index as f64) / (200.0_f64)).cos()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
sin6_tlm_handle.publish(
|
||||
Value::Float32(
|
||||
(f32::TAU() * (index as f32) / (166.0_f32)).sin()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
cos6_tlm_handle.publish(
|
||||
Value::Float64(
|
||||
(f64::TAU() * (index as f64) / (166.0_f64)).cos()
|
||||
),
|
||||
chrono::Utc::now(),
|
||||
).await?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user