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

[Ski Lift Example] Feature: Control when to open/close the gate and when to move/stop the lift. #123

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Max851010
Copy link
Contributor

Feature: Control when to open/close the gate and when to move/stop the lift.

demovideo2.mov

Lift.lf

  1. Lift Motion: The lift will keep moving until there's urgent event happens (ex. someone fail to get on the lift).
  2. Gate Control:
    • The chairlift cycle takes 10 seconds from ready to takeoff. The process is as follows:
      • 1s ~ 3s: Entry gates are open for passengers to enter.
      • 4s ~ 7s: Passengers move to the ready area.
      • 8s: The weight of the pressure sensor in the ready area is recorded as ready_weight.
      • 10s: The weight on the chairlift is measured and compared to ready_weight to verify if all passengers are on the lift. If there is a mismatch between the two weights, the lift will stop until they match. This simulates a scenario where a passenger fails to get on the lift within the second but successfully boards afterward.

ScreenPrinter.lf

  1. Refactor: Move all the C code in ScreenPrinter.lf to a new c file called ScreenPrinter.c to make the ScreenPrinter reactor cleaner.
  2. New methods: Add four methods to print out weights on ready area, weights on chair lifts, string type of debug messages and integer type of debug messages.

PressureSensor.lf

  1. Generate mock weight data on the ready area.
  2. Generate mock weight data on the current lift.
  3. Provide different data every 10 seconds.

@Max851010
Copy link
Contributor Author

@hokeun Professor Kim, this is the new updates for the Ski Lift example!

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.

1 participant