hamishcunningham / fishy-wifi

Scripts, notes and the odd subaquatic gizmo for the ESP8266 and what-have-you.
GNU Affero General Public License v3.0
25 stars 13 forks source link

Water levels converted to array, data cleaning functions added that are compatible with all readings #21

Closed XenoXilus closed 2 weeks ago

XenoXilus commented 6 years ago

As stated in the title, the water levels have been converted into an array, and 3 functions cleanFloatData, cleanLuxData and cleanLongData have been introduced that take arrays of readings, and return a mean that excludes numbers too far (over 1 standard deviation) from the sample mean.

Unfortunately had some issues with my .git\index & index.lock file so I deleted that, and that seems to have resulted in a lot of "files changed". Rest assured all my changes have been in the waterelf32.ino file.

I've tried to be detailed in my commit messages, especially the most recent one.

Eroc33 commented 6 years ago

I think the massive number of files changed is because the line endings have changed (in this repo they are windows style <CR><LF>, in your repo they are linux style <LF> only.) Iirc there is a way to fix this, but I'm not 100% sure how.

hamishcunningham commented 6 years ago

I think there's a github setting or summut... or dos2unix on the command line

On 3 December 2017 at 22:34, Euan Rochester notifications@github.com wrote:

I think the massive number of files changed is because the line endings have changed (in this repo they are windows style , in your repo they are linux style only.) Iirc there is a way to fix this, but I'm not 100% sure how.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hamishcunningham/fishy-wifi/pull/21#issuecomment-348820704, or mute the thread https://github.com/notifications/unsubscribe-auth/AEMQlMI8JFrCqUEvlVcLdbXf-cq5yf_Nks5s8x8xgaJpZM4Qz57n .

--

Hamish Cunningham Professor of Computer Science, University of Sheffield, UK

Phone: 07740 149 842 hamish@gate.ac.uk https://twitter.com/@HCunningham https://hamish.gate.ac.uk https://wegrow.social https://wegrow.social/ https://gate.ac.uk https://pi.gate.ac.uk https://www.sheffield.ac.uk/dcs/people/academic/hcunningham https://www.sheffield.ac.uk/dcs/people/academic/hcunningham https://www.sheffield.ac.uk/news/nr/aquaponics-fish-food-farm-1.581536 https://tinyurl.com/savetheworldwithfishpoo

WeGrow.social: https://twitter.com/WeGrowSocial https://www.facebook.com/WeGrowSocial https://blog.wegrow.social https://www.instagram.com/wegrowsocial https://wegrow.social https://www.youtube.com/channel/UCG3ZPbhbJ1yoa0fxMnaOcdg/videos

On BBC Radio Sheffield:

Eroc33 commented 6 years ago

@hamishcunningham There's definitely a git config setting to stop this happening, but once it's happened I think it requires a rebase to fix unfortunately.

Eroc33 commented 6 years ago

Something that might work to fix this (I did somewhat test this locally on a copy of @XenoXilus's fork):

XenoXilus commented 6 years ago

Didn't quite work - I'm going to clone fishy-wifi again and just pop my copy of waterelf32 into that, then push from my folder again. We'll see how that goes.

XenoXilus commented 6 years ago

I may have just pushed directly to master... I've reverted my commit but evidence of my mistake is still there. As it will be forever. Nice. I'll tinker around some more.

XenoXilus commented 6 years ago

My latest push should have replaced all LF with CRLF, not entirely sure why the changes remain as they are.

Eroc33 commented 6 years ago

@XenoXilus I zapped your erroneous commits from master for you. To avoid the masses of changes showing up in the github stats, and in the git history, you need to squash (or rebase, but that's fiddly to do) the commits which introduced them, the simplest way to do this (iirc) is have whoever merges this pull request use the squash and merge option (it's accessible via the dropdown on the "Merge Pull Request" button). This means all your changes will be treated as one commit though.

layerzerolabs commented 6 years ago

Is this where the benefits of forking and pull requests come in - the developer can manage the fine grained commits from development, and when feature is ready to move to main repo it can be presented as a single (set of) diffs to files? (just asking to try to improve my understanding of git!)

Eroc33 commented 6 years ago

@layerzerolabs yes, that is one advantage, other advantages include not having to give full write access to every contributor, also an opportunity to review pull requests for changes and such.