Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kimata committed Nov 24, 2024
1 parent f55299d commit 508ac74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flask/src/rasp_water/webapp_valve.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,6 @@ def api_valve_ctrl():
@my_lib.flask_util.support_jsonp
@flask_cors.cross_origin()
def api_valve_flow():
return flask.jsonify({"cmd": "get", "flow": rasp_water.valve.get_flow()["flow"]})
config = flask.current_app.config["CONFIG"]

return flask.jsonify({"cmd": "get", "flow": rasp_water.valve.get_flow(config["flow"]["offset"])["flow"]})

0 comments on commit 508ac74

Please sign in to comment.