Well I did it and it worked. I only tried the “Weather Station” app bit this was OK. I made some changes to verify that I was using the software I had compiled… but yes it was OK.
I also made a change to the way the accelerometer value are “scaled” using “m-g per bit” and “bit resolution” and it does seem to wok. I find this clearer than what was there before of what “ojousima” is doing, but it hasn’t been fully tested ;). I do it like this
add 32768, since the accelerometer is a 16 bits 2's complement the full range is
from -32768 to +32767 so this moves the value range into positive territory
clean LSB essentially >> (16 - resolution) with resolution 8, 10 or 12
substract (1<<(resolution-1) ) so we get back the signed info within the set resolution
scale based on the number of m-g per bit
I also added a “distro” target to the Makefile. Currently it only creates the weather app zip file. I also can automatically upload it to google drive with the use of gdrive but I comented that out for now).
So givent that, if you still want it, I’ll be glad to create a pull request.
I also have a problem. I have 2 Ruuvi tags, and one of them got stuck into “booter” mode. I can access it, upload zip and what not, but it is stuck in booter mode and the app won’t start… even after pressing button, removing the battery,… etc. I don’t think it is a problem with the uploaded app, since the other Ruuvi was running the same app and I tried uploading the standard app. So I am afraid that the button is stuck. Any advice?
After a few tries, uploading my app, the thing resets itself properly… no idea why.