Update API temperature values #272

Merged
UnchartedBull merged 1 commits from master into master 2019-11-26 16:12:07 +00:00
UnchartedBull commented 2019-11-26 15:39:49 +00:00 (Migrated from github.com)

Hi,

I noticed some funky behaviour with the new API (#261 ). Basically the temperature shown in the WebUI differs from the one returned from the API.

After some digging I found, that the rpi_inputs aren't updated when the temperature is read. These 2 simple lines of codes update the rpi_inputs array (python makes shallow copies by default, which means the original object is updated).

I did test this with some absurd hardcoded values and they were returned correctly by the API. Hope you can merge this as well, as this will make the API way more useful :)

Hi, I noticed some funky behaviour with the new API (#261 ). Basically the temperature shown in the WebUI differs from the one returned from the API. After some digging I found, that the rpi_inputs aren't updated when the temperature is read. These 2 simple lines of codes update the rpi_inputs array (python makes shallow copies by default, which means the original object is updated). I did test this with some absurd hardcoded values and they were returned correctly by the API. Hope you can merge this as well, as this will make the API way more useful :)
vitormhenrique commented 2019-11-26 16:12:03 +00:00 (Migrated from github.com)

Thanks, I haven't had the time to work on this project, I started a major refactor to make the code more readable and following more pythonic coding style.
I'm guessing over the Hollidays I'll come back and work on this project!

Thanks, I haven't had the time to work on this project, I started a major refactor to make the code more readable and following more pythonic coding style. I'm guessing over the Hollidays I'll come back and work on this project!
UnchartedBull commented 2019-11-26 21:27:47 +00:00 (Migrated from github.com)

Thanks for merging this so quickly! If you need any help, or someone to review something (especially the API part) let me know :)

Thanks for merging this so quickly! If you need any help, or someone to review something (especially the API part) let me know :)
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Gandalf/OctoPrint-Enclosure#272