Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8371a4b0a | ||
|
|
f8ed7dfac4 | ||
|
|
5b0f0bef32 | ||
|
|
c207f5470a | ||
|
|
1002351f2d | ||
|
|
dd4cc41740 |
Vendored
+2
-1
@@ -49,8 +49,9 @@ node {
|
||||
if (env.BRANCH_NAME == "master" && release) {
|
||||
echo "Deploying to production server ..."
|
||||
withCredentials([sshUserPrivateKey(credentialsId: "mowesta-server-key", keyFileVariable: "KEYFILE")]) {
|
||||
// sh 'scp -i $KEYFILE site-ear/build/libs/site-ear-' + version + '.ear wildfly@apps-pro.nes.uni-due.de:/opt/wildfly-21-mowesta/standalone/deployments/mowesta.ear'
|
||||
sh 'scp -i $KEYFILE site-ear/build/libs/site-ear-' + version + '.ear wildfly@apps-pro.nes.uni-due.de:/opt/wildfly-21-mowesta/standalone/deployments/mowesta.ear'
|
||||
sh 'scp -i $KEYFILE android-app/build/outputs/apk/prod/release/*.apk wildfly@apps-pro.nes.uni-due.de:/opt/android/mowesta/'
|
||||
sh 'scp -i $KEYFILE android-app/build/outputs/bundle/prodRelease/*.aab wildfly@apps-pro.nes.uni-due.de:/opt/android/mowesta/'
|
||||
}
|
||||
} else if (env.BRANCH_NAME == "master" || env.BRANCH_NAME == "feat/auth") {
|
||||
echo "Deploying to beta server ..."
|
||||
|
||||
@@ -100,7 +100,7 @@ android {
|
||||
applicationId "com.mowesta.android.app"
|
||||
minSdkVersion 19
|
||||
targetSdkVersion 30
|
||||
versionCode 21
|
||||
versionCode 22
|
||||
versionName "${versionApp}"
|
||||
buildConfigField "long", "BUILD_TIME", System.currentTimeMillis() + "L"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
@@ -200,4 +200,7 @@ eclipse {
|
||||
}
|
||||
}
|
||||
|
||||
if (System.properties['android.keystore.password'] != null) {
|
||||
build.dependsOn "bundle"
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+4
-2
@@ -20,6 +20,7 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
import androidx.preference.PreferenceManager;
|
||||
|
||||
import com.google.android.exoplayer2.ui.AspectRatioFrameLayout;
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
@@ -56,10 +57,11 @@ public class AdvertiseDialogFragment extends BottomSheetDialogFragment {
|
||||
binding.setModel(model);
|
||||
binding.setLifecycleOwner(getViewLifecycleOwner());
|
||||
binding.videoView.setPlayer(model.getExoPlayer());
|
||||
binding.videoView.setResizeMode(AspectRatioFrameLayout.RESIZE_MODE_FILL);
|
||||
model.getClose().observe(getViewLifecycleOwner(), (v) -> { if (v) this.dismiss(); } );
|
||||
model.getOpen().observe(getViewLifecycleOwner(), (v) -> {
|
||||
if (v) {
|
||||
String url = "https://www.mowesta.com/2021/08/21/fair-experiment-bei-den-schlosslichtspielen-in-karlsruhe/";
|
||||
String url = "https://www.mowesta.com/2021/12/01/fair-experiment-bei-der-eiszeit-in-karlsruhe/";
|
||||
Intent i = new Intent(Intent.ACTION_VIEW);
|
||||
i.setData(Uri.parse(url));
|
||||
try {
|
||||
@@ -76,7 +78,7 @@ public class AdvertiseDialogFragment extends BottomSheetDialogFragment {
|
||||
|
||||
public boolean shouldShow(Context context) {
|
||||
long time = System.currentTimeMillis();
|
||||
if (time > 1633298400000l) return false;
|
||||
if (time > 1643500800000l) return false;
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
|
||||
long last = prefs.getLong(KEY_ADVERTISEMENT, 0);
|
||||
return (time - last > 7 * 24* 60 * 60 * 1000);
|
||||
|
||||
@@ -40,14 +40,16 @@ import java.util.List;
|
||||
*/
|
||||
public class FavoritesFragment extends Fragment {
|
||||
|
||||
private static final String TAG_ADVERTISEMENT = "ad";
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setHasOptionsMenu(true);
|
||||
// possibly show the ad for schlosslichtspiele
|
||||
// possibly show the ad for eiszeit
|
||||
AdvertiseDialogFragment adf = new AdvertiseDialogFragment();
|
||||
if (adf.shouldShow(getContext())) {
|
||||
adf.show(getChildFragmentManager(), "ad");
|
||||
if (adf.shouldShow(getContext()) && getChildFragmentManager().findFragmentByTag(TAG_ADVERTISEMENT) == null) {
|
||||
adf.show(getChildFragmentManager(), TAG_ADVERTISEMENT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class AdvertiseViewModel extends AndroidViewModel {
|
||||
}
|
||||
};
|
||||
MediaSource videoSource = new ProgressiveMediaSource.Factory(df)
|
||||
.createMediaSource(MediaItem.fromUri("android_assets:///schlosslichtspiele.mp4"));
|
||||
.createMediaSource(MediaItem.fromUri("android_assets:///eiszeit.mp4"));
|
||||
exoPlayer.setRepeatMode(ExoPlayer.REPEAT_MODE_ALL);
|
||||
exoPlayer.setMediaSource(videoSource);
|
||||
exoPlayer.prepare();
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
<TextView
|
||||
android:text="@string/advertise_title"
|
||||
android:id="@+id/ad_title"
|
||||
android:textAppearance="?attr/textAppearanceBody1"
|
||||
android:textAppearance="?attr/textAppearanceHeadline3"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentTop="true"
|
||||
android:padding="8dp"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
@@ -83,7 +83,10 @@
|
||||
android:text="@string/advertise_more"
|
||||
android:textAppearance="?attr/textAppearanceBody1"
|
||||
android:layout_centerInParent="true"
|
||||
android:paddingTop="50dp"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textColor="@color/accent"
|
||||
@@ -96,9 +99,10 @@
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:textAppearance="?attr/textAppearanceBody2"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/white"
|
||||
android:textColor="@color/black"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"/>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -321,9 +321,9 @@
|
||||
<string name="color_dialog_green">Grün</string>
|
||||
|
||||
<string name="advertise_header">Veranstaltungshinweis</string>
|
||||
<string name="advertise_description">Mach mit beim FAIR Experiment vom 19. August bis zum 3. Oktober in Karlsruhe</string>
|
||||
<string name="advertise_description">Mach mit beim FAIR Experiment vom 25. November bis zum 30. Januar in Karlsruhe</string>
|
||||
<string name="advertise_more">Mehr erfahren…</string>
|
||||
<string name="advertise_title">Schlosslichtspiele 2021</string>
|
||||
<string name="advertise_title">EISZEIT</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
<string name="color_dialog_green">Green</string>
|
||||
|
||||
<string name="advertise_header">Event note</string>
|
||||
<string name="advertise_description">Join the FAIR Experiment from August 19th to October 3rd in Karlsruhe</string>
|
||||
<string name="advertise_description">Join the FAIR Experiment from November 25th to January 30th in Karlsruhe</string>
|
||||
<string name="advertise_more">Read more…</string>
|
||||
<string name="advertise_title">Schlosslichtspiele 2021</string>
|
||||
<string name="advertise_title">EISZEIT</string>
|
||||
</resources>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
#define WLAN_AP_PASSWORD "mowesta123456wifi"
|
||||
|
||||
// API-URL where measurements will be uploaded to
|
||||
//#define MOWESTA_UPLOAD_URL "https://www.mowesta.com/api/devices/current/measurements/now"
|
||||
#define MOWESTA_UPLOAD_URL "https://beta.mowesta.com/api/devices/current/measurements/now"
|
||||
#define MOWESTA_UPLOAD_URL "https://www.mowesta.com/api/devices/current/measurements/now"
|
||||
//#define MOWESTA_UPLOAD_URL "https://beta.mowesta.com/api/devices/current/measurements/now"
|
||||
#define MOWESTA_SOFTWARE_VERSION 2
|
||||
|
||||
// memory for json document
|
||||
@@ -179,7 +179,7 @@ void loop() {
|
||||
if (sensor_bmp.begin(BMP280_ADDRESS_ALT, BMP280_CHIPID)) {
|
||||
// Setup with default settings from datasheet.
|
||||
sensor_bmp.setSampling(Adafruit_BMP280::MODE_NORMAL, // Operating Mode.
|
||||
Adafruit_BMP280::SAMPLING_X2, // Temp. oversampling
|
||||
Adafruit_BMP280::SAMPLING_X16, // Temp. oversampling
|
||||
Adafruit_BMP280::SAMPLING_X16, // Pressure oversampling
|
||||
Adafruit_BMP280::FILTER_X16, // Filtering.
|
||||
Adafruit_BMP280::STANDBY_MS_500); // Standby time.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
Binary file not shown.
+1
-1
@@ -24,7 +24,7 @@ allprojects {
|
||||
|
||||
// set version for our project
|
||||
group = 'com.mowesta'
|
||||
version = '1.0.21'
|
||||
version = '1.0.22'
|
||||
|
||||
// set versions for our libraries
|
||||
ext {
|
||||
|
||||
@@ -75,6 +75,9 @@ swagger {
|
||||
}
|
||||
}
|
||||
|
||||
build.dependsOn("generateSwaggerDocumentation")
|
||||
publish.dependsOn("generateSwaggerDocumentation")
|
||||
|
||||
// add the swagger defintion to the artifacts published by this module
|
||||
publishing {
|
||||
publications {
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.mowesta.tool.model;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.mowesta.api.TimeRange;
|
||||
import com.mowesta.api.measurement.Measurement;
|
||||
import com.mowesta.api.measurement.MeasurementType;
|
||||
|
||||
public class FAIRKarlsruhe {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
File out = new File("karlsruhe");
|
||||
out.mkdirs();
|
||||
|
||||
|
||||
List<Long> devices = new ArrayList<>();
|
||||
// devices.add(41306043l);
|
||||
// devices.add(41306077l);
|
||||
// devices.add(41306087l);
|
||||
TimeRange range = new TimeRange(1629410400000l, 3888000000l);
|
||||
//
|
||||
// 8-15 sept
|
||||
// TimeRange range = new TimeRange(1631052000000l, 691200000l);
|
||||
|
||||
|
||||
devices.add(40549928l); // hmd
|
||||
devices.add(41236816l); // hmd
|
||||
devices.add(41238320l); // hmd
|
||||
|
||||
devices.add(41306043l); // esp 0
|
||||
devices.add(41306071l); // esp 1
|
||||
devices.add(41306077l); // esp 2
|
||||
devices.add(41306083l); // esp 3
|
||||
devices.add(41306087l); // esp 4
|
||||
devices.add(41306092l); // esp 5
|
||||
|
||||
|
||||
devices.add(41307981l); // markt
|
||||
devices.add(41310835l); // laser
|
||||
devices.add(41325252l); // schloss
|
||||
devices.add(42044973l); // schloss2
|
||||
|
||||
|
||||
// devices
|
||||
devices.add(41744821l); // Nexus 4
|
||||
devices.add(41744849l); // Nexus 4
|
||||
devices.add(41744861l); // Nexus 4
|
||||
devices.add(41751505l); // Nexus 5
|
||||
devices.add(41905035l); // HMD
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
MeasurementDownloader downloader = new MeasurementDownloader("nesexperiments", "nespass!!!", out, devices);
|
||||
downloader.download(range);
|
||||
|
||||
|
||||
List<List<Measurement>> data = new ArrayList<>();
|
||||
devices.forEach((dev)-> data.add(MeasurementAnalyzer.loadMeasurements(new File(out, "measurement-" + dev + ".json"))));
|
||||
data.forEach((dt)-> Collections.sort(dt, (a, b) -> Long.compare(a.getTime(), b.getTime())));
|
||||
final int[] counters = new int[devices.size()];
|
||||
long interval = 30 * 60 * 1000;
|
||||
long current = range.getStart();
|
||||
while (current < range.getEnd()) {
|
||||
System.out.print(new Date(current) + "; ");
|
||||
final long start = current;
|
||||
final long stop = current + interval;
|
||||
data.forEach((dt) -> {
|
||||
List<Measurement> ms = dt.stream().filter(m -> m.getTime() >= start && m.getTime() < stop).collect(Collectors.toList());
|
||||
if (ms.size() > 0 && (ms.get(0).getData().get(MeasurementType.BATTERY_CHARGING) == null || ms.get(0).getData().get(MeasurementType.BATTERY_CHARGING).equals("false"))) {
|
||||
double temp = ms.get(0).getTemperature();
|
||||
counters[data.indexOf(dt)] += 1;
|
||||
System.out.print(temp + "; ");
|
||||
// System.out.print(ms.get(0).getData().get(MeasurementType.STATION_TEMPERATURE) + "; ");
|
||||
} else {
|
||||
System.out.print("; ");
|
||||
}
|
||||
|
||||
});
|
||||
System.out.println();
|
||||
current += interval;
|
||||
}
|
||||
System.out.println(Arrays.toString(counters));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,6 +35,8 @@ war {
|
||||
}
|
||||
}
|
||||
|
||||
tasks['war'].dependsOn(project(":common-api").tasks["generateSwaggerDocumentation"])
|
||||
|
||||
// depend on wildfly task for testing
|
||||
test.dependsOn(project(":service-wildfly").tasks["build"])
|
||||
test.dependsOn(project(":service-ejb").tasks["copyTestLibraries"])
|
||||
|
||||
Reference in New Issue
Block a user