-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
file organization, page layout change, and other stuff
- Loading branch information
1 parent
1555d92
commit 8d9d41b
Showing
48 changed files
with
231 additions
and
145 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const levelOne = document.getElementById("L1"); | ||
const levelTwo = document.getElementById("L2"); | ||
const levelThree = document.getElementById("L3"); | ||
const levelFour = document.getElementById("L4"); | ||
|
||
const levelList = [levelOne, levelTwo, levelThree, levelFour]; | ||
|
||
const coralText = document.getElementById("coralText"); | ||
levelList.map(level => { | ||
level.onmouseenter = () => { | ||
if(!coralSelected) { | ||
document.getElementById("coral").src = `coralLevelImages/coral${level.id}.png`; | ||
} | ||
} | ||
level.onmouseleave = () => { | ||
if(!coralSelected) { | ||
document.getElementById("coral").src = `coralLevelImages/coralNone.png`; | ||
} | ||
} | ||
level.onclick = () => { | ||
coralSelected = true; | ||
document.getElementById("coral").src = `coralLevelImages/coral${level.id}.png`; | ||
coralLevel = parseInt(level.id.slice(1)); | ||
coralText.innerText = `Coral Level: ${coralLevel}`; | ||
if(areaSelected) { | ||
confirmReefButton.innerText = `Score at Level ${level.id} and Area ${reefArea}`; | ||
} | ||
} | ||
}); | ||
|
||
|
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const scoreProcessor = async () => { | ||
console.log("scoring processor"); | ||
//communicate with network tables somehow | ||
await new Promise((resolve) => setTimeout(() => resolve(), 3000)); // Simulate asynchronous movement | ||
console.log("await done"); | ||
} |
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//robot coms part | ||
const moveToReefLocation = async (location) => { | ||
// Call a function to move the robot to the specified reef location | ||
// Replace the following line with your actual implementation | ||
console.log(`Moving robot to ${location}`); | ||
//communicate with network tables somehow | ||
await new Promise((resolve) => setTimeout(() => resolve(), 1500)); // Simulate asynchronous movement | ||
} | ||
|
||
const scoreReefLevel = async (level) => { | ||
console.log(`Scoring on level: ${level}`); | ||
//communicate with network tables somehow | ||
await new Promise((resolve) => setTimeout(() => resolve(), 1500)); // Simulate asynchronous movement | ||
} | ||
|
||
const scoreReef = async (location, level) => { | ||
await moveToReefLocation(location); | ||
await scoreReefLevel(level); | ||
} | ||
|
||
const getAlliance = async () => { | ||
let alliance = "Red"; //temporary | ||
//get alliance from networktables | ||
if(alliance == "Red") { | ||
document.body.style.background = "radial-gradient(circle at 50% 50%, pink, rgb(114, 114, 138))"; | ||
} else if(alliance == "Blue") { | ||
document.body.style.background = "radial-gradient(circle at 50% 50%, cornflowerblue, rgb(114, 114, 138))"; | ||
} | ||
} | ||
|
||
getAlliance(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.