mozaic_tips_and_tricks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
mozaic_tips_and_tricks [2020/01/12 21:16] – [Store two positive Values into a single Variable] Fixed typo _kimozaic_tips_and_tricks [2020/02/04 19:19] – Changed overview links to local links _ki
Line 4: Line 4:
  
  
-  * [[mozaic_tips_and_tricks#Two dimensional Arrays]] +  * [[#Two dimensional Arrays]] 
-  * [[mozaic_tips_and_tricks#Multi dimensional Arrays]] +  * [[#Multi dimensional Arrays]] 
-  * [[mozaic_tips_and_tricks#Store two positive Values into a single Variable]] +  * [[#Store two positive Values into a single Variable]] 
-  * [[mozaic_tips_and_tricks#Store three unsigned Bytes into a single Variable]] +  * [[#Store three unsigned Bytes into a single Variable]] 
-  * [[mozaic_tips_and_tricks#Some Best Practice Tips]] +  * [[#Some Best Practice Tips]] 
-  * [[mozaic_tips_and_tricks#Multi-Line Pad Labels]] +  * [[#Multi-Line Pad Labels]] 
-  * [[mozaic_tips_and_tricks#Use the SHIFT Button to toggle to HELP View]] +  * [[#Use the SHIFT Button to toggle to HELP View]] 
-  * [[mozaic_tips_and_tricks#Use a Knob to toggle 16 Pads View to HELP View]]+  * [[#Use a Knob to toggle 16 Pads View to HELP View]]
  
 ===== Two dimensional Arrays ===== ===== Two dimensional Arrays =====
Line 70: Line 70:
  
 <code> <code>
-  maxB = 1000  // Maximum value for plus one +  maxA = 1000  // Maximum value for plus one 
-  valA = 723   // allowed range 0 .. ~16000 +  valA = 723   // allowed range 0 .. 999 
-  varB = 124   // allowed range 0 .. 999+  varB = 124   // allowed range 0 .. ~16000
      
-  combinedValue = valA * maxB + valB+  combinedValue = valA + valB * maxA 
 </code>  </code> 
  
 To later extract the values from their packed format use To later extract the values from their packed format use
 <code> <code>
-  valA = RoundDown combinedValue / maxB +  valA = combinedValue % maxA 
-  valB = combinedValue % maxB+  valB = Div combinedValue, maxA
 </code> </code>
 \\  \\ 
  • mozaic_tips_and_tricks.txt
  • Last modified: 2024/04/23 19:07
  • by _ki