-
• #2
Thanks! That does make a lot more sense!
I'll have a look at pulling it in - the trick really will be to make sure that changing it won't break people's code if they are already using this module (although it seems unlikely too many people would be using the original as it is :).
-
• #3
Thank you!
Setters are the same but range of variables vary,
readDateTime()
is different because it returns date object instead of string, new features obviously don't break backward compatibility.By the way, how to make minified version on module? is this okay:
espruino -m DS3231.js -o DS3231.min.js
-
• #4
Thanks - I'll check on how often the module's used :)
To minify the way I minify the modules, it's best to use the
minify.js
in https://github.com/espruino/EspruinoDocs - https://github.com/espruino/EspruinoDocs/blob/master/bin/minify.jsThe espruino CLI will minify as if it's uploading direct to Espruino - whereas I guess you want just the module itself. The script wraps the code in
(function(){...})()
and then sends it to the google closure compiler - which makes a much better job of it than the CLI's esprima minifier.
Hello
here is my version of DS3231 module, compatible with the javascript date object.
https://github.com/ancienthero/espruino/tree/master/modules/DS3231
use it if you will ;)
feedback welcome as well
cheers