Skip to content

Commit

Permalink
readme updates, fixed out of bounds exception
Browse files Browse the repository at this point in the history
  • Loading branch information
retrodaredevil committed Apr 24, 2024
1 parent dd19d1d commit d36408c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Ready to install? Use the [Quickstart](https://solarthing.readthedocs.io/en/late

* Grafana (recommended)
* Use SolarThing Server (with CouchDB) alongside [Wild GraphQL Data Source](https://grafana.com/grafana/plugins/retrodaredevil-wildgraphql-datasource/)
* Documentation: https://solarthing.readthedocs.io/en/latest/quickstart/data/solarthing-server/index.html
* Alternatively, configure SolarThing to upload to InfluxDB for viewing of statistics in Grafana
* [SolarThing Android](https://play.google.com/store/apps/details?id=me.retrodaredevil.solarthing.android)
* SolarThing Android connects directly to CouchDB to display data in a persistent notification
Expand Down
7 changes: 7 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# docker
This directory is used to contain `Dockerfile`s to build `solarthing` and `solarthing-server` docker images.

NOTE: If you are looking for documentation, go here: https://solarthing.readthedocs.io/en/latest/quickstart/install/docker.html



## Technical details about this directory

Note that this directory is designed to be separate from the state of a codebase at any given commit.
Even while building docker images for older SolarThing versions,
the latest files in this folder should be used to build those images.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import java.time.Duration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -99,6 +100,9 @@ public SolarThingBatteryEstimate(List<IdentificationCacheDataPacket<BatteryRecor

@GraphQLQuery
public @NotNull List<@NotNull DataNode<Double>> queryEstimate(@GraphQLArgument(name = "ratio") double ratio) {
if (data.isEmpty()) {
return Collections.emptyList();
}
var first = data.get(0);
var last = data.get(data.size() - 1);

Expand Down

0 comments on commit d36408c

Please sign in to comment.