Skip to content

Commit

Permalink
Fix battery.runtime missing crash
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurMitchell42 committed Oct 12, 2024
1 parent e521f3c commit 7a91d9a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nutcase/app/app/utils/gui_data_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ def Chart_Runtime(UPS, Result):
if not (Runtime := format_to_text.Get_NUT_Variable(UPS, 'battery.runtime')):
Runtime = 0

if Runtime:
Runtime_Y.append(float(Runtime) / 60.0)
Runtime_Y.pop(0)
Runtime_Y.append(float(Runtime) / 60.0)
Runtime_Y.pop(0)

Result['runtime_y'] = Runtime_Y
session[Target_Device]['runtime_y'] = Runtime_Y

Expand Down
2 changes: 1 addition & 1 deletion nutcase/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Config(object):
# region Core info
# ===================================================================================
APP_NAME = 'NUTCase'
APP_VERSION = '0.4.0.1'
APP_VERSION = '0.4.0.2'
UPDATE_HTML = ''
GITHUB_API_URL = "https://api.github.com/repos/ArthurMitchell42/nutcase/"

Expand Down
1 change: 1 addition & 0 deletions nutcase/pip_install_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pip install -U flake8
pip install -U coverage
pip install flask-sqlalchemy
pip install flask-migrate
pip install apscheduler
1 change: 1 addition & 0 deletions nutcase/pip_install_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ pip install -U flake8
pip install -U coverage
pip install flask-sqlalchemy
pip install flask-migrate
pip install apscheduler

0 comments on commit 7a91d9a

Please sign in to comment.