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 fc763b1..ecd6cd9 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 @@ -12,7 +12,7 @@ import { floatPipe } from 'src/utils/pipes.utils'; export default class ActiveStatus { isActive: boolean = false; currentSeconds: number = 0; - totalSeconds: number = Number(sessionStorage.getItem('active total seconds')) || 0; + totalSeconds: number = Number(sessionStorage.getItem('active-total-seconds')) || 0; intervalId!: NodeJS.Timeout; constructor(private storage: Storage) {} 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 a15a479..49484bb 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 @@ -12,7 +12,7 @@ import { floatPipe } from 'src/utils/pipes.utils'; export default class BalancingStatus { isBalancing: boolean = false; currentSeconds: number = 0; - totalSeconds: number = Number(sessionStorage.getItem('balancing total seconds')) || 0; + totalSeconds: number = Number(sessionStorage.getItem('balancing-total-seconds')) || 0; intervalId!: NodeJS.Timeout; constructor(private storage: Storage) {} 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 a529a6c..5cc4173 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 @@ -1,7 +1,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 { decimalPipe, floatPipe } from 'src/utils/pipes.utils'; import { GraphData } from 'src/utils/types.utils'; @Component({ @@ -32,7 +32,7 @@ export default class CellTempDisplay { ngOnInit() { this.storage.get(IdentifierDataType.CELL_TEMP_HIGH).subscribe((value) => { this.maxTemp = floatPipe(value.values[0]); - this.cellTempData.push({ x: new Date().getTime(), y: this.maxTemp }); + this.cellTempData.push({ x: decimalPipe(value.time), y: this.maxTemp }); }); this.storage.get(IdentifierDataType.CELL_TEMP_AVG).subscribe((value) => { this.avgTemp = floatPipe(value.values[0]); 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 546af14..84b4141 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 @@ -12,7 +12,7 @@ import { floatPipe } from 'src/utils/pipes.utils'; export default class ChargingStatusComponent { isCharging: boolean = false; currentSeconds: number = 0; - totalSeconds: number = Number(sessionStorage.getItem('charging total seconds')) || 0; + totalSeconds: number = Number(sessionStorage.getItem('charging-total-seconds')) || 0; intervalId!: NodeJS.Timeout; constructor(private storage: Storage) {} 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 2a08e8c..66db690 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 @@ -12,7 +12,7 @@ import { floatPipe } from 'src/utils/pipes.utils'; export default class FaultedStatus { isFaulted: boolean = false; currentSeconds: number = 0; - totalSeconds: number = Number(sessionStorage.getItem('faulted total seconds')) || 0; + totalSeconds: number = Number(sessionStorage.getItem('faulted-total-seconds')) || 0; intervalId!: NodeJS.Timeout; constructor(private storage: Storage) {} diff --git a/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.ts b/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.ts index a0ba3c5..6bc3140 100644 --- a/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.ts +++ b/angular-client/src/pages/charging-page/components/high-low-cell/high-low-cell-display/high-low-cell-display.component.ts @@ -36,12 +36,12 @@ export default class HighLowCellDisplay { this.storage.get(IdentifierDataType.VOLTS_LOW).subscribe((value) => { this.lowCellVoltage = decimalPipe(value.values[0], 3); this.delta = decimalPipe((this.highCellVoltage - this.lowCellVoltage).toFixed(3), 3); - this.lowVoltsData.push({ x: new Date().getTime(), y: this.lowCellVoltage }); + this.lowVoltsData.push({ x: decimalPipe(value.time), y: this.lowCellVoltage }); }); this.storage.get(IdentifierDataType.VOLTS_HIGH).subscribe((value) => { this.highCellVoltage = decimalPipe(value.values[0], 3); this.delta = decimalPipe((this.highCellVoltage - this.lowCellVoltage).toFixed(3), 3); - this.highVoltsData.push({ x: new Date().getTime(), y: this.highCellVoltage }); + this.highVoltsData.push({ x: decimalPipe(value.time), y: this.highCellVoltage }); }); } } 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 bf66db7..d3a3663 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,7 +1,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 { decimalPipe, floatPipe } from 'src/utils/pipes.utils'; import { GraphData } from 'src/utils/types.utils'; @Component({ @@ -31,7 +31,7 @@ export default class PackVoltageDisplay { ngOnInit() { this.storage.get(IdentifierDataType.PACK_VOLTAGE).subscribe((value) => { this.voltage = floatPipe(value.values[0]); - this.packVoltData.push({ x: new Date().getTime(), y: this.voltage }); + this.packVoltData.push({ x: decimalPipe(value.time), y: this.voltage }); }); } }