If the cold junction temperature is not positive, I cannot use the coefficients to calculate the temperature and I have to use other coefficients which I did not implement since we don't go to negative temperature. So if the cold junction is negative, I set an alarm and set the temperature to -1.0 and not 0 to show that cold junction became negative.
Since runningSum is an integer, consider changing sample count to a power-of-two value (e.g. 16 or 32) so you can replace this division with a right bit shift (much faster). Would mean your average would be low until your running average buffer is full of samples though.
The use case is for us to be able to run the code coverage tests without the UI raising alarms when the HD is not connected. This is so the other squishqt tests will be able to run normally. Otherwise, squishqt can't find the qml components when the HD communication timeout alarm shows and some of the other squishqt tests will fail.
Could you please explain what is this component and why we have it. We should have only one NotificationBar.
But as it seems it is only being used for notifications on each sections of MainTreatment screen. If that is the case, It is a good idea but then we need to have a kind of parent and child components structure in which the parent is the simple one and the children have the extra features. like what we currently have in Dialogs. Please let me review what would be the good implementation.
Peter, if you want to change these kind of things please collaborate, negotiate and let's review the rational behind the existence of a component and then change it together. Thanks,