Skip to content

Commit

Permalink
fix net_amps to net_current
Browse files Browse the repository at this point in the history
one of the charts wouldn’t draw because i messed one variable.
  • Loading branch information
instanttim committed Oct 29, 2015
1 parent d6df3d7 commit 1de90a5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Web Server/js/charts.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ GNU General Public License at <http://www.gnu.org/licenses/>
for more details.
*/

/* global CONFIG */

// Common theme for all the charts.
if (typeof Highcharts !== 'undefined') {

Expand Down Expand Up @@ -934,7 +936,10 @@ function get_fndc_amps_vs_volts() {
/*global full_day_data */
var day_data_volts = [];
var day_data_amps = [];

var shunt_a_current = null;
var shunt_b_current = null;
var shunt_c_current = null;
var net_current = null;

for (var port in full_day_data[FNDC_ID]) {
for (i = 0; i < full_day_data[FNDC_ID][port].length; i++) {
Expand All @@ -943,7 +948,7 @@ function get_fndc_amps_vs_volts() {
shunt_c_current = parseFloat(full_day_data[FNDC_ID][port][i].shunt_c_current);
net_current = shunt_a_current + shunt_b_current + shunt_c_current;

day_data_amps[i] = [full_day_data[FNDC_ID][port][i].timestamp, net_amps];
day_data_amps[i] = [full_day_data[FNDC_ID][port][i].timestamp, net_current];
day_data_volts[i] = [full_day_data[FNDC_ID][port][i].timestamp, parseFloat(full_day_data[FNDC_ID][port][i].battery_voltage)];
}
}
Expand Down

0 comments on commit 1de90a5

Please sign in to comment.