page1
Server
Client
Loop
Set gate timer
Add read values to totals
1 second
passed since last
update?
Yes
No
Calculate averages
Calculate historical
totals
Calculate differentials
and diff totals
Read current, voltage
and temperatures
Check and update
charge stage
Show stats, also
debug stats if enabled
Check and zero
current offset (every hour)
Tune output level to
the required current
Update counters and totals
End
init
Runs when page is loaded
InitPlot
Draw the plot backgrounds
Start poll timer to periodically get
firmware data and update the UI
End
log
Runs from timer
Query the manager to get
the latest firmware stats
Check if the charger is charging
the battery by checking the mains
Parse out the current sensor offset
End
Extract and display the
current state on the bars
Update the plots with the
current state
Get the firmware data and draw
the bars once
Get the history and draw it. This
is done by loading/drawing chunks
start
Check required tools are installed
and if not install them
Get query data and respond
Listen for requests
(blocking call)
Parse request: evaluate
query and parameters