HTML: Add temperature and pressure curves to the JSON data.

Add more dive sample details to the JSON data.
This is not so optimized some zero values can be ignored.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-06-26 00:44:40 +03:00 committed by Dirk Hohndel
parent 60049941ba
commit f139eff590

View file

@ -64,7 +64,7 @@ void put_HTML_samples(struct membuffer *b, struct dive *dive)
put_string(b, "\"samples\":\[");
struct sample *s = dive->dc.sample;
for (i = 0; i < dive->dc.samples; i++) {
put_format(b, "[%d,%d],", s->time.seconds, s->depth.mm);
put_format(b, "[%d,%d,%d,%d],", s->time.seconds, s->depth.mm, s->cylinderpressure.mbar, s->temperature.mkelvin);
s++;
}
put_string(b, "],");