Skip to content

Commit

Permalink
UI Changes, Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
dobrishinov committed Jun 10, 2024
1 parent ffa5eac commit c0d39c0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 37 deletions.
36 changes: 5 additions & 31 deletions PowerLinkESP/data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,17 +277,17 @@
}

.alert.voltage {
background-color: #f44336;
background-color: #ed6a60;
text-shadow: #000 1px 1px 5px;
}

.alert.current {
background-color: #1313fb;
background-color: #5e5ef3;
text-shadow: #000 1px 1px 5px;
}

.alert.power {
background-color: #08800f;
background-color: #619d65;
text-shadow: #000 1px 1px 5px;
}

Expand All @@ -304,7 +304,7 @@
}

.closebtn:hover {
color: black;
color: #c1c1c1;
}

#alarmsConfig {
Expand Down Expand Up @@ -1151,35 +1151,14 @@ <h2>Power Alarm</h2>
beep();
count++;
}
}, 250);
}, 350);
}

function stopBeeping(indicator) {
beeping = false;
clearInterval(beepInterval);
//document.getElementById(indicator).style.display = 'none';
}

// function beep() {
// console.log('Beep!');
// const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
// const oscillator = audioCtx.createOscillator();
// const gainNode = audioCtx.createGain();

// oscillator.connect(gainNode);
// gainNode.connect(audioCtx.destination);

// oscillator.type = 'square';
// oscillator.frequency.setValueAtTime(400, audioCtx.currentTime);
// gainNode.gain.setValueAtTime(1, audioCtx.currentTime);

// oscillator.start();
// setTimeout(() => {
// oscillator.stop();
// audioCtx.close();
// }, 100); // 100 milliseconds beep duration
// }

function addEventListeners(thresholdId, activateId, checkMoreId, checkLessId, beepCountId, valueObservable, type) {
const threshold = document.getElementById(thresholdId);
const activateCheckbox = document.getElementById(activateId);
Expand All @@ -1201,11 +1180,6 @@ <h2>Power Alarm</h2>
addEventListeners('thresholdVoltage', 'activateVoltage', 'checkMoreVoltage', 'checkLessVoltage', 'beepCountVoltage', voltage, 'voltage');
addEventListeners('thresholdCurrent', 'activateCurrent', 'checkMoreCurrent', 'checkLessCurrent', 'beepCountCurrent', current, 'current');
addEventListeners('thresholdPower', 'activatePower', 'checkMorePower', 'checkLessPower', 'beepCountPower', power, 'power');

// Make voltage, current, and power accessible from the console for testing
window.voltage = voltage;
window.current = current;
window.power = power;
</script>
</body>

Expand Down
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ PowerLinkESP revolutionizes the interaction with Nice-Power bench power supplies
- **Persistent Information Bar:** Access live information about voltage, current, and power on a persistent bottom bar.
- **Customizable History Range:** Set the history range in minutes for chart data.
- **Customizable Update Frequency:** Set the update frequency in milliseconds for chart data.
- **Customizable Threshold Alarms** Set custom threshold Alarm notifications with audible alerts when Voltage, Current, or Power reach specified values.
- **Customizable Threshold Alarms:** Set custom threshold Alarm notifications with audible alerts when Voltage, Current, or Power reach specified values.

### Network Configuration

Expand Down Expand Up @@ -93,8 +93,17 @@ When we scrolling the top display with values is hidden, but we have handy pinne

## Installation

1. **Clone the Repository:**
1. **Clone the Repository (Latest Version):**
[git clone https://github.com/yourusername/powerlink-esp.git](https://github.com/dobrishinov/PowerLinkESP.git)

**OR**

**Get the Latest Stable Release:**
- If you prefer a stable release, follow these steps:
- Visit the repository’s releases page.
- Look for the desired version (usually tagged as "Stable").
- Download the release package associated with that version.
- Extract the contents to your preferred location.

2. **Setup Arduino IDE:**
- Download and Install Arduino IDE:
Expand Down Expand Up @@ -182,13 +191,13 @@ There is two working modes:

Below is a list of upcoming features and enhancements:

:hourglass_flowing_sand: Update README regularly.
:heavy_check_mark: [Done] Added option to set the update frequency for the charts.

:heavy_check_mark: Added option to set the update frequency for the charts.
:heavy_check_mark: [Done] Added favicon with nice power icon.

:heavy_check_mark: Added favicon with nice power icon.
:heavy_check_mark: [Done] Added Alarm threshold notifications with audible alerts when Voltage, Current, or Power reach specified values..

:heavy_check_mark: Added Alarm threshold notifications with audible alerts when Voltage, Current, or Power reach specified values..
:hourglass_flowing_sand: Update README regularly.

:star: :rainbow: :star: Feel free to suggest new features or improvements by opening an issue or submitting a pull request. Your contributions are always welcome!

Expand Down

0 comments on commit c0d39c0

Please sign in to comment.