Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushithamsilva committed Jan 29, 2024
1 parent 7d4a170 commit 08ed09b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const ManagerProfile = () => {
if (response.ok) {
// for debugging
console.log("response OK", response);
refetchManagers();
} else {
await showErrorPopup("Error", "Please Try Again!");
}
Expand Down
10 changes: 6 additions & 4 deletions code/client/impax/src/components/StatusScreens/TeamExists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import styles from "./status.module.scss";
import Hero from "../Profile/Hero";
import { useSignupState } from "../../states/formState";
import { useNavigate } from "react-router-dom";
import Btn from "../Buttons/Btn";
import { FaRegCircleUser } from "react-icons/fa6";

const teamExists = () => {
const navigate = useNavigate();
Expand All @@ -15,16 +17,16 @@ const teamExists = () => {
<FaCheckCircle className={styles.icon} />
You already have an account!
</h2>
<button
<Btn
Icon={FaRegCircleUser}
onClick={() => {
setIsSignup(false);
navigate("/profile");
navigate("login/manager");
}}
type="submit"
className={styles.nextBtn}
>
Login
</button>
</Btn>
</div>
<Hero />
</main>
Expand Down
6 changes: 3 additions & 3 deletions code/client/impax/tests/dashboard_load_test/mqtt_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import random

# MQTT broker settings
broker_address = "localhost"
broker_address = "192.168.4.1"
broker_port = 1883

# Number of buddy devices
num_buddies = 5
num_buddies = 30

# Impact frequency (chance for a buddy to publish an impact each cycle)
impact_frequency = 10
Expand Down Expand Up @@ -58,7 +58,7 @@ def on_connect(client, userdata, flags, rc):
if random.random() < impact_frequency:
magnitude = random.randint(14, 100)
direction = random.choice(
["left", "right", "front", "back", "top", "bottom"])
["left", "right", "front", "back", "top", "bottom"]).capitalize()
topic = f"buddy/{client_id_str.split('_')[1]}/impact"
client.publish(
topic, f"{magnitude} {direction}", retain=True)
Expand Down

0 comments on commit 08ed09b

Please sign in to comment.