Add support for to the macro

This commit is contained in:
Mihai Dinculescu
2022-10-19 13:18:26 +01:00
parent a868d09b6e
commit 3a7237addf
13 changed files with 155 additions and 45 deletions

View File

@@ -1,6 +1,7 @@
use simconnect_sdk::{Notification, SimConnect, SimConnectObject};
/// A data structure that will be used to receive data from SimConnect.
/// See the documentation of `SimConnectObject` for more information on the arguments of the `simconnect` attribute.
#[derive(Debug, Clone, SimConnectObject)]
#[simconnect(period = "second")]
#[allow(dead_code)]

View File

@@ -1,6 +1,7 @@
use simconnect_sdk::{Notification, SimConnect, SimConnectObject};
/// A data structure that will be used to receive data from SimConnect.
/// See the documentation of `SimConnectObject` for more information on the arguments of the `simconnect` attribute.
#[derive(Debug, Clone, SimConnectObject)]
#[simconnect(period = "second")]
#[allow(dead_code)]
@@ -14,6 +15,7 @@ struct GpsData {
}
/// A second data structure that will be used to receive data from SimConnect.
/// See the documentation of `SimConnectObject` for more information on the arguments of the `simconnect` attribute.
#[derive(Debug, Clone, SimConnectObject)]
#[simconnect(period = "second", condition = "changed")]
#[allow(dead_code)]

View File

@@ -3,6 +3,7 @@ use tracing::{error, info};
use tracing_subscriber::{fmt, prelude::*, EnvFilter};
/// A data structure that will be used to receive data from SimConnect.
/// See the documentation of `SimConnectObject` for more information on the arguments of the `simconnect` attribute.
#[derive(Debug, Clone, SimConnectObject)]
#[simconnect(period = "second")]
#[allow(dead_code)]