Skip to content

Commit

Permalink
Improved seat massager sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ashbeitz committed Mar 1, 2024
1 parent 86cd19f commit c7d2f9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
5 changes: 0 additions & 5 deletions digital-twin-model/dtdl/dtmi/sdv/airbag_seat_massager-1.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@
{
"@id": "dtmi:sdv:massage_step;1",
"@type": "Array",
"elementSchema": "dtmi:sdv:airbag_adjustments;1"
},
{
"@id": "dtmi:sdv:airbag_adjustments;1",
"@type": "Array",
"elementSchema": "dtmi:sdv:airbag_adjustment;1"
},
{
Expand Down
11 changes: 1 addition & 10 deletions digital-twin-model/src/sdv_v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,23 +134,14 @@ pub mod airbag_seat_massager {
pub duration_in_seconds: i32,
}
}
pub mod airbag_adjustments {
pub const ID: &str = "dtmi:sdv:airbag_seat_massager:airbag_adjustments;1";
pub fn id() -> String {
ID.to_string()
}
pub const NAME: &str = "airbag_adjustments";
pub const DESCRIPTION: &str = "The airbag adjustments.";
pub type TYPE = Vec<crate::sdv_v2::airbag_seat_massager::airbag_adjustment::TYPE>;
}
pub mod massage_step {
pub const ID: &str = "dtmi:sdv:airbag_seat_massager:massage_step;1";
pub fn id() -> String {
ID.to_string()
}
pub const NAME: &str = "massage_step";
pub const DESCRIPTION: &str = "The massage step.";
pub type TYPE = Vec<crate::sdv_v2::airbag_seat_massager::airbag_adjustments::TYPE>;
pub type TYPE = Vec<crate::sdv_v2::airbag_seat_massager::airbag_adjustment::TYPE>;
}
pub mod status {
pub const ID: &str = "dtmi:sdv:airbag_seat_massager:status;1";
Expand Down
4 changes: 2 additions & 2 deletions samples/seat_massager/consumer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ fn start_seat_massage_steps(

let request_payload: sdv::airbag_seat_massager::perform_step::request::TYPE =
sdv::airbag_seat_massager::perform_step::request::TYPE {
step: vec![vec![sdv::airbag_seat_massager::airbag_adjustment::TYPE {
step: vec![sdv::airbag_seat_massager::airbag_adjustment::TYPE {
airbag_identifier,
inflation_level,
duration_in_seconds,
}]],
}],
..Default::default()
};

Expand Down

0 comments on commit c7d2f9e

Please sign in to comment.