Skip to content

Commit

Permalink
Merge pull request #546 from arthurkehrwald/document-mode-list-bcp-co…
Browse files Browse the repository at this point in the history
…mmand

Document mode_list BCP command
  • Loading branch information
avanwinkle authored Nov 29, 2024
2 parents 2005144 + 61a08e7 commit 12aa665
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/code/BCP_Protocol/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ The following BCP commands have been defined (and implemented) in MPF:
* [machine_variable](machine_variable.md)
* [mode_start](mode_start.md)
* [mode_stop](mode_stop.md)
* [mode_list](mode_list.md)
* [monitor_start](monitor_start.md)
* [monitor_stop](monitor_stop.md)
* [player_added](player_added.md)
Expand Down
32 changes: 32 additions & 0 deletions docs/code/BCP_Protocol/mode_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

# mode_list (BCP command)
This message informs the media controller about which modes are currently running. It is sent whenever a mode starts or stops, but only to clients currently [monitoring](monitor_start.md) the `mode` category.

## Origin
Pin controller


## Parameters
### running_modes
Type: JSON Array

Example (Formatted for legibility; the parameter does not contain line-breaks):
```
{
"running_modes": [
[
"base",
100
],
[
"game",
20
]
]
}
```

Each element of the array is another JSON Array with the following elements:

1. The name of the mode (`string`)
2. The priority of the mode (`int`)

0 comments on commit 12aa665

Please sign in to comment.