Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scale branch #219

Merged
merged 2 commits into from
Jul 13, 2016
Merged

Scale branch #219

merged 2 commits into from
Jul 13, 2016

Conversation

protological
Copy link
Collaborator

This branch fixes some scaling issues with the graphing. The original code saved and scaled graph points, so the original temperature data was lost. This means that if the graph scaled and then over time the scaling changed to be smaller, the graph would not re-scale correctly.

The solution implements some fixed point math, where temperatures are stored as int16 values of 1/10th temperature resolution. The scaling code is also updated to not loop through the data points when they are added, only when they are displayed. This should decrease the overhead, opening options in the future for more features. Also decreases code size a bit, now ~400 bytes free rather than the ~20 on master.

int16 error.  Also there was a 16bit overflow error with the out
of range values.  Also removed some duplicate out of range and
invalid graph defines.

28,296 bytes (98%) of flash of 28,672 bytes. 376 bytes free
@charlespax charlespax merged commit 54dd481 into master Jul 13, 2016
@protological protological deleted the scale_branch branch July 31, 2016 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants