Skip to content

Commit

Permalink
Merge pull request #157 from SUPLA/develop
Browse files Browse the repository at this point in the history
v2.3.29
  • Loading branch information
przemyslawzygmunt authored Mar 5, 2020
2 parents e3d2a4a + 17abadd commit 6b45782
Show file tree
Hide file tree
Showing 27 changed files with 56 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {
applicationId "org.supla.android"
minSdkVersion Integer.parseInt(project.ANDROID_BUILD_MIN_SDK_VERSION)
targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION)
versionCode 82
versionName "2.3.28"
versionCode 83
versionName "2.3.29"

sourceSets.main {
jniLibs.srcDir 'src/main/libs'
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/org/supla/android/db/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ public String getUnit() {
case SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER:
dUnit = "m\u00B3";
break;
case SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER:
dUnit = "GJ";
break;
}
return getUnit(dUnit);
}
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/java/org/supla/android/db/ChannelBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ public static String getFunctionName(int func, Context context) {
case SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER:
idx = R.string.channel_func_watermeter;
break;
case SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER:
idx = R.string.channel_func_heatmeter;
break;
case SuplaConst.SUPLA_CHANNELFNC_THERMOSTAT:
idx = R.string.channel_func_thermostat;
break;
Expand Down Expand Up @@ -498,6 +501,10 @@ && getFunc() != SuplaConst.SUPLA_CHANNELFNC_HUMIDITYANDTEMPERATURE)
img_idx = R.drawable.watermeter;
break;

case SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER:
img_idx = R.drawable.heatmeter;
break;

case SuplaConst.SUPLA_CHANNELFNC_THERMOSTAT:
switch (getAltIcon()) {
case 1:
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/org/supla/android/lib/SuplaConst.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class SuplaConst {
public final static int SUPLA_CHANNELFNC_IC_ELECTRICITY_METER = 315;
public final static int SUPLA_CHANNELFNC_IC_GAS_METER = 320;
public final static int SUPLA_CHANNELFNC_IC_WATER_METER = 330;
public final static int SUPLA_CHANNELFNC_IC_HEAT_METER = 340;
public final static int SUPLA_CHANNELFNC_THERMOSTAT = 400;
public final static int SUPLA_CHANNELFNC_THERMOSTAT_HEATPOL_HOMEPLUS = 410;
public final static int SUPLA_CHANNELFNC_VALVE_OPENCLOSE = 500;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,8 @@ private void SetDimensions() {
|| mFunc == SuplaConst.SUPLA_CHANNELFNC_ELECTRICITY_METER
|| mFunc == SuplaConst.SUPLA_CHANNELFNC_IC_ELECTRICITY_METER
|| mFunc == SuplaConst.SUPLA_CHANNELFNC_IC_GAS_METER
|| mFunc == SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER) {
|| mFunc == SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER
|| mFunc == SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER) {

width *= 2.8;

Expand Down Expand Up @@ -974,6 +975,7 @@ public void setChannelData(ChannelBase cbase) {
case SuplaConst.SUPLA_CHANNELFNC_IC_ELECTRICITY_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_GAS_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER:
case SuplaConst.SUPLA_CHANNELFNC_THERMOMETER:
case SuplaConst.SUPLA_CHANNELFNC_HUMIDITYANDTEMPERATURE:
case SuplaConst.SUPLA_CHANNELFNC_THERMOSTAT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ private DetailLayout getDetailLayout(ChannelBase cbase) {
case SuplaConst.SUPLA_CHANNELFNC_IC_ELECTRICITY_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_GAS_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER:

// TODO: Remove channel type checking in future versions. Check function instead of type. # 140-issue
if (cbase.getType() == SuplaConst.SUPLA_CHANNELTYPE_IMPULSE_COUNTER) {
Expand Down Expand Up @@ -197,6 +198,8 @@ private DetailLayout getDetailLayout(ChannelBase cbase) {
case SuplaConst.SUPLA_CHANNELFNC_IC_ELECTRICITY_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_GAS_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_WATER_METER:
case SuplaConst.SUPLA_CHANNELFNC_IC_HEAT_METER:

// TODO: Remove channel type checking in future versions. Check function instead of type. # 140-issue
if (cbase.getType() == SuplaConst.SUPLA_CHANNELTYPE_IMPULSE_COUNTER) {
mDetailLayout = new ChannelDetailIC(getContext(), this);
Expand Down
Binary file modified app/src/main/res/drawable/battery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/heatmeter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,5 @@
<string name="yes">Ano</string>
<string name="no">Ne</string>

<string name="channel_func_heatmeter">Měřič tepla</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,6 @@
<string name="current_production">Produktion im laufenden Monat</string>
<string name="production_acording_to_phases">Produktion nach Phase</string>
<string name="enter_superuser_credentials">Geben Sie die Superuser-Anmeldeinformationen ein</string>

<string name="channel_func_heatmeter">Wärmezähler</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-el/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@
<string name="production_acording_to_phases">Παραγωγή ανάλογα με τις φάσεις</string>
<string name="current_production">Παραγωγή τον τρέχοντα μήνα</string>
<string name="enter_superuser_credentials">Καταχωρίστε τα διαπιστευτήρια superuser</string>

<string name="channel_func_heatmeter">Μετρητής θερμότητας</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,6 @@
<string name="current_production">Producción en el mes actual</string>
<string name="production_acording_to_phases">Producción según fases</string>
<string name="enter_superuser_credentials">Entrez les informations d\'identification du superutilisateur</string>

<string name="channel_func_heatmeter">Medidor de calor</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,6 @@
<string name="current_production">Production dans le mois courant</string>
<string name="production_acording_to_phases">Production selon phases</string>
<string name="enter_superuser_credentials">Entrez les informations d\'identification du superutilisateur</string>

<string name="channel_func_heatmeter">Compteur de chaleur</string>
</resources>
4 changes: 3 additions & 1 deletion app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,7 @@
<string name="hp_error_5">Nincs hálózat megszakítás</string>
<string name="production_acording_to_phases">Fázis szerinti gyártás</string>
<string name="current_production">Termelés a folyó hónapban</string>
<string name="enter_superuser_credentials">Wprowadź poświadczenia głównego użytkownika</string>
<string name="enter_superuser_credentials">Írja be a fő felhasználó hitelesítő adatait</string>

<string name="channel_func_heatmeter">Hőmérő</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,6 @@
<string name="current_production">Produzione del mese corrente</string>
<string name="production_acording_to_phases">Produzione in base alle fasi</string>
<string name="enter_superuser_credentials">Immettere le credenziali del superutente</string>

<string name="channel_func_heatmeter">Contatore di calore</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-lt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,4 +184,6 @@
<string name="current_production">Gamyba einamąjį mėnesį</string>
<string name="production_acording_to_phases">Gamyba pagal fazes</string>
<string name="enter_superuser_credentials">Įveskite pagrindinio vartotojo kredencialus</string>

<string name="channel_func_heatmeter">Šilumos skaitiklis</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@
<string name="production_acording_to_phases">Produksjon i forhold til faser</string>
<string name="current_production">Produksjon i gjeldende måned</string>
<string name="enter_superuser_credentials">Skriv inn superbrukerens legitimasjon</string>

<string name="channel_func_heatmeter">Varmemåler</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-nl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@
<string name="production_acording_to_phases">Productie door fase</string>
<string name="current_production">Productie in de huidige maand</string>
<string name="enter_superuser_credentials">Voer de inloggegevens van de superuser in</string>

<string name="channel_func_heatmeter">Warmtemeter</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,4 +226,6 @@
<string name="no">Nie</string>
<string name="channel_func_none">Brak funkcji</string>

<string name="channel_func_heatmeter">Licznik ciepła</string>
<string name="zwave_select_channel">Wybierz kanał mostu z-wave, który chcesz skonfigurować.</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,6 @@
<string name="production_acording_to_phases">Produção de acordo com fase</string>
<string name="current_production">Produção no mês atual</string>
<string name="enter_superuser_credentials">Digite as credenciais do superusuário</string>

<string name="channel_func_heatmeter">Medidor de calor</string>
</resources>
4 changes: 3 additions & 1 deletion app/src/main/res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,7 @@
<string name="hp_error_5">Nu există întreruperi în rețea</string>
<string name="production_acording_to_phases">Producția conform fazelor</string>
<string name="current_production">Producția în luna curentă</string>
<string name="enter_superuser_credentials">Wprowadź poświadczenia głównego użytkownika</string>
<string name="enter_superuser_credentials">Introduceți datele de acreditare ale utilizatorului principal</string>

<string name="channel_func_heatmeter">Contorul de căldură</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,5 +212,6 @@
<string name="current_production">Производство в текущем месяце</string>
<string name="enter_superuser_credentials">Введите учетные данные суперпользователя</string>

<string name="channel_func_heatmeter">Теплосчетчик</string>
</resources>

2 changes: 2 additions & 0 deletions app/src/main/res/values-sk-rSK/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,6 @@
<string name="production_acording_to_phases">Výroba podľa fáz</string>
<string name="current_production">Výroba v aktuálnom mesiaci</string>
<string name="enter_superuser_credentials">Zadajte poverenia superužívateľa</string>

<string name="channel_func_heatmeter">Merač tepla</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values-sl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,6 @@
<string name="production_acording_to_phases">Izdelava v skladu s fazami</string>
<string name="current_production">Proizvodnja v tekočem mesecu</string>
<string name="enter_superuser_credentials">Vnesite poverilnice podupravitelja</string>

<string name="channel_func_heatmeter">Merilnik toplote</string>
</resources>
2 changes: 1 addition & 1 deletion app/src/main/res/values-sw600dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<dimen name="channel_layout_height">180dp</dimen>
<dimen name="channel_layout_button_width">150dp</dimen>
<dimen name="channel_dot_size">15dp</dimen>
<dimen name="channel_state_image_size">30dp</dimen>
<dimen name="channel_state_image_size">40dp</dimen>
<dimen name="channel_btn_text_size">27sp</dimen>
<dimen name="channel_caption_top_margin">25dp</dimen>
<dimen name="channel_caption_text_size">17sp</dimen>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<dimen name="channel_separator_text_margin">10dp</dimen>
<dimen name="channel_layout_button_width">100dp</dimen>
<dimen name="channel_dot_size">10dp</dimen>
<dimen name="channel_state_image_size">20dp</dimen>
<dimen name="channel_state_image_size">30dp</dimen>
<dimen name="channel_dot_margin">20dp</dimen>
<dimen name="channel_btn_text_size">18sp</dimen>
<dimen name="channel_caption_top_margin">18dp</dimen>
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,7 @@
<string translatable="false" name="ok">OK</string>
<string translatable="false" name="dots">....</string>

<string name="channel_func_heatmeter">Heat Meter</string>
<string translatable="false" name="zwave_select_channel">Select the z-wave bridge channel you want to configure.</string>

</resources>

0 comments on commit 6b45782

Please sign in to comment.