Skip to content

Commit

Permalink
Merge pull request #313 from nicolas-f/pushbeta
Browse files Browse the repository at this point in the history
Push beta
  • Loading branch information
nicolas-f authored Jun 30, 2020
2 parents 0f587a9 + cfe3197 commit 7bbd771
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ android {
applicationId "org.noise_planet.noisecapture"
minSdkVersion 15
targetSdkVersion 28
versionCode 49
versionName "1.2.13"
versionCode 50
versionName "1.2.14"
// Store build date in apk
buildConfigField "long", "TIMESTAMP", System.currentTimeMillis() + "L"
buildConfigField "String", "GITHASH", "\"${getCheckedOutGitCommitHash().toString()}\""
Expand Down
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
android:label="@string/title_activity_calibration_history"/>
<activity android:name=".TrafficCalibrationActivity"
android:screenOrientation="portrait"
android:keepScreenOn="true"
android:label="@string/title_activity_calibration_traffic" />
</application>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public void run() {
public static final class ProgressHandler implements Handler.Callback {
private TrafficCalibrationActivity activity;
private int delay;
private int lastProgress = 0;

public ProgressHandler(TrafficCalibrationActivity activity) {
this.activity = activity;
Expand All @@ -304,7 +305,10 @@ public boolean handleMessage(Message msg) {
}
TrafficNoiseEstimator.Estimation estimation = trafficNoiseEstimator.getMedianPeak(laeq);
double percent = (estimation.numberOfPassby / (double) EXPECTED_NOISE_PEAKS) * 100.0;
activity.calibrationProgressBar.setProgress((int)percent);
if(lastProgress < (int)percent) {
activity.calibrationProgressBar.setProgress((int) percent);
lastProgress = (int) percent;
}
if(estimation.numberOfPassby >= EXPECTED_NOISE_PEAKS) {
activity.textStatus.setText(R.string.calibration_done_vehicle_passby);
activity.onEndMeasurement(new Storage.TrafficCalibrationSession(0,
Expand All @@ -313,7 +317,7 @@ public boolean handleMessage(Message msg) {
Double.valueOf(activity.inputDistance.getText().toString()),
System.currentTimeMillis()));
} else {
activity.textStatus.setText(activity.getString(R.string.calibration_awaiting_vehicle_passby,estimation.numberOfPassby, EXPECTED_NOISE_PEAKS));
activity.textStatus.setText(activity.getString(R.string.calibration_awaiting_vehicle_passby));
activity.timeHandler.sendEmptyMessageDelayed(delay, CALIBRATION_REFRESH_DELAY * 1000);
}
} else if(activity.calibration_step == CALIBRATION_STEP.PAUSED) {
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ track.geojson 1s Beispielmessungen. Nutzung des geojson-Formats (http://geojson.
<string name="calibration_manual_calibrator">Das Kalibrierverfahren erfordert die Verwendung eines Kalibriergeräts. Weitere Informationen finden Sie auf der <a href="org.noise_planet.noisecapture:///android_asset/html/help.html#smartphone_calibration">Hilfeseite</a> der Anwendung</string>
<string name="traffic_calibration">Kalibrierung mit Hilfe des Straßenverkehrs</string>
<string name="new_measurement">Neue Messung</string>
<string name="meters">Zähler</string>
<string name="km_h">km/h</string>
<string name="calibration_average_vehicle_speed">Geschätzte Fahrzeuggeschwindigkeit</string>
<string name="calibration_distance_vehicle">Abstand zum Fahrzeug</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ Utilice su propio smartphone para calibrar otros smartphones.</string>
<string name="calibration_manual_calibrator">El procedimiento de calibración requiere el uso de un calibrador. Para más información, consulte la <a href="org.noise_planet.noisecapture:///android_asset/html/help.html#smartphone_calibration">página de ayuda</a> de la aplicación</string>
<string name="traffic_calibration">La calibración con la ayuda del tráfico rodado</string>
<string name="new_measurement">Nueva medición</string>
<string name="meters">metros</string>
<string name="km_h">km/h</string>
<string name="calibration_average_vehicle_speed">Velocidad media estimada del vehículo</string>
<string name="calibration_distance_vehicle">Distancia del vehículo</string>
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,15 @@ track.geojson échantillons mesurés chaque seconde au format geojson (http://ge
<string name="auto_calibration_guest">Calibrer mon smartphone à partir d\'un autre smartphone déjà calibré avec NoiseCapture</string>
<string name="calibration_manual_ref">La procédure de calibrage nécessite l\'utilisation d\'un appareil de référence déjà calibré, comme un sonomètre. Rendez-vous sur la <a href="org.noise_planet.noisecapture:///android_asset/html/help_FR.html#smartphone_calibration">page d\'aide</a> de l\'application pour plus d\'informations.</string>
<string name="calibration_manual_calibrator">La procédure de calibrage nécessite l\'utilisation d\'un calibrateur acoustique. Rendez-vous sur la <a href="org.noise_planet.noisecapture:///android_asset/html/help_FR.html#smartphone_calibration">page d\'aide</a> de l\'application pour plus d\'informations.</string>
<string name="traffic_calibration">Calibration avec le trafic routier</string>
<string name="traffic_calibration">Calibrage avec le trafic routier</string>
<string name="new_measurement">Nouvelle session</string>
<string name="meters">mètres</string>
<string name="km_h">km/h</string>
<string name="calibration_average_vehicle_speed">Vitesse du véhicule</string>
<string name="calibration_distance_vehicle">Distance du centre de la voie</string>
<string name="calibration_manual_traffic">La position de mesure pour le calibrage doit être suffisamment proche de la route tout en assurant votre sécurité. La route doit être sèche et en bon état.</string>
<string name="title_activity_calibration_history">Sessions de calibration</string>
<string name="title_activity_calibration_traffic">Calibration avec le trafic</string>
<string name="title_activity_calibration_history">Sessions de Calibrage</string>
<string name="title_activity_calibration_traffic">Calibrage avec le trafic</string>
<string name="plusminus">±</string>
<string name="traffic_history_count">%d véhicules</string>
<string name="calibration_estimated_gain">Gain %.2f dB(A)</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@ track.geojson Campioni da 1 secondo delle misurazioni. In formato geojson (http:
<string name="calibration_manual_calibrator">La procedura di calibrazione richiede l\'utilizzo di un calibratore. Per ulteriori informazioni, consultare <a href="org.noise_planet.noisecapture:///android_asset/html/help.html#smartphone_calibration"> la pagina di aiuto </a> dell\'applicazione</string>
<string name="traffic_calibration">Calibrazione con l\'aiuto del traffico stradale</string>
<string name="new_measurement">Nuova misurazione</string>
<string name="meters">metri</string>
<string name="km_h">km/h</string>
<string name="calibration_average_vehicle_speed">Velocità media stimata del veicolo</string>
<string name="calibration_distance_vehicle">Distanza del veicolo</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-pt-rBR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ track.geojson Arquivo com amostras das medições, 1s. Formato geojson (http://
<string name="calibration_manual_calibrator">O procedimento de calibração requer o uso de um calibrador. Para mais informações, consulte a <a href="org.noise_planet.noisecapture:///android_asset/html/help.html#smartphone_calibration">página de ajuda</a> da aplicação</string>
<string name="traffic_calibration">Calibração com a ajuda do tráfego rodoviário</string>
<string name="new_measurement">Nova medição</string>
<string name="meters">metros</string>
<string name="km_h">km/h</string>
<string name="calibration_average_vehicle_speed">Velocidade média estimada do veículo</string>
<string name="calibration_distance_vehicle">Distância do veículo</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ track.geojson 1s samples of measures. Using the geojson format (http://geojson.i
<string name="calibration_manual_calibrator">校准程序需要使用校准器。更多信息,请参阅应用程序的<a href="org.noise_planet.noisecapture:///android_asset/html/help.html#smartphone_calibration">帮助页</a>面</string>
<string name="traffic_calibration">借助道路交通进行校准</string>
<string name="new_measurement">新的测量方法</string>
<string name="meters">米数</string>
<string name="km_h">km/h</string>
<string name="calibration_average_vehicle_speed">估计车速</string>
<string name="calibration_distance_vehicle">车距</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ track.geojson 1s samples of measures. Using the geojson format (http://geojson.i
<string name="plusminus">±</string>
<string name="traffic_history_count">%d vehicles</string>
<string name="calibration_estimated_gain">Gain %.2f dB(A)</string>
<string name="calibration_awaiting_vehicle_passby">Awaiting vehicle passing by (%d / %d)</string>
<string name="calibration_awaiting_vehicle_passby">Awaiting vehicle passing by</string>
<string name="calibration_add">Add</string>
<string name="calibration_done_vehicle_passby">End of calibration session touch Add button</string>
<string name="calibration_done_vehicle_passby">End of calibration session press button below</string>
</resources>

0 comments on commit 7bbd771

Please sign in to comment.