diff --git a/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html b/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html
index 3f8fedeb..77ba47d4 100644
--- a/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html
+++ b/angular-client/src/pages/charging-page/charging-page-mobile/charging-page-mobile.component.html
@@ -12,9 +12,6 @@
-
-
-
diff --git a/angular-client/src/pages/charging-page/components/active-status/active-status.component.ts b/angular-client/src/pages/charging-page/components/active-status/active-status.component.ts
index c47392f3..fc763b16 100644
--- a/angular-client/src/pages/charging-page/components/active-status/active-status.component.ts
+++ b/angular-client/src/pages/charging-page/components/active-status/active-status.component.ts
@@ -18,13 +18,14 @@ export default class ActiveStatus {
ngOnInit() {
this.storage.get(IdentifierDataType.BMS_MODE).subscribe((value) => {
+ const statusStateValue = floatPipe(value.values[0]);
if (this.isActive) {
- if (!(floatPipe(value.values[0]) === 2)) {
+ if (!(statusStateValue === 2)) {
this.isActive = false;
this.stopTimer();
this.resetCurrentSecs();
}
- } else if (floatPipe(value.values[0]) === 2) {
+ } else if (statusStateValue === 2) {
this.isActive = true;
this.startTimer();
}
diff --git a/angular-client/src/pages/charging-page/components/balancing-status/balancing-status.component.ts b/angular-client/src/pages/charging-page/components/balancing-status/balancing-status.component.ts
index eed11d4d..a15a4791 100644
--- a/angular-client/src/pages/charging-page/components/balancing-status/balancing-status.component.ts
+++ b/angular-client/src/pages/charging-page/components/balancing-status/balancing-status.component.ts
@@ -18,13 +18,14 @@ export default class BalancingStatus {
ngOnInit() {
this.storage.get(IdentifierDataType.STATUS_BALANCING).subscribe((value) => {
+ const statusBalancingValue = floatPipe(value.values[0]);
if (this.isBalancing) {
- if (!(floatPipe(value.values[0]) === 1)) {
+ if (!(statusBalancingValue === 1)) {
this.isBalancing = false;
this.stopTimer();
this.resetCurrentSecs();
}
- } else if (floatPipe(value.values[0]) === 1) {
+ } else if (statusBalancingValue === 1) {
this.isBalancing = true;
this.startTimer();
}
diff --git a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.html b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.html
index 9a69c583..ac952f2a 100644
--- a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.html
+++ b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.html
@@ -18,6 +18,10 @@
-
+
diff --git a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.ts b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.ts
index 3fd155d4..ad9483f5 100644
--- a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.ts
+++ b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-display/cell-temp-display.component.ts
@@ -2,6 +2,7 @@ import { Component, HostListener } from '@angular/core';
import Storage from 'src/services/storage.service';
import { IdentifierDataType } from 'src/utils/enumerations/identifier-data-type';
import { floatPipe } from 'src/utils/pipes.utils';
+import { GraphData } from 'src/utils/types.utils';
@Component({
selector: 'cell-temp-display',
@@ -14,10 +15,11 @@ export default class CellTempDisplay {
resetGraph: boolean = false;
resetGraphButton = {
onClick: () => {
- this.resetGraph = true;
+ this.cellTempData = [];
},
icon: 'restart_alt'
};
+ cellTempData: GraphData[] = [];
mobileThreshold = 1200;
isDesktop = window.innerWidth > this.mobileThreshold;
@@ -30,8 +32,8 @@ export default class CellTempDisplay {
ngOnInit() {
this.storage.get(IdentifierDataType.CELL_TEMP_HIGH).subscribe((value) => {
- this.resetGraph = false; //!!!! FOR REVIEW !!!!: is there a better way to do this reseting of the graph boolean?
this.maxTemp = floatPipe(value.values[0]);
+ this.cellTempData.push({ x: new Date().getTime(), y: this.maxTemp });
});
this.storage.get(IdentifierDataType.CELL_TEMP_AVG).subscribe((value) => {
this.resetGraph = false;
diff --git a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.html b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.html
index cb5371df..d3063595 100644
--- a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.html
+++ b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.html
@@ -1,2 +1,7 @@
-
-
+
diff --git a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.ts b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.ts
index 4504ad62..fe31f261 100644
--- a/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.ts
+++ b/angular-client/src/pages/charging-page/components/cell-temp/cell-temp-graph/cell-temp-graph.component.ts
@@ -1,6 +1,5 @@
import { Component, Input, OnInit } from '@angular/core';
import Storage from 'src/services/storage.service';
-import { IdentifierDataType } from 'src/utils/enumerations/identifier-data-type';
import { GraphData } from 'src/utils/types.utils';
@Component({
@@ -9,17 +8,7 @@ import { GraphData } from 'src/utils/types.utils';
styleUrls: ['./cell-temp-graph.component.css']
})
export default class CellTempGraph implements OnInit {
- cellTempData: GraphData[] = [];
- @Input() resetGraph: boolean = false;
- maxDataPoints = 100;
-
+ @Input() maxCellTempData: GraphData[] = [];
constructor(private storage: Storage) {}
- ngOnInit() {
- this.storage.get(IdentifierDataType.CELL_TEMP_HIGH).subscribe((value) => {
- if (this.resetGraph) {
- this.cellTempData = [];
- }
- this.cellTempData.push({ x: new Date().getTime(), y: parseInt(value.values[0]) });
- });
- }
+ ngOnInit() {}
}
diff --git a/angular-client/src/pages/charging-page/components/charging-state/charging-status.component.ts b/angular-client/src/pages/charging-page/components/charging-state/charging-status.component.ts
index 3a56a903..546af14a 100644
--- a/angular-client/src/pages/charging-page/components/charging-state/charging-status.component.ts
+++ b/angular-client/src/pages/charging-page/components/charging-state/charging-status.component.ts
@@ -19,13 +19,14 @@ export default class ChargingStatusComponent {
ngOnInit() {
this.storage.get(IdentifierDataType.CHARGING).subscribe((value) => {
+ const chargingControlValue = floatPipe(value.values[0]);
if (this.isCharging) {
- if (floatPipe(value.values[0]) === 1) {
+ if (chargingControlValue === 1) {
this.isCharging = false;
this.stopTimer();
this.resetCurrentSecs();
}
- } else if (floatPipe(value.values[0]) === 0) {
+ } else if (chargingControlValue === 0) {
this.isCharging = true;
this.startTimer();
}
diff --git a/angular-client/src/pages/charging-page/components/fault-display/fault-display.component.ts b/angular-client/src/pages/charging-page/components/fault-display/fault-display.component.ts
index 2acd5e10..813e6985 100644
--- a/angular-client/src/pages/charging-page/components/fault-display/fault-display.component.ts
+++ b/angular-client/src/pages/charging-page/components/fault-display/fault-display.component.ts
@@ -86,8 +86,6 @@ export default class FaultDisplay {
if (faultType === FaultType.BMS) {
faultName = this.getBMSFaultName(parseInt(faultValue));
}
- // current implementation doesn't need a specified case for charger faults
- // (they have indiv binary id's)
if (this.faults.length >= 50) {
this.faults.pop();
}
diff --git a/angular-client/src/pages/charging-page/components/faulted-status/faulted-status.component.ts b/angular-client/src/pages/charging-page/components/faulted-status/faulted-status.component.ts
index 45d308a3..2a08e8c0 100644
--- a/angular-client/src/pages/charging-page/components/faulted-status/faulted-status.component.ts
+++ b/angular-client/src/pages/charging-page/components/faulted-status/faulted-status.component.ts
@@ -18,13 +18,14 @@ export default class FaultedStatus {
ngOnInit() {
this.storage.get(IdentifierDataType.BMS_MODE).subscribe((value) => {
+ const statusStateValue = floatPipe(value.values[0]);
if (this.isFaulted) {
- if (!(floatPipe(value.values[0]) === 3)) {
+ if (!(statusStateValue === 3)) {
this.isFaulted = false;
this.stopTimer();
this.resetCurrentSecs();
}
- } else if (floatPipe(value.values[0]) === 3) {
+ } else if (statusStateValue === 3) {
this.isFaulted = true;
this.startTimer();
}
diff --git a/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.html b/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.html
index 7ca605b6..64a107a2 100644
--- a/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.html
+++ b/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.html
@@ -58,7 +58,6 @@
-
diff --git a/angular-client/src/pages/charging-page/components/pack-voltage/pack-voltage-display/pack-voltage-display.component.ts b/angular-client/src/pages/charging-page/components/pack-voltage/pack-voltage-display/pack-voltage-display.component.ts
index 8f8ee8db..2af03aec 100644
--- a/angular-client/src/pages/charging-page/components/pack-voltage/pack-voltage-display/pack-voltage-display.component.ts
+++ b/angular-client/src/pages/charging-page/components/pack-voltage/pack-voltage-display/pack-voltage-display.component.ts
@@ -1,5 +1,4 @@
import { Component, HostListener } from '@angular/core';
-import { waitForDebugger } from 'inspector';
import Storage from 'src/services/storage.service';
import { IdentifierDataType } from 'src/utils/enumerations/identifier-data-type';
import { floatPipe } from 'src/utils/pipes.utils';
diff --git a/scylla-server/src/socket/mock-proxy-client.ts b/scylla-server/src/socket/mock-proxy-client.ts
index 78f1374b..4e5a103d 100644
--- a/scylla-server/src/socket/mock-proxy-client.ts
+++ b/scylla-server/src/socket/mock-proxy-client.ts
@@ -304,7 +304,7 @@ export default class MockProxyClient implements ProxyClient {
index = this.getRandomIndex(this.mockData.length);
numericalData = this.mockData[index];
- // IF MORE THAN ONE VALUE IS GIVEN in the numerical data, it is assumed that only those values should be choosen from.
+ // if more than one value is given in the numerical data, it is assumed that only those values should be choosen from.
if (numericalData.vals.length > 1) {
numericalData.vals[0] = numericalData.vals[this.getRandomIndex(numericalData.vals.length)];
} else {