Skip to content

Commit

Permalink
Add Macro documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dnewman-gpsw committed Apr 15, 2024
1 parent e629d45 commit 5477a7f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/control/actions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,28 @@ Any four character code can be used for store other information. You can also st


## Macro support (since March, '24)
Added support for macros, or crude scripting subroutines. This expands the potential complexity for QR scripting, as the entire script is no longer limited to 255 characters.
It would be possible to run scripts nearing ~1.2KB. Note: recursion is supported, macros can call other macros, and can call themselves.

Macros are saved in string FourCCs:
* **$**fourcc**&#61;<courier>"custom Labs commands"</courier>** (temporary)
* **\***fourcc**&#61;<courier>"custom Labs commands"</courier>** (permanent)

Example: This macro calculates the Light Value and stores the result in variable **E**<br>
**\*LVAL=**<courier>"=Ii=Ss=I/100=S/I=E6.25=E*S=E#2"</courier>

e.g. *SUBA="mVr4p60'60p'!S!2E!1N" Note: Use single quotes for text within double quotes.

In a separate QR Code will call LVAL and display the result<br>
**^LVAL**<courier>"Current LV $E"</courier>

Note: for Macros that print output use single quotes for text within.
**\*DPLV=**<courier>"^LVAL'current LV $E'"</courier>





## Reset Actions ##

* **!RESET** - erase all your permanent metadata (anything that used !Mxxxx command.) (requires user confirmation.)
Expand Down

0 comments on commit 5477a7f

Please sign in to comment.