2024-06-07 11:56:57 +02:00
5 changed files with 13 additions and 52 deletions

View File

@@ -23,6 +23,7 @@ void Connectivity::connectWiFi(char* ssid, char* pass){
const char* getServerURL = "http://145.92.8.132:443/get-ip";
String ipAddress = ""; // string that will hold the server's IP address
/** Fetch the IP address of pepper from the server */
const char* Connectivity::fetchIPAddress() {
char* ipAddress = NULL; // Declare ipAddress as a char*
if (WiFi.status() == WL_CONNECTED) {
@@ -48,7 +49,7 @@ const char* Connectivity::fetchIPAddress() {
} else {
Serial.println("WiFi not connected");
}
return ipAddress; // Add this return statement
return ipAddress;
}
/** Send a POST request to a server with provided data */

View File

@@ -14,7 +14,7 @@
#include <ArduinoJson.h>
// declare the class Connectivity with all functions
class Connectivity {
public:
void connectWiFi(char* ssid, char* pass);

View File

@@ -1,4 +0,0 @@
package com.example.fitbot.ui.activities;
public class CompletionActivity {
}

View File

@@ -16,6 +16,5 @@ public class EndScreenActivity extends AppCompatActivity {
NavigationManager.hideSystemUI(this);
NavigationManager.setupButtonNavigation(this, R.id.homeButtonEndScreen, MainActivity.class);
NavigationManager.setupButtonNavigation(this, R.id.startButtonEndScreen, FitnessActivity.class);
}
}

View File

@@ -8,13 +8,14 @@
tools:context=".ui.activities.HelpActivity">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="800dp"
android:layout_height="450dp"
android:layout_height="wrap_content"
android:layout_marginStart="80dp"
android:layout_marginTop="24dp"
android:layout_marginTop="80dp"
android:background="@drawable/border_background"
android:orientation="vertical"
android:padding="16dp"
android:padding="40dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -26,8 +27,8 @@
android:layout_marginBottom="40dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
android:paddingVertical="15dp"
android:paddingHorizontal="20dp"
android:paddingVertical="15dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -59,34 +60,14 @@
android:textAlignment="center" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:background="@drawable/border_background_3"
android:orientation="vertical"
android:padding="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textViewScoreEndScreen"
style="@style/TextStyle"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="@string/score"
android:textAlignment="center"/>
</LinearLayout>
</LinearLayout>
<Button
android:id="@+id/homeButtonEndScreen"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginEnd="280dp"
android:layout_marginBottom="30dp"
android:layout_marginEnd="404dp"
android:layout_marginBottom="48dp"
android:background="@drawable/red_button_gradient"
android:drawableTop="@drawable/ic_baseline_home_48"
android:drawableTint="@color/white"
@@ -94,20 +75,4 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<Button
android:id="@+id/startButtonEndScreen"
android:layout_width="150dp"
android:layout_height="75dp"
android:layout_marginStart="280dp"
android:layout_marginBottom="30dp"
android:background="@drawable/red_button_gradient"
android:padding="15dp"
android:text="@string/start"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="30sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>