Skip to content

A custom HTML5 Element for tracking Deep Space Cargo Pod status

Notifications You must be signed in to change notification settings

steelhawks/deep-space-cargo-select-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

FRC Deep Space hatch-cargo-select

A custom HTML Element to track the Deep Space Hatch/Cargo hold events.

demo

Dependencies

Status Codes

the result status code is in the form of

"identifier"-"hatch status"-"cargo status"

Hatch/Cargo Status Description
H normal hatch mounted
SSH hatch mounted during sandstorm
PREH Null Hatch loaded during staging
C normal play cargo loaded
SSC cargo load during sandstorm
PREC cargo loaded during staging

example:

value description
RLF2-SSH-C position RLF2 has a hatch loaded during sandstorm and cargo loaded during normal play
RLF3-PREH-SSC position RLF3 has a null hatch loaded staging and cargo loaded during sandstorm

Basic Usage

<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
    <script src="/material-hatch-select.tag" type="riot/tag"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/riot/3.13.2/riot+compiler.min.js"></script>
</head> 
<body>   

    <hatch-cargo-select position="RLF2"></hatch-cargo-select>

 <script>
     // load the RiotJS elements
     riot.mount('hatch-cargo-select');
 </script>

the result element will have an input with class "hatch_cargo"

you can get all the input values using the following code:

var elementsArray = document.querySelectorAll('input.hatch_cargo');
elementsArray.forEach(function(input) {
   console.log(input.value);
});

Demo

A sample page layout with multiple cargo inputs be found here

About

A custom HTML5 Element for tracking Deep Space Cargo Pod status

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages