-
Thank you for putting this code into a module. I have been trying to understand OOP Javascript and just brought a book to try to wrap my head around it. Looking over this code as well as the comment from possman, It now fairly clear the way it works. Having scratched my head over this for a couple of weeks and now the light bulb in my brain turns on!
I did try the code and it partially works. It does report temperature correctly but the error reporting does not work correctly now. It only reports case 4 under all fault conditions. I will try to debug this and repost code later today.
Modularized.
I posted the module - does this work?
Module code: