|Top Previous Next|
Use Add, Edit, and Delete buttons to create the list of settings.
It is this name that you will use to reference settings in stg_set(), stg_get(), etc. Names are case-sensitive and cannot start with a digit (i.e. 0-9 char). This is because the STG library's procedures would interpret this as a setting number, not name. Try to keep the names short, this saves RAM memory space (by reducing the amount of memory needed to keep the list of setting names).
Specifies whether the setting will be stored in the non-volatile memory (EEPROM or flash as defined by the global Use EEPROM / Use Flash Disk option) or volatile memory (RAM). Obviously, settings that go into the RAM are those that you don't have to keep while the device is powered off. If so, why even use settings? Wouldn't regular variables suffice? Yes and no. Regular variables are fast to access, but using settings for the purpose has its own advantages.
You've got byte (0-255 range), word (0-65535 range), string (up to 253 characters), and dot-decimal string (up to 63 bytes).
Number of Members
Each setting must have at least one member, and can be set to include multiple members (like in an array). The maximum number of members for the setting depends on this setting's type.
P1 Parameter (Min)
The minimum value for byte and word settings, minimum length for string and dot-decimal settings.
P2 Parameter (Max)
The maximum value for byte and word settings, maximum length for string and dot-decimal settings.
Initialize always — the setting is unconditionally initialized during stg_restore_multiple() execution.
Initialize when invalid — the setting is only initialized during stg_restore_multiple() execution if found to contain an invalid or corrupted value.
A separate default value can be provided for each setting member, but not necessarily.
Any comment you like. Do add comments — they really help. These get compiled into the final application binary, so having longer commends increases the size of your application.