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

[Examples]: Seeder Example #292

Merged
merged 10 commits into from
Feb 12, 2024
Merged

[Examples]: Seeder Example #292

merged 10 commits into from
Feb 12, 2024

Conversation

ad3154
Copy link
Member

@ad3154 ad3154 commented Jul 23, 2023

What's New:

  • Added an advanced example that makes use of many protocols including TC, VT, Diagnostic protocol, and the whole transport layer of course.
  • This example simulates a rudimentary planter/seeder.

This is certainly not meant to be the 100% best way to lay out an application using the stack, but hopefully it has some interesting use of the various components and one way a user might choose to organize their app.

It's also probably not 100% bug free due to its size, but I wanted to open the PR to get it out there and into people's hands.

Features

  • More complex VT/UT object pool interactions
    • Automatic unit switching and scaling
    • Useful alarm masks
    • Lots of buttons, object pointers, creative use of transparency, etc
  • TC integration with VT's displayed statuses
    • Examples of button presses changing task controller values
    • Auto/Manual mode reporting to TC
  • Automatic handling of multiple speed sources
    • Working speedometer
    • Alarm when no speeds are detected
  • Displays fun information that the stack provides, such as CAN bus load in the object pool
  • Demonstrates a simple way to handle filtering updates to only currently shown VT objects
  • Demonstrates how our ProcessingFlags can be used to manage VT object updates
  • Fixes a little undefined behavior in IOP file hashing.

Screenshots

image

image

image

image

@ad3154 ad3154 added the enhancement New feature or request label Jul 23, 2023
@ad3154 ad3154 self-assigned this Jul 23, 2023
@ad3154 ad3154 temporarily deployed to Integrate Pull Request July 23, 2023 00:53 — with GitHub Actions Inactive
@ad3154 ad3154 requested a review from GwnDaan July 23, 2023 01:02
@ad3154 ad3154 linked an issue Jul 23, 2023 that may be closed by this pull request
Copy link
Member

@GwnDaan GwnDaan left a comment

Choose a reason for hiding this comment

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

This example is dope! Good job! I will try to test out later this week, for now a few comments I had while scanning over the code. Also Sonar seems to have a few recommendations here and there, might be worth looking into :)

examples/seeder_example/vt_application.cpp Outdated Show resolved Hide resolved
examples/seeder_example/vt_application.cpp Outdated Show resolved Hide resolved
examples/seeder_example/vt_application.hpp Outdated Show resolved Hide resolved
examples/seeder_example/vt_application.cpp Outdated Show resolved Hide resolved
@ad3154
Copy link
Member Author

ad3154 commented Jul 24, 2023

This example is dope! Good job! I will try to test out later this week, for now a few comments I had while scanning over the code. Also Sonar seems to have a few recommendations here and there, might be worth looking into :)

One thing I have learned is that sonar really hates the #defines in the object pool generated code 😅I'll take a closer look at its other comments.

@GwnDaan
Copy link
Member

GwnDaan commented Jul 25, 2023

This example is dope! Good job! I will try to test out later this week, for now a few comments I had while scanning over the code. Also Sonar seems to have a few recommendations here and there, might be worth looking into :)

One thing I have learned is that sonar really hates the #defines in the object pool generated code 😅I'll take a closer look at its other comments.

Hahah I saw, maybe we can add all the object pool generated files to the ignored list somehow?

@ad3154 ad3154 temporarily deployed to Integrate Pull Request July 26, 2023 23:55 — with GitHub Actions Inactive
@ad3154 ad3154 temporarily deployed to Integrate Pull Request July 27, 2023 00:18 — with GitHub Actions Inactive
@ad3154 ad3154 temporarily deployed to Integrate Pull Request July 28, 2023 23:34 — with GitHub Actions Inactive
@sonarcloud
Copy link

sonarcloud bot commented Jul 28, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 37 Code Smells

76.9% 76.9% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@ad3154 ad3154 temporarily deployed to Integrate Pull Request September 2, 2023 00:48 — with GitHub Actions Inactive
@GwnDaan GwnDaan added iso: task controller Related to the ISO-11783:10 standard iso: virtual terminal Related to the ISO-11783:7 standard labels Nov 11, 2023
@GwnDaan GwnDaan force-pushed the advanced-example branch 2 times, most recently from 659f226 to 0530439 Compare December 3, 2023 09:23
Copy link

sonarcloud bot commented Dec 9, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 37 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@GwnDaan
Copy link
Member

GwnDaan commented Jan 7, 2024

Quick update, I bumped into an issue where automatic section control with a (compliant) TC server did not seem to work... I'll have to investigate further

The intent of this example will be to use all the major protocols and provide a more comprehensive example for a real application.
…l code

Started adding the bulk of the main application logic.
Added object pool.
Added section control sim from TC, will adapt it to be more appropriate to a planter/seeder.
Fixed a truncation in IOP hash utility function.
Started adding machine selected speed integration
Started adding TC integration to advanced example.
Removed manual MSS processing to instead use the new speeds interface.
Add instance of diagnostic protocol to advanced example.
ad3154 and others added 6 commits February 12, 2024 16:25
Added multiple speed source selection to seeder example.
Added lots of TC enhancements to the seeder example, now reporting
seed counts instead of random other things and properly reporting some
values that the TC is requesting instead of sending zeros.
Alarm updates, add enable/disable.
Removed a troublesome part of the DDOP based on discussion #307
Copy link

sonarcloud bot commented Feb 12, 2024

@ad3154 ad3154 merged commit ad545ee into main Feb 12, 2024
10 checks passed
@ad3154 ad3154 deleted the advanced-example branch February 12, 2024 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request iso: task controller Related to the ISO-11783:10 standard iso: virtual terminal Related to the ISO-11783:7 standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand VT Client Tutorial
2 participants