Hi, could you please help me out with a couple of questions about Littlefoot scripting for the Lightpad Block?
-
When a Lightpad Block script doesn’t use the side button, it can be used to cycle through Modes saved into the Block. However, every time the button is pressed and the Mode is changed, the
initialise()
function is NOT called. Because of this, for example, the factory scriptDrum Block
does not work properly when trying to switch between Modes with different grid size (grid is initialised in theinitialise()
function). Is this the intended behaviour, or could we expect this to be changed in a future firmware? -
A user Config Item can be made visible in the Parameters section of Blocks Code and Dashboard by passing
isActive = true
argument to thesetLocalConfigActiveState()
function. In this case, the Config Item is displayed asConfig ##
. Is there any way to customize the display name of a user Config Item? -
A Config Item can be saved to the flash memory of the Block by passing
saveToFlash = true
argument to thesetLocalConfigActiveState()
function. Given the limited resource of flash memory write cycles, what would be your recommendation on how often is it ok to write to a Config Item that is saved to flash? E.g. everyrepaint()
call, every touch event, or everyinitialise()
call?