aboutsummaryrefslogtreecommitdiff
path: root/docs/Scripting
diff options
context:
space:
mode:
authorjakob.stendahl <jakob.stendahl@infomedia.dk>2022-12-12 14:13:40 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2022-12-12 14:13:40 +0100
commit4189c0c988daa939be0e8ec979ce0ae0563c4b7d (patch)
treef07143ac71bd80457f681ec64bde1bbcbefa7a08 /docs/Scripting
parentf1664d7c0dda8b4e557a02cd6fbfe56308daa4e4 (diff)
downloadLuxcena-Neo-4189c0c988daa939be0e8ec979ce0ae0563c4b7d.tar.gz
Luxcena-Neo-4189c0c988daa939be0e8ec979ce0ae0563c4b7d.zip
Create docs from python code
Diffstat (limited to 'docs/Scripting')
-rw-r--r--docs/Scripting/NeoBehaviour.md68
-rw-r--r--docs/Scripting/Strip.md18
2 files changed, 86 insertions, 0 deletions
diff --git a/docs/Scripting/NeoBehaviour.md b/docs/Scripting/NeoBehaviour.md
new file mode 100644
index 0000000..c10d055
--- /dev/null
+++ b/docs/Scripting/NeoBehaviour.md
@@ -0,0 +1,68 @@
+# Documentation for `NeoBehaviour`
+
+::: luxcena_neo.neo_behaviour.NeoBehaviour
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+ filters: ["!^__init__"]
+
+
+### An example of the usage of the class
+```python
+from luxcena_neo import NeoBehaviour
+
+class Main(NeoBehaviour):
+ def on_start(self):
+ strip.setPixelColor(0, "#fafafa")
+```
+
+---
+
+::: luxcena_neo.neo_behaviour.Variable
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+
+---
+
+::: luxcena_neo.neo_behaviour.ColorVariable
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+
+---
+
+::: luxcena_neo.neo_behaviour.IntegerVariable
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+
+---
+
+::: luxcena_neo.neo_behaviour.FloatVariable
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+ #show_category_heading: true
+ #show_if_no_docstring: true
+
+---
+
+::: luxcena_neo.neo_behaviour.BooleanVariable
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+
+---
+
+::: luxcena_neo.neo_behaviour.Trigger
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
diff --git a/docs/Scripting/Strip.md b/docs/Scripting/Strip.md
new file mode 100644
index 0000000..cd06519
--- /dev/null
+++ b/docs/Scripting/Strip.md
@@ -0,0 +1,18 @@
+# Documentation for `strip`
+
+::: luxcena_neo.strip.Strip
+ handler: python
+ options:
+ show_root_heading: true
+ show_source: false
+
+---
+
+## A note on colors
+Most methods which need colors takes a `*color` parameter. This is because it interprets multiple types of colors. The example below illustrates this, each of the lines has the exact same effect on the led strip.
+```python
+set_pixel_color(0, "#fafafa")
+set_pixel_color(0, 16448250)
+set_pixel_color(0, 250, 250, 250)
+set_pixel_color(0, (250, 250, 250))
+```