Skip to content

Commit

Permalink
Fix display of values <=0 in PID Widget (#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
kizniche committed Mar 29, 2024
1 parent df89991 commit b8bffb5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ This release changes the install directory from ~/Mycodo to /opt/Mycodo. This ne
- Fix influxdb client install if server is already installed
- Fix Select options of web UI not properly displaying the saved value
- Fix note attachments not being copied during upgrade
- Fix display of values <=0 in PID Widget ([#1372](https://github.com/kizniche/Mycodo/issues/1372))

### Features

Expand Down
15 changes: 7 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ Mycodo is open source software for the Raspberry Pi that couples inputs and outp

|Build Status| |Codacy Badge| |Translation Badge| |DOI|


.. contents:: Table of Contents

:depth: 1

Quick Install
-------------
Expand Down Expand Up @@ -143,8 +142,8 @@ Prerequisites

Required:

- Debian-based operating system
- An active internet connection
- Debian-based operating system
- An active internet connection

Recommended:

Expand Down Expand Up @@ -177,12 +176,12 @@ A minimal set of anonymous usage statistics are collected to help improve develo
Measurement Database
~~~~~~~~~~~~~~~~~~~~

Mycodo currently supports InfluxDB as the time-searies database used to store measurements. Both versions 1.x (for 32-bit systems) and 2.x (for 64-bit systems) are supported. During the install, you will be prompted to install 1.x, 2.x, or none (if you wish to set up your own, either locally or remotely). The settings for the database can be reconfigured after install.
Mycodo currently supports InfluxDB as the time-series database used to store measurements. Both versions 1.x (for 32-bit systems) and 2.x (for 64-bit systems) are supported. During the install, you will be prompted to install 1.x, 2.x, or none (if you wish to set up your own, either locally or remotely). The settings for the database can be reconfigured after install.

Docker
~~~~~~

Docker support is experimental, but if you want to try it, read the [DOCKER.md](https://github.com/kizniche/Mycodo/blob/master/DOCKER.md). There is also a `Docker Issue (#637) <https://github.com/kizniche/Mycodo/issues/637>`__ on github for those that wish to help with development.
Docker support is experimental, but if you want to try it, read the docker `README.md <https://github.com/kizniche/Mycodo/blob/master/docker/README.md>`__. There is also a `Docker Issue (#637) <https://github.com/kizniche/Mycodo/issues/637>`__ on github for those that wish to help with development.

REST API
--------
Expand Down Expand Up @@ -245,7 +244,7 @@ This software includes third party open source software components. Please see i
Languages
---------

Mycodo has been translated to several laguages. Weblate is now used so anyone can contribute to translations. However, due to an increasing number of new languages being added and not translated, only languages that are at least 50% complete will be included in Mycodo as a translation option.
Mycodo has been translated to several languages. Weblate is now used so anyone can contribute to translations. However, due to an increasing number of new languages being added and not translated, only languages that are at least 50% complete will be included in Mycodo as a translation option.

|Translation Table|

Expand All @@ -267,7 +266,7 @@ Mycodo has been translated to several laguages. Weblate is now used so anyone ca

The install script will prompt you to select a language. This will be the set language when you first open the web user interface. You may change this at a later time on the settings page at ``[Gear Icon] -> Configure -> General -> Language``.

If you would like to contribute to the translations, you can do so at `http://translate.kylegabriel.com <https://translate.kylegabriel.com/engage/mycodo/>`__. Please read [How To Contribute to Language Translations in Mycodo](https://forum.radicaldiy.com/t/how-to-contribute-to-language-translations-in-mycodo/1162/2) for more information.
If you would like to contribute to the translations, you can do so at `http://translate.kylegabriel.com <https://translate.kylegabriel.com/engage/mycodo/>`__. Please read `How To Contribute to Language Translations in Mycodo <https://forum.radicaldiy.com/t/how-to-contribute-to-language-translations-in-mycodo/1162/2>`__ for more information.

Thanks
------
Expand Down
2 changes: 1 addition & 1 deletion mycodo/widgets/widget_pid.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def pid_mod_unique_id(unique_id, state):
} else if (document.getElementById(name + '-timestamp-' + widget_id)) {
document.getElementById(name + '-timestamp-' + widget_id).innerHTML = 'MAX AGE EXCEEDED';
}
if (data[name][1] >= 0 && document.getElementById(name + '-' + widget_id)) {
if (document.getElementById(name + '-' + widget_id)) {
const value = parseFloat(data[name][1]).toFixed(decimal_places);
document.getElementById(name + '-' + widget_id).innerHTML = value + units;
} else if (document.getElementById(name + '-' + widget_id)) {
Expand Down

0 comments on commit b8bffb5

Please sign in to comment.