Skip to content

Commit

Permalink
added voltage select for PCF8591
Browse files Browse the repository at this point in the history
  • Loading branch information
JavanXD committed Apr 21, 2020
1 parent 319f1a3 commit a78089c
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 37 deletions.
7 changes: 4 additions & 3 deletions dist/assets/i18n/translations_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@
"pressure": "Luftdruck",
"quality": "Luftgüte",
"scale": "Skalierungswert",
"selectI2CVoltage": "Spannung des Sensors auswählen",
"selectPin": "PIN des PCF8591 auswählen",
"selectType": "Auswahl des Sensormodells",
"sensor": "Sensor",
"sensor_0": "Temperatursensor (DS18b20)",
"sensor_1": "BME680 (Temperatur+Luftfeuchtigkeit+Luftdruck+Qualität)",
"sensor_2": "Gewichtssensor (A/D: HX711)",
"sensor_3": "Luftfeuchtigkeit und Temperatur (DHT)",
"sensor_2": "Gewichtssensor (HX711)",
"sensor_3": "Luftfeuchtigkeit und Temperatur (DHT22)",
"sensor_4": "Temperatursensor (MAX6675/MAX31855)",
"sensor_5": "BME280 (Temperatur+Luftfeuchtigkeit+Luftdruck)",
"sensor_6": "Voltmeter für die Batterie (A/D: PCF8591)",
"sensor_6": "Voltmeter für die Batterie (PCF8591)",
"sensors": "Sensoren",
"shutdownAfterTransfer": "Nach einmaliger Übertragung Raspberry herunterfahren",
"temperature": "Temperatur",
Expand Down
6 changes: 3 additions & 3 deletions dist/assets/i18n/translations_el_GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@
"sensor": "Αισθητήρας",
"sensor_0": "Αισθητήρας θερμοκρασίας (DS18b20)",
"sensor_1": "BME680 (θερμοκρασία + υγρασία + πίεση + ποιότητα)",
"sensor_2": "Αισθητήρας βάρους (A/D: HX711)",
"sensor_3": "Υγρασία και θερμοκρασία (DHT)",
"sensor_2": "Αισθητήρας βάρους (HX711)",
"sensor_3": "Υγρασία και θερμοκρασία (DHT22)",
"sensor_4": "Αισθητήρας θερμοκρασίας (MAX6675 / MAX31855)",
"sensor_5": "BME280 (θερμοκρασία + υγρασία + πίεση + ποιότητα)",
"sensor_6": "Βολτόμετρο για μπαταρία (A/D: PCF8591)",
"sensor_6": "Βολτόμετρο για μπαταρία (PCF8591)",
"sensors": "Αισθητήρες",
"shutdownAfterTransfer": "Κλείστε το Raspberry μετά από μία μεταφορά",
"temperature": "Θερμοκρασία",
Expand Down
7 changes: 4 additions & 3 deletions dist/assets/i18n/translations_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@
"pressure": "air pressure",
"quality": "indoor air quality",
"scale": "scale unit",
"selectI2CVoltage": "Select sensor voltage",
"selectPin": "Select PIN of the PCF8591",
"selectType": "Select type of sensor",
"sensor": "sensor",
"sensor_0": "Temperature sensor (DS18b20)",
"sensor_1": "BME680 (temperature+humidity+pressure+quality)",
"sensor_2": "Weight sensor (A/D: HX711)",
"sensor_3": "Humidity and temperature (DHT)",
"sensor_2": "Weight sensor (HX711)",
"sensor_3": "Humidity and temperature (DHT22)",
"sensor_4": "Temperature sensor (MAX6675/MAX31855)",
"sensor_5": "BME280 (temperature+humidity+pressure+quality)",
"sensor_6": "Voltmeter for Battery (A/D: PCF8591)",
"sensor_6": "Voltmeter for Battery (PCF8591)",
"sensors": "Sensors",
"shutdownAfterTransfer": "Shut down Raspberry after single transfer",
"temperature": "temperature",
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.fdf60dd00f66fa46b71f.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.050a12138dea002d8d91.js" defer></script></body>
</html>

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion src/app/components/sensors/sensors.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -380,11 +380,21 @@
<option [ngValue]="undefined" [translate]="'buttons.select' | translate: {value: 'PIN'}" disabled></option>
<option [ngValue]="0">AIN0</option>
<option [ngValue]="1">AIN1</option>
<option [ngValue]="2" [selected]="(!sensor.pin && sensor.pin !== 0)">AIN2 (default)</option>
<option [ngValue]="2">AIN2 (default)</option>
<option [ngValue]="3">AIN3</option>
</select>
</div>
</div>
<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>
</select>
</div>
</div>
</td>
</tr>
</ng-container>
Expand Down
32 changes: 16 additions & 16 deletions src/app/components/settings/gpio-field/gpio-field.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
<label for="{{ field_id }}">{{ label }}</label>
<select [(ngModel)]="field" id="{{ field_id }}" name="{{ field_id }}" (ngModelChange)="onChange($event)" class="custom-select" [required]="required">
<option [ngValue]="undefined" [translate]="'buttons.select' | translate: {value: 'GPIO'}"></option>
<option [value]="2" disabled>GPIO2 (reserved BME680 SDI/SDA)</option>
<option [value]="3" disabled>GPIO3 (reserved BME680 SCL/SCK)</option>
<option [value]="4" disabled>GPIO4 (reserved WittyPi)</option>
<option [value]="5" [disabled]="disabled_pins.includes(5)">GPIO5 (Default: HX711 DT)</option>
<option [value]="6" [disabled]="disabled_pins.includes(6)">GPIO6 (Default: HX711 SCK)</option>
<option [value]="2" disabled>GPIO2 (reserved I2C SDI/SDA)</option>
<option [value]="3" disabled>GPIO3 (reserved I2C SCL/SCK)</option>
<option [value]="4" [disabled]="disabled_pins.includes(4)">GPIO4 (reserved WittyPi)</option>
<option [value]="5" [disabled]="disabled_pins.includes(5)">GPIO5 (Default: HX711_1 DT)</option>
<option [value]="6" [disabled]="disabled_pins.includes(6)">GPIO6 (Default: HX711_1 SCK)</option>
<option [value]="7" [disabled]="disabled_pins.includes(7)">GPIO7</option>
<option [value]="8" [disabled]="disabled_pins.includes(8)">GPIO8</option>
<option [value]="9" [disabled]="disabled_pins.includes(9)">GPIO9 (Default: DHT11/22)</option>
<option [value]="9" [disabled]="disabled_pins.includes(9)">GPIO9 (Default: DHT22 / DS18b20 3.3V source)</option>
<option [value]="10" [disabled]="disabled_pins.includes(10)">GPIO10</option>
<option [value]="11" [disabled]="disabled_pins.includes(11)">GPIO11 (Default: DS18b20)</option>
<option [value]="11" [disabled]="disabled_pins.includes(11)">GPIO11 (Default: DS18b20 1-Wire)</option>
<option [value]="12" [disabled]="disabled_pins.includes(12)">GPIO12 (Default: HX711_2 DT)</option>
<option [value]="13" [disabled]="disabled_pins.includes(13)">GPIO13 (Default: HX711_2 SCK)</option>
<option [value]="14" [disabled]="disabled_pins.includes(14)">GPIO14</option>
<option [value]="15" [disabled]="disabled_pins.includes(15)">GPIO15</option>
<option [value]="14" [disabled]="disabled_pins.includes(14)">GPIO14 (reserved UART TX)</option>
<option [value]="15" [disabled]="disabled_pins.includes(15)">GPIO15 (reserved UART RX)</option>
<option [value]="16" [disabled]="disabled_pins.includes(16)">GPIO16 (Default: Button)</option>
<option [value]="17" disabled>GPIO17 (reserved WittyPi)</option>
<option [value]="17" [disabled]="disabled_pins.includes(17)">GPIO17 (reserved WittyPi)</option>
<option [value]="18" [disabled]="disabled_pins.includes(18)">GPIO18 (Default: MAX CLK)</option>
<option [value]="19" [disabled]="disabled_pins.includes(19)">GPIO19 (Default: MAX MISO)</option>
<option [value]="20" [disabled]="disabled_pins.includes(20)">GPIO20</option>
<option [value]="21" [disabled]="disabled_pins.includes(21)">GPIO21 (Default: LED)</option>
<option [value]="22" [disabled]="disabled_pins.includes(22)">GPIO22</option>
<option [value]="23" [disabled]="disabled_pins.includes(23)">GPIO23</option>
<option [value]="24" [disabled]="disabled_pins.includes(24)">GPIO24</option>
<option [value]="25" [disabled]="disabled_pins.includes(25)">GPIO25</option>
<option [value]="26" [disabled]="disabled_pins.includes(26)">GPIO26 (Default: MAX CS)</option>
<option [value]="27" [disabled]="disabled_pins.includes(27)">GPIO27 (Default: MAX CS2)</option>
<option [value]="22" [disabled]="disabled_pins.includes(22)">GPIO22 (Default: HX711_3 SCK)</option>
<option [value]="23" [disabled]="disabled_pins.includes(23)">GPIO23 (Default: HX711_4 DT)</option>
<option [value]="24" [disabled]="disabled_pins.includes(24)">GPIO24 (Default: HX711_4 SCK)</option>
<option [value]="25" [disabled]="disabled_pins.includes(25)">GPIO25 (Default: HX711_5 DT)</option>
<option [value]="26" [disabled]="disabled_pins.includes(26)">GPIO26 (Default: HX711_5 SCK / MAX CS)</option>
<option [value]="27" [disabled]="disabled_pins.includes(27)">GPIO27 (Default: HX711_3 DT / MAX CS2)</option>
</select>
2 changes: 2 additions & 0 deletions src/app/models/sensor.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,7 @@ export class Sensor {
pin_cs: number;
pin_clock: number;
max_type: number;
// PCF8591
I2CVoltage: number;

}
7 changes: 4 additions & 3 deletions src/assets/i18n/translations_de.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@
"pressure": "Luftdruck",
"quality": "Luftgüte",
"scale": "Skalierungswert",
"selectI2CVoltage": "Spannung des Sensors auswählen",
"selectPin": "PIN des PCF8591 auswählen",
"selectType": "Auswahl des Sensormodells",
"sensor": "Sensor",
"sensor_0": "Temperatursensor (DS18b20)",
"sensor_1": "BME680 (Temperatur+Luftfeuchtigkeit+Luftdruck+Qualität)",
"sensor_2": "Gewichtssensor (A/D: HX711)",
"sensor_3": "Luftfeuchtigkeit und Temperatur (DHT)",
"sensor_2": "Gewichtssensor (HX711)",
"sensor_3": "Luftfeuchtigkeit und Temperatur (DHT22)",
"sensor_4": "Temperatursensor (MAX6675/MAX31855)",
"sensor_5": "BME280 (Temperatur+Luftfeuchtigkeit+Luftdruck)",
"sensor_6": "Voltmeter für die Batterie (A/D: PCF8591)",
"sensor_6": "Voltmeter für die Batterie (PCF8591)",
"sensors": "Sensoren",
"shutdownAfterTransfer": "Nach einmaliger Übertragung Raspberry herunterfahren",
"temperature": "Temperatur",
Expand Down
6 changes: 3 additions & 3 deletions src/assets/i18n/translations_el_GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@
"sensor": "Αισθητήρας",
"sensor_0": "Αισθητήρας θερμοκρασίας (DS18b20)",
"sensor_1": "BME680 (θερμοκρασία + υγρασία + πίεση + ποιότητα)",
"sensor_2": "Αισθητήρας βάρους (A/D: HX711)",
"sensor_3": "Υγρασία και θερμοκρασία (DHT)",
"sensor_2": "Αισθητήρας βάρους (HX711)",
"sensor_3": "Υγρασία και θερμοκρασία (DHT22)",
"sensor_4": "Αισθητήρας θερμοκρασίας (MAX6675 / MAX31855)",
"sensor_5": "BME280 (θερμοκρασία + υγρασία + πίεση + ποιότητα)",
"sensor_6": "Βολτόμετρο για μπαταρία (A/D: PCF8591)",
"sensor_6": "Βολτόμετρο για μπαταρία (PCF8591)",
"sensors": "Αισθητήρες",
"shutdownAfterTransfer": "Κλείστε το Raspberry μετά από μία μεταφορά",
"temperature": "Θερμοκρασία",
Expand Down
7 changes: 4 additions & 3 deletions src/assets/i18n/translations_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,17 @@
"pressure": "air pressure",
"quality": "indoor air quality",
"scale": "scale unit",
"selectI2CVoltage": "Select sensor voltage",
"selectPin": "Select PIN of the PCF8591",
"selectType": "Select type of sensor",
"sensor": "sensor",
"sensor_0": "Temperature sensor (DS18b20)",
"sensor_1": "BME680 (temperature+humidity+pressure+quality)",
"sensor_2": "Weight sensor (A/D: HX711)",
"sensor_3": "Humidity and temperature (DHT)",
"sensor_2": "Weight sensor (HX711)",
"sensor_3": "Humidity and temperature (DHT22)",
"sensor_4": "Temperature sensor (MAX6675/MAX31855)",
"sensor_5": "BME280 (temperature+humidity+pressure+quality)",
"sensor_6": "Voltmeter for Battery (A/D: PCF8591)",
"sensor_6": "Voltmeter for Battery (PCF8591)",
"sensors": "Sensors",
"shutdownAfterTransfer": "Shut down Raspberry after single transfer",
"temperature": "temperature",
Expand Down

0 comments on commit a78089c

Please sign in to comment.