Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New demo for dog mode props and cmds #18

Merged
merged 34 commits into from
Feb 17, 2023

Conversation

ashbeitz
Copy link
Contributor

@ashbeitz ashbeitz commented Feb 3, 2023

No description provided.

samples/mixed/consumer/src/main.rs Outdated Show resolved Hide resolved
samples/mixed/provider/src/vehicle.rs Outdated Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
samples/mixed/consumer/Cargo.toml Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
samples/mixed/consumer/src/consumer_impl.rs Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
samples/command/provider/src/provider_impl.rs Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
samples/mixed/provider/src/vehicle.rs Show resolved Hide resolved
samples/mixed/consumer/src/consumer_impl.rs Show resolved Hide resolved
samples/mixed/consumer/src/consumer_impl.rs Outdated Show resolved Hide resolved
samples/mixed/consumer/src/consumer_impl.rs Show resolved Hide resolved
samples/mixed/consumer/src/main.rs Outdated Show resolved Hide resolved
samples/mixed/consumer/src/main.rs Show resolved Hide resolved

server_future.await?;

info!("The Consumer has conmpleted.");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo in completed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

samples/mixed/consumer/src/main.rs Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
tokio::spawn(async move {
let mut response_payload: String = format!("Successfully invoked {entity_id}");

if entity_id == ACTIVATE_AIR_CONDITIOING {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has a compile time error, as match does not work with string slices.

Also, this is a personal preference thing. I'm leaving it as is.


// Update the A/C's use of the battery.
if self.is_air_conditioning_active && self.hybrid_battery_remaining > 0.0 {
self.hybrid_battery_remaining -= 0.10;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe not deal with floats at all? why not used fixed-point values with 2 digits after the decimal point?
floats are unpredictable on different architectures

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Fixed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how is this fixed? it is still a float.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, was looking at the outdated file. Apologies for the confusion. Ignore my previous comment.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

Alex Recommends Report

Alex recommends the following language changes, but Alex is a regular expression based algorithm, so take them with a grain of salt.

✨ 🚀 ✨ Nothing to Report ✨ 🚀 ✨

samples/mixed/dtdl/content/mixed.json Outdated Show resolved Hide resolved
samples/mixed/dtdl/content/mixed.json Outdated Show resolved Hide resolved
dtdl-parser/src/model_parser.rs Show resolved Hide resolved
samples/mixed/consumer/src/main.rs Show resolved Hide resolved
samples/mixed/provider/src/provider_impl.rs Outdated Show resolved Hide resolved
@sealemar
Copy link

Some comments from previous iteration(s) have not been responded to.

samples/property/consumer/src/main.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@ashbeitz ashbeitz merged commit d3c72ac into main Feb 17, 2023
@ashbeitz ashbeitz deleted the ashbeitz/newDemoForDogModePropsAndCmds branch February 17, 2023 23:27
mobicatk pushed a commit to Mobica/EclipseSDV_ibeji that referenced this pull request Apr 24, 2024
…moForDogModePropsAndCmds

New demo for dog mode props and cmds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants