Skip to content

Latest commit

 

History

History
65 lines (48 loc) · 1.63 KB

File metadata and controls

65 lines (48 loc) · 1.63 KB

Sequential Script (Hydrogen Charger Example)

< User Manual

Components:

  • 6 Large Hydrogen Thrusters to drain hydrogen from the tank.
  • 1 Piston
  • 1 Connector
  • 1 Small Hydrogen Tank
  • 1 Button Panel
  • 1 LCD Panel to display the current progress.

Sequence:

  • Disable Hydrogen Thrusters.
  • Extend the piston to its maximum position and connect both connectors. Display "Connecting..." on the LCD.
  • Enable "Stockpile" mode on the Small Hydrogen Tank. Display "Recharging..." on the LCD.
  • When the Hydrogen Tank is full, disable "Stockpile" mode, disconnect the connectors, and retract the piston. Display "Disconnecting..." on the LCD.
  • Show "Disconnected".

Video:

Video

Sequence:

[HYDROGEN_STOCKPILE]
run
 Hydrogen Example (Thruster) -> Disable
as @thrusters_disabled

run
 Hydrogen Example (Status LCD) -> Set /Background:#FF4600 /Text:"Connecting..."
 Hydrogen Example (Piston) -> Extend
as @piston_extended

when @piston_extended
run
 Hydrogen Example (Connector) -> Connect
as @connector_locked

when @connector_locked
run
 Hydrogen Example (Status LCD) -> Set /Background:Blue /Text:"Recharging..."
 Hydrogen Example (Tank) -> Stockpile // Enables "Stockpile" mode and waits until tank is full
as @tank_full

when @tank_full
run
 Hydrogen Example (Status LCD) -> Set /Background:#FF4600 /Text:"Disconnecting..."
 Hydrogen Example (Tank) -> Auto // Disables "Stockpile" mode
 Hydrogen Example (Connector) -> Disconnect
 Hydrogen Example (Piston) -> Retract
as @piston_retracted

when @piston_retracted
run
 Hydrogen Example (Status LCD) -> Set /Background:Red /Text:"Disconnected"
as @done