add fan warning and convert bool to int

This commit is contained in:
Ben 2023-10-31 20:00:58 -04:00
parent 5316149b26
commit 02b98b2112
2 changed files with 5 additions and 1 deletions

View File

@ -110,7 +110,9 @@
</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>

View File

@ -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())