Skip to content

Commit 7f4bd01

Browse files
authored
Merge pull request #364 from Northeastern-Electric-Racing/Reversing-Cells
Reversing heat-map, 3 digit precision for voltages on cell view
2 parents e72037d + a0dd635 commit 7f4bd01

5 files changed

Lines changed: 24 additions & 6 deletions

File tree

angular-client/src/components/info-value-dispaly/info-value-display.component.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
<vstack spacing="0px" [style]="containerStyle()">
22
<hstack spacing="5px" [style]="valueUnitContainerStyle()">
33
@if (this.boolValue() !== undefined) {
4-
<typography variant="info-value" [content]="this.boolValue() ? 'YES' : 'NO'" />
4+
<typography variant="info-value" [content]="this.boolValue() ? 'YES' : 'NO'" [additionalStyles]="this.valueStyle()" />
55
<typography variant="info-unit" [content]="this.unit()" />
66
} @else {
7-
<typography variant="info-value" [content]="this.formattedValue" style="margin-bottom: -10px" />
7+
<typography
8+
variant="info-value"
9+
[content]="this.formattedValue"
10+
style="margin-bottom: -10px"
11+
[additionalStyles]="this.valueStyle()"
12+
/>
813
<typography variant="info-unit" [content]="this.unit()" />
914
}
1015

angular-client/src/components/info-value-dispaly/info-value-display.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export class InfoValueDisplayComponent implements OnInit, OnChanges {
3434
containerStyle = input<string>('');
3535
valueUnitContainerStyle = input<string>('');
3636
value = input<number>();
37+
valueStyle = input<string>('');
3738
boolValue = input<boolean>();
3839
precision = input<number>(1);
3940
subtitle = input<string>('');

angular-client/src/pages/bms-debug-page/components/cell-by-cell-heat-map/cell-by-cell-heat-map.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div style="padding-top: 20px"></div>
88
@if (this.view.toString() === 'Temperature') {
99
<hstack alignItems="end" justifyContent="end" spacing="1vw">
10-
@for (cell of betaCells; track cell) {
10+
@for (cell of betaCells.slice().reverse(); track cell) {
1111
<cell-tile
1212
[value]="cell.temp"
1313
[color]="this.getTempColor(cell.temp)"
@@ -31,7 +31,7 @@
3131
</hstack>
3232
} @else if (this.view.toString() === 'Voltage') {
3333
<hstack alignItems="end" justifyContent="end" spacing="1vw">
34-
@for (cell of betaCells; track cell) {
34+
@for (cell of betaCells.slice().reverse(); track cell) {
3535
<cell-tile
3636
[value]="this.averageVoltCellPair(cell)"
3737
[color]="this.getVoltColor(this.averageVoltCellPair(cell))"

angular-client/src/pages/bms-debug-page/components/cell-by-cell-heat-map/cell-by-cell-heat-map.component.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, effect, inject, input } from '@angular/core';
1+
import { Component, effect, inject, input, OnInit } from '@angular/core';
22
import { Segment } from 'src/utils/bms.utils';
33
import { Subscription } from 'rxjs';
44
import { HeatMapService, HeatMapView } from 'src/services/heat-map.service';
@@ -10,7 +10,7 @@ import { DropdownOption, SelectorConfig } from 'src/components/select-dropdown/s
1010
templateUrl: './cell-by-cell-heat-map.component.html',
1111
styleUrl: './cell-by-cell-heat-map.component.css'
1212
})
13-
export class CellByCellHeatMapComponent {
13+
export class CellByCellHeatMapComponent implements OnInit {
1414
private cellService = inject(CellService);
1515
private heatMapService = inject(HeatMapService);
1616
currentSegment = input.required<Segment>();
@@ -48,6 +48,10 @@ export class CellByCellHeatMapComponent {
4848
});
4949
}
5050

51+
ngOnInit(): void {
52+
this.alphaCells = this.cellService.getAlphaCellsBySegment(this.currentSegment());
53+
this.betaCells = this.cellService.getBetaCellsBySegment(this.currentSegment());
54+
}
5155
getTempColor = (value: number | undefined) => {
5256
if (value === undefined) {
5357
return 'grey';

angular-client/src/pages/bms-debug-page/components/cell-view/cell-view.component.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,46 @@
33
<hstack style="margin-top: -2vh" spacing="5vw">
44
<info-value-display
55
[value]="this.cellViewData?.cellNumbers?.[0]"
6+
valueStyle="fontSize: 30px;"
67
[subtitle]="this.getCellNumTitle()"
78
[precision]="0"
89
style="padding-top: 25px"
910
></info-value-display>
1011
<info-value-display
1112
[value]="this.cellViewData?.volt1"
13+
[precision]="3"
14+
valueStyle="fontSize: 30px;"
1215
unit="V"
1316
[subtitle]="this.getCellVoltageTitle()"
1417
style="margin-top: 0.8vh"
1518
></info-value-display>
1619
<info-value-display
1720
[boolValue]="this.cellViewData?.balancing1"
1821
[subtitle]="this.getBalancingTitle()"
22+
valueStyle="fontSize: 30px;"
1923
style="padding-top: 25px"
2024
></info-value-display>
2125
</hstack>
2226
<divider style="width: 25vw; margin-top: 3vh" />
2327
<hstack spacing="20px" spacing="5vw" style="margin-top: -1vh">
2428
<info-value-display
2529
[value]="this.cellViewData?.cellNumbers?.[1]"
30+
valueStyle="fontSize: 30px;"
2631
[subtitle]="this.getCellNumTitle()"
2732
style="padding-top: 25px"
2833
[precision]="0"
2934
></info-value-display>
3035
<info-value-display
3136
[value]="this.cellViewData?.volt2"
37+
valueStyle="fontSize: 30px;"
3238
unit="V"
3339
[subtitle]="this.getCellVoltageTitle()"
3440
style="margin-top: 0.5vh"
41+
[precision]="3"
3542
></info-value-display>
3643
<info-value-display
3744
[boolValue]="this.cellViewData?.balancing2"
45+
valueStyle="fontSize: 30px;"
3846
[subtitle]="this.getBalancingTitle()"
3947
style="padding-top: 25px"
4048
></info-value-display>

0 commit comments

Comments
 (0)