Skip to content

Commit

Permalink
add fan warning and convert bool to int
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamin-wilson committed Nov 1, 2023
1 parent 5316149 commit 02b98b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ <h2>Settings</h2>
</div>

<div class="form-group">
<label>Fan Speed {{form.controls['fanspeed'].value}}%</label>
<label>Fan Speed {{form.controls['fanspeed'].value}}% <b *ngIf="form.controls['fanspeed'].value < 33"
style="color:red">Danger: Could Cause Overheating</b> <b
*ngIf="form.controls['fanspeed'].value == 100" style="color:red">S19 Simulator</b></label>
<input formControlName="fanspeed" type="range" [min]="0" [max]="100">
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,10 @@ export class EditComponent {
form.frequency = parseInt(form.frequency);
form.coreVoltage = parseInt(form.coreVoltage);

// bools to ints
form.flipscreen = form.flipscreen == true ? 1 : 0;
form.invertscreen = form.invertscreen == true ? 1 : 0;
form.invertfanpolarity = form.invertfanpolarity == true ? 1 : 0;

this.systemService.updateSystem(form)
.pipe(this.loadingService.lockUIUntilComplete())
Expand Down

0 comments on commit 02b98b2

Please sign in to comment.