Skip to content

Commit

Permalink
improved pcf859
Browse files Browse the repository at this point in the history
  • Loading branch information
JavanXD committed May 6, 2020
1 parent 681e64c commit c635835
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 10 deletions.
4 changes: 3 additions & 1 deletion dist/assets/i18n/translations_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"compensationTempPlaceholder": "Temperaturwert (z.B. 22°C)",
"compensationValue": "Korrekturwert [Gramm pro °C]",
"compensationValuePlaceholder": "Kompensationswert",
"customValue": "Eigenen Wert eingeben...",
"debug": "Debug-Modus aktivieren <small>(keine Neustarts, HDMI-Ausgang an, erfolgreiche Übertragungen im Protokoll)</small>",
"enableCompensation": "Temperaturkompensation bei temperaturbedingten Messabweichungen",
"humidity": "Luftfeuchtigkeit",
Expand All @@ -135,7 +136,8 @@
"pressure": "Luftdruck",
"quality": "Luftgüte",
"scale": "Skalierungswert",
"selectI2CVoltage": "Spannung des Sensors auswählen",
"selectI2CVoltage": "Maximalen Messbereich auswählen [V]",
"selectI2CVoltage_c": "Maximal messbare Spannung [V] (z.B. 16.5V)",
"selectPin": "PIN des PCF8591 auswählen",
"selectType": "Auswahl des Sensormodells",
"sensor": "Sensor",
Expand Down
4 changes: 3 additions & 1 deletion dist/assets/i18n/translations_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"compensationTempPlaceholder": "Temperature value (e.g. 22°C)",
"compensationValue": "Correction value [grams per °C]",
"compensationValuePlaceholder": "compensation value",
"customValue": "Edit custom value...",
"debug": "Enable debug mode <small>(no restarts, HDMI output on, successful transfers in the protocol)</small>",
"enableCompensation": "Temperature compensation for temperature-induced measurement drifts",
"humidity": "humidity",
Expand All @@ -135,7 +136,8 @@
"pressure": "air pressure",
"quality": "indoor air quality",
"scale": "scale unit",
"selectI2CVoltage": "Select sensor voltage",
"selectI2CVoltage": "Select max voltage [V]",
"selectI2CVoltage_c": "max measureable voltage [V] (e.g. 16.5V)",
"selectPin": "Select PIN of the PCF8591",
"selectType": "Select type of sensor",
"sensor": "sensor",
Expand Down
2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
<script type="text/javascript" src="assets/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="assets/popper.min.js"></script>
<script type="text/javascript" src="assets/bootstrap-4.1.1/js/bootstrap.min.js"></script>
<script src="runtime.a8ef3a8272419c2e2c66.js" defer></script><script src="polyfills-es5.0403524440eca237b2d0.js" nomodule defer></script><script src="polyfills.99c72ddfec835065d29e.js" defer></script><script src="main.050a12138dea002d8d91.js" defer></script></body>
<script src="runtime.a8ef3a8272419c2e2c66.js" defer></script><script src="polyfills-es5.0403524440eca237b2d0.js" nomodule defer></script><script src="polyfills.99c72ddfec835065d29e.js" defer></script><script src="main.c32c93638cca89adb663.js" defer></script></body>
</html>

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions src/app/components/sensors/sensors.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -388,11 +388,23 @@
<div class="row">
<div class="form-group col-12 col-sm-6">
<label for="ic2_voltage" [translate]="'settings.sensors.selectI2CVoltage'"></label>
<select [(ngModel)]="sensor.I2CVoltage" id="ic2_voltage" name="ic2_voltage" class="custom-select" required>
<option [ngValue]="undefined" [translate]="'buttons.select' | translate: {value: 'VCC'}" disabled></option>
<option [ngValue]="3">3.3V</option>
<option [ngValue]="5">5V (default)</option>
<ng-container *ngIf="[undefined, 16.5, 25, 29.7].includes(sensor.I2CVoltage)">
<select [(ngModel)]="sensor.I2CVoltage" id="ic2_voltage" name="ic2_voltage" class="custom-select" required>
<option [ngValue]="undefined" [translate]="'buttons.select' | translate: {value: 'VCC'}" disabled></option>
<option [ngValue]="16.5">Max. 16.5V 3.3V&#215;(30k&#8486;&#247;7.5k&#8486;+1) (default)</option>
<option [ngValue]="25">Max. 25V 5V&#215;(30k&#8486;&#247;7.5k&#8486;+1)</option>
<option [ngValue]="29.7">Max. 29.7V 3.3V&#215;(40k&#8486;&#247;5k&#8486;+1)</option>
<option [ngValue]="null" style="font-style:italic"><em>{{'settings.sensors.customValue' | translate }}</em></option>
</select>
</ng-container>
<ng-container *ngIf="![undefined, 16.5, 25, 29.7].includes(sensor.I2CVoltage)">
<div class="input-group mb-3">
<input type="number" step="0.01" class="form-control" [(ngModel)]="sensor.I2CVoltage" id="ic2_voltage_c" name="ic2_voltage_c" placeholder="{{'settings.sensors.selectI2CVoltage_c' | translate }}" />
<div class="input-group-append">
<button class="btn btn-outline-secondary" (click)="sensor.I2CVoltage=undefined" type="button">X</button>
</div>
</div>
</ng-container>
</div>
</div>
</td>
Expand Down
4 changes: 3 additions & 1 deletion src/assets/i18n/translations_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"compensationTempPlaceholder": "Temperaturwert (z.B. 22°C)",
"compensationValue": "Korrekturwert [Gramm pro °C]",
"compensationValuePlaceholder": "Kompensationswert",
"customValue": "Eigenen Wert eingeben...",
"debug": "Debug-Modus aktivieren <small>(keine Neustarts, HDMI-Ausgang an, erfolgreiche Übertragungen im Protokoll)</small>",
"enableCompensation": "Temperaturkompensation bei temperaturbedingten Messabweichungen",
"humidity": "Luftfeuchtigkeit",
Expand All @@ -135,7 +136,8 @@
"pressure": "Luftdruck",
"quality": "Luftgüte",
"scale": "Skalierungswert",
"selectI2CVoltage": "Spannung des Sensors auswählen",
"selectI2CVoltage": "Maximalen Messbereich auswählen [V]",
"selectI2CVoltage_c": "Maximal messbare Spannung [V] (z.B. 16.5V)",
"selectPin": "PIN des PCF8591 auswählen",
"selectType": "Auswahl des Sensormodells",
"sensor": "Sensor",
Expand Down
4 changes: 3 additions & 1 deletion src/assets/i18n/translations_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"compensationTempPlaceholder": "Temperature value (e.g. 22°C)",
"compensationValue": "Correction value [grams per °C]",
"compensationValuePlaceholder": "compensation value",
"customValue": "Edit custom value...",
"debug": "Enable debug mode <small>(no restarts, HDMI output on, successful transfers in the protocol)</small>",
"enableCompensation": "Temperature compensation for temperature-induced measurement drifts",
"humidity": "humidity",
Expand All @@ -135,7 +136,8 @@
"pressure": "air pressure",
"quality": "indoor air quality",
"scale": "scale unit",
"selectI2CVoltage": "Select sensor voltage",
"selectI2CVoltage": "Select max voltage [V]",
"selectI2CVoltage_c": "max measureable voltage [V] (e.g. 16.5V)",
"selectPin": "Select PIN of the PCF8591",
"selectType": "Select type of sensor",
"sensor": "sensor",
Expand Down

0 comments on commit c635835

Please sign in to comment.