Skip to content

Commit 77646f0

Browse files
committed
🐰 advice
1 parent ebc2e53 commit 77646f0

File tree

18 files changed

+12765
-12779
lines changed

18 files changed

+12765
-12779
lines changed

docs/develop/development.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,36 @@
1212

1313
## Create a branch
1414

15-
* Want to make changes: fork the repo (see installation)and submit pull requests, see [creating-a-pull-request-from-a-fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork):
15+
* Want to make changes: fork the repo (see installation) and submit pull requests, see [creating-a-pull-request-from-a-fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork):
1616

17-
* Only branch from the main branch! Press Branches, press New Branch, give it a name e.g. background-script and press Create new Branch, click on background-script
17+
* Only branch from the main branch! Press Branches, press New Branch, give it a name e.g. background-script and press Create new Branch, click on background-script
1818

19-
<img width="90" src="https://github.com/user-attachments/assets/588d0854-bac1-4b70-8931-ba6db4c94248" />
19+
<img width="90" src="https://github.com/user-attachments/assets/588d0854-bac1-4b70-8931-ba6db4c94248" />
2020

2121
## Make changes
2222

23-
### Front End (UI)
23+
### Front-end (UI)
2424

2525
* interface folder
2626
* interface/src/routes/moonbase for MoonBase and MoonLight (modules)
2727
* see [Prepare for development](https://moonmodules.org/MoonLight/develop/installation/#prepare-for-development) about nodejs, npm install
2828

29-
```
29+
```markdown
3030
npm install
3131
npm run dev
3232
```
3333

3434
* see [Troubleshooting](https://moonmodules.org/MoonLight/develop/installation/#troubleshooting) about WWWData.h
3535

36-
### Back End (Server)
36+
### Back-end (Server)
3737

3838
There are 3 levels to add functionality:
3939

4040
* **Standard ESP32-Sveltekit code**, e.g. Connections, Wifi and System. MoonBase files is also made using standard sveltekit as example but contains a few components used in MoonLight modules. Might be rewriteen as MoonLight Module in the future.
41-
* lib folder for Sveltekit back end
41+
* lib folder for Sveltekit vack-end
4242
* Read the [ESP32 Sveltekit docs](https://moonmodules.org/MoonLight/esp32sveltekit/)
4343
* [MoonLight Modules](https://moonmodules.org/MoonLight/moonbase/modules/) e.g. Lights Control, Effects, Info, Channels. They are subclasses of Modules.h/cpp and implement setupDefinition, onUpdate and optional loop. New modules need to be defined in main.cpp and added to menu.svelte. All further UI is generated by Module.svelte.
44-
* src folder for MoonBase and MoonLight back end
44+
* src folder for MoonBase and MoonLight vack-end
4545
* **MoonLight Nodes**: the easiest and recommended way. See Effects.h, Layouts.h, Modifiers.h and Drivers.h for examples. They match closest WLED usermods. Each node has controls, a setup and a loop and can be switched on and off. For specific purposes hasOnLayout() and hasModifier() can return true.
4646
* src/MoonLight/nodes
4747

@@ -50,7 +50,7 @@ There are 3 levels to add functionality:
5050
* Go to the file(s) you want to change press edit and make the changes.
5151
* ☑️ and ➡️ to build and or upload
5252
* Changes made to the UI are not always visible in the browser, clear the browser cache to see latest UI (see [connect to MoonLight](https://moonmodules.org/MoonLight/gettingstarted/installation/#connect-moonlight)).
53-
* MoonLight uses clang-format for c/c++ code and prettier for Svelte, javascript etc. Format your code before submitting! (right click Format Document on each page you change)
53+
* MoonLight uses clang-format for c/c++ code and prettier for Svelte, javascript etc. Format your code before submitting! (right-click Format Document on each page you change)
5454
* Press Commit Changes..., enter a commit message and an extended description, Press Commit Changes
5555

5656
## Document your changes
@@ -88,7 +88,7 @@ See [Documentation](https://moonmodules.org/MoonLight/develop/documentation/)
8888

8989
### UI development server
9090

91-
To ease the frontend development you can deploy the back end code on an ESP32 board and pass the websocket and REST API calls through the development server's proxy running on your computer.
91+
To ease the frontend development you can deploy the vack-end code on an ESP32 board and pass the websocket and REST API calls through the development server's proxy running on your computer.
9292

9393
This very much speeds up UI development as no flashing to ESP32 is required to test updated UI. Svaing an UI file is enough to see the results!!!
9494

docs/develop/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Before changing code, test if the current download of MoonLight is running fine.
110110

111111
* If you are developing or updating existing MoonLight installations MoonLight might be outdated or not show up correctly in the browser or not even appear. Two reasons
112112

113-
* Sometimes the latest front end code is not generated yet (WWWData.h). This is how to set it right:
113+
* Sometimes the latest front-end code is not generated yet (WWWData.h). This is how to set it right:
114114
* Open platformIO new terminal (>_)
115115
* touch ./interface/src/app.html so the build process will be triggered to create a new WWWData.h
116116
* build the project (✔) - if nodejs is not installed (yet) you will get errors. See troubleshooting

docs/develop/nodes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ A node implements the following (overloaded) functions:
5353
* Regular patterns (CRGB as default but also others like Moving Head ...)
5454

5555
* See [Modules](../modules)
56-
* Upon changing a pin, driver.init will rerun (FastLED.addLeds, PD and VD driver.init)
57-
* Uses ESPLiveScripts, see compileAndRun. compileAndRun is started when in Nodes a file.sc is choosen
56+
* Upon changing a pin, driver.init will rerun (FastLED.addLeds, Parallel LED Driver.init)
57+
* Uses ESPLiveScripts, see compileAndRun. compileAndRun is started when in Nodes a file.sc is chosen
5858
* To do: kill running scripts, e.g. when changing effects
5959
* [Nodes.h](https://github.com/MoonModules/MoonLight/blob/main/src/MoonLight/Nodes.cpp): class Node (constructor, destructor, setup, loop, hasFunctions, map, modify, addControl(s), onUpdate)
6060
* [Nodes.cpp](https://github.com/MoonModules/MoonLight/blob/main/src/MoonLight/Nodes.cpp): implement LiveScriptNode
@@ -106,7 +106,7 @@ This is the current list of supported lights ranging from 3 channels per light (
106106
* MHBeTopper19x15W-32 🐺: 32 channels moving head
107107
* MH19x15W-24: 24 channels moving heads
108108

109-
Based on the choosen value, the channels per light and the offsets will be set e.g. for GRB: header->channelsPerLight = 3; header->offsetRed = 1; header->offsetGreen = 0; header->offsetBlue = 2;. Drivers should not make this mapping, the code calling drivers should do.
109+
Based on the chosen value, the channels per light and the offsets will be set e.g. for GRB: header->channelsPerLight = 3; header->offsetRed = 1; header->offsetGreen = 0; header->offsetBlue = 2;. Drivers should not make this mapping, the code calling drivers should do.
110110

111111
The RGB and W offsets needs to be re-ordered and brightness corrected from the channel array. Not only Art-Net but also a LEDs driver need to accept channel arrays with more then 4 channels per light. Eg GRB6 is a type of led curtain some of us have, which a Chinese manufacturer screwed up: 6 channels per light but only rgb is used, 3 channels do nothing
112112

docs/develop/standardsguidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Github will pick up the changes so your PR stays up-to-date.
3535

3636
> [!CAUTION]
3737
> Do not use "force-push" while your PR is open!
38-
> It has many subtle and unexpected consequences on our github reposistory.
38+
> It has many subtle and unexpected consequences on our github repository.
3939
> For example, we regularly lost review comments when the PR author force-pushes code changes. So, pretty please, do not force-push.
4040
4141
You can find a collection of very useful tips and tricks here: https://github.com/wled-dev/WLED/wiki/How-to-properly-submit-a-PR
@@ -62,7 +62,7 @@ You can find a collection of very useful tips and tricks here: https://github.co
6262

6363
### Code
6464

65-
We use Clang-format for c-files (see .clang-format in the repo for the definition) and Prettier for front end files.
65+
We use Clang-format for c-files (see .clang-format in the repo for the definition) and Prettier for front-end files.
6666

6767
Right click Format Document on each file you edit before committing.
6868

@@ -72,7 +72,7 @@ Comments are used for technical documentation, always document your changes, eac
7272
(Functional documentation must be done on the MoonLight website, see above)
7373

7474
Examples:
75-
```
75+
```markdown
7676
// This is a comment.
7777

7878
/* This is a CSS inline comment */

docs/develop/sveltekit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Below lists are ordered in terms of likelyhood to be accepted:
6464

6565
## Steps made to make Sveltekit ready for MoonLight
6666

67-
This is a checklist, More info on most of the items can be found in the ESP32-Sveltekit specific documentation [ESP32 SvelteKit](https://moonmodules.org/MoonLight/esp32sveltekit/), [Build Tools](https://moonmodules.org/MoonLight/gettingstarted/), [Front end](https://moonmodules.org/MoonLight/sveltekit/) and [Back End](https://moonmodules.org/MoonLight/statefulservice/)
67+
This is a checklist, More info on most of the items can be found in the ESP32-Sveltekit specific documentation [ESP32 SvelteKit](https://moonmodules.org/MoonLight/esp32sveltekit/), [Build Tools](https://moonmodules.org/MoonLight/gettingstarted/), [Front-end](https://moonmodules.org/MoonLight/sveltekit/) and [Back-end](https://moonmodules.org/MoonLight/statefulservice/)
6868

6969
* {custom} = MoonLight or name of a forked repo
7070

docs/gettingstarted/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ MoonLight documentation (this site) is organised as follows:
2222
* [Getting Started](https://moonmodules.org/MoonLight/gettingstarted/): Getting started with MoonLight
2323
* [MoonLight](https://moonmodules.org/MoonLight/moonlight/), [MoonBase](https://moonmodules.org/MoonLight/moonbase/), [Connections](https://moonmodules.org/MoonLight/connections/), [WiFi](https://moonmodules.org/MoonLight/wifi/), [System](https://moonmodules.org/MoonLight/system/status/): Help per module (MoonLight contains links to these pages)
2424
* [Develop](https://moonmodules.org/MoonLight/develop/): Info on developing for MoonLight
25-
* [ESP32 Sveltekit](https://moonmodules.org/MoonLight/esp32sveltekit/), [Build Tools](https://moonmodules.org/MoonLight/gettingstarted/), [Front End](https://moonmodules.org/MoonLight/sveltekit/), [Back End](https://moonmodules.org/MoonLight/statefulservice/): Information about the foundation of MoonLight, ESP32-Sveltekit, aimed at developers.
25+
* [ESP32 Sveltekit](https://moonmodules.org/MoonLight/esp32sveltekit/), [Build Tools](https://moonmodules.org/MoonLight/gettingstarted/), [Front-end](https://moonmodules.org/MoonLight/sveltekit/), [Back-end](https://moonmodules.org/MoonLight/statefulservice/): Information about the foundation of MoonLight, ESP32-Sveltekit, aimed at developers.

docs/moonbase/devices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Shows which other MoonLight devices are connected to your local network.
66

77
* Device name: name of this device (set the name in the [WiFi station module](https://moonmodules.org/MoonLight/network/sta/))
88
* Devices: Devices found on the network
9-
* Click on IP to jump to the device
9+
* Click on IP to jump to the device

docs/moonbase/inputoutput.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ For each board the following presets are defined:
3636
* Button On/Off
3737
* Planned soon
3838
* Battery
39-
* Relais brightness
39+
* Relay brightness
4040
* DMX (in)
4141
* Planned later
4242
* I2S for microphone and line in

docs/moonlight/drivers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ Want to add a Driver to MoonLight, see [develop](https://moonmodules.org/MoonLig
3737
| HUB75 Driver | <img width="100" src="https://github.com/user-attachments/assets/620f7c41-8078-4024-b2a0-39a7424f9678"/> | <img width="100" src="https://github.com/user-attachments/assets/4d386045-9526-4a5a-aa31-638058b31f32"/> | Drive HUB75 panels<br>Not implemented yet |
3838
| IR Driver 🆕🚧 | <img width="100" src="../../media/moonlight/IRDriver.jpeg"/> | | Receive IR commands and [Lights Control](https://moonmodules.org/MoonLight/moonlight/lightscontrol/) |
3939

40-
41-
Virtual LED Driver: Driving max 120! outputs. E.g. 48 panels of 256 LEDs each run at 50-100 FPS using shift registers. Not implemented yet
40+
* The Parallel LED driver uses different hardware peripherals depending on the MCU type: ESP32-D0: I2S, ESP32-S3: LCD_CAM, ESP32-P4: Parallel IO (ParLIO).
41+
* Virtual LED Driver: Driving max 120! outputs (E.g. 48 panels of 256 LEDs each run at 50-100 FPS) using shift registers. Integrated within the Parallel LED Driver architecture. Not implemented yet
4242
<img width="100" src="https://github.com/user-attachments/assets/98fb5010-7192-44db-a5c9-09602681ee15"/><img width="100" src="https://github.com/user-attachments/assets/c81d2f56-00d1-4424-a716-8e3c30e76636"/>
4343

4444
### Max Power and Light Preset

interface/src/lib/components/moonbase/MultiRow.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
<div class="h-16 flex w-full items-center justify-between space-x-3 p-0 text-xl font-medium">
144144
{initCap(property.name)}
145145
</div>
146-
{#if findItemInDefinition.crud == null || findItemInDefinition.crud.includes('c')}
146+
{#if findItemInDefinition?.crud == null || findItemInDefinition.crud.includes('c')}
147147
<div class="relative w-full overflow-visible">
148148
<!-- <div class="mx-4 mb-4 flex flex-wrap justify-end gap-2"> -->
149149
<button
@@ -162,7 +162,7 @@
162162
{/if}
163163

164164
<!-- Search Filter -->
165-
{#if findItemInDefinition.filter != null}
165+
{#if findItemInDefinition?.filter != null}
166166
<MultiInput
167167
property={propertyFilter}
168168
bind:value={data[property.name + '_filter']}
@@ -184,12 +184,12 @@
184184
items={filteredItems}
185185
onReorder={handleReorder}
186186
class="space-y-2"
187-
dragDisabled={!(findItemInDefinition.crud == null || findItemInDefinition.crud.includes('s'))}
187+
dragDisabled={!(findItemInDefinition?.crud == null || findItemInDefinition.crud.includes('s'))}
188188
>
189189
{#snippet children({ item: itemWrapper }: { item: any })}
190190
<!-- svelte-ignore a11y_click_events_have_key_events -->
191191
<div class="rounded-box bg-base-100 flex items-center space-x-3 px-4 py-2">
192-
{#if findItemInDefinition.crud == null || findItemInDefinition.crud.includes('s')}
192+
{#if findItemInDefinition?.crud == null || findItemInDefinition.crud.includes('s')}
193193
<Grip class="h-6 w-6 text-base-content/30 cursor-grab flex-shrink-0" />
194194
{/if}
195195
<!-- Show the first 3 fields -->
@@ -226,7 +226,7 @@
226226
>
227227
<SearchIcon class="h-6 w-6" /></button
228228
>
229-
{#if findItemInDefinition.crud == null || findItemInDefinition.crud.includes('d')}
229+
{#if findItemInDefinition?.crud == null || findItemInDefinition.crud.includes('d')}
230230
<button
231231
class="btn btn-ghost btn-sm"
232232
onclick={() => {

0 commit comments

Comments
 (0)