Differences

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

Link to this comparison view

Both sides previous revision Previous revision
developers-guide [2019/07/05 11:47]
203.92.44.150
developers-guide [2019/07/05 13:23]
wolfmanjm old revision restored (2019/02/02 11:18)
Line 10: Line 10:
  
 When coding a smoothie module, you probably want the user to be able to configure it. When coding a smoothie module, you probably want the user to be able to configure it.
-In smoothie configuration is stored in a configuration ​**[[https://​www.softpedia.com/​get/​Security/​Secure-cleaning/​SystemCarePro.shtml|system Care]]** ​file, it is read at startup time ( when your module is being loaded ).+In smoothie configuration is stored in a configuration file, it is read at startup time ( when your module is being loaded ).
  
 If you want your config values to be read only upon module loading read your config values from the //​on_module_loaded//​ callback of your module:​ [[https://​github.com/​arthurwolf/​Smoothie/​blob/​bee725fcd5dce2162f643dd747fb95c1cc9f4242/​src/​modules/​utils/​pausebutton/​PauseButton.cpp#​L16|example]]. If you want your config values to be read only upon module loading read your config values from the //​on_module_loaded//​ callback of your module:​ [[https://​github.com/​arthurwolf/​Smoothie/​blob/​bee725fcd5dce2162f643dd747fb95c1cc9f4242/​src/​modules/​utils/​pausebutton/​PauseButton.cpp#​L16|example]].
Line 35: Line 35:
 If we do that for all config options, it's going to end up using quite a lot of flash storage space. If we do that for all config options, it's going to end up using quite a lot of flash storage space.
  
-The **[[https://​www.softpedia.com/​get/​Security/​Secure-cleaning/​SystemCarePro.shtml|system Care]]** ​solution is [[http://​en.wikipedia.org/​wiki/​Checksum|Checksums]]:​ we don't store the actual string, but a checksum of that string we can compare to the checksums of the configuration lines in the config file and still know if they correspond to our string.+The solution is [[http://​en.wikipedia.org/​wiki/​Checksum|Checksums]]:​ we don't store the actual string, but a checksum of that string we can compare to the checksums of the configuration lines in the config file and still know if they correspond to our string.
 That way we don't actually store the string. ​ That way we don't actually store the string. ​