diff --git a/gui/main.js b/gui/main.js
index 4539b780..ad327bbc 100644
--- a/gui/main.js
+++ b/gui/main.js
@@ -92,7 +92,8 @@ const configDefaultSettings = '{\
"tuning_range_fmax" : "50.0",\
"respond_to_cq" : "True",\
"rx_buffer_size" : "16", \
- "enable_explorer" : "False" \
+ "enable_explorer" : "False", \
+ "wftheme": 2 \
}';
if (!fs.existsSync(configPath)) {
diff --git a/gui/preload-main.js b/gui/preload-main.js
index 5f8a816e..f0721cd8 100644
--- a/gui/preload-main.js
+++ b/gui/preload-main.js
@@ -413,10 +413,13 @@ document.getElementById('openReceivedFilesFolder').addEventListener('click', ()
// Create spectrum object on canvas with ID "waterfall"
global.spectrum = new Spectrum(
"waterfall", {
- spectrumPercent: 0
+ spectrumPercent: 0,
+ wf_rows: 192 //Assuming 1 row = 1 pixe1, 192 is the height of the spectrum container
});
-
+ //Set waterfalltheme
+ document.getElementById("wftheme_selector").value = config.wftheme;
+ spectrum.setColorMap(config.wftheme);
// on click radio control toggle view
// disabled
@@ -1120,9 +1123,17 @@ document.getElementById('hamlib_rigctld_stop').addEventListener('click', () => {
config.theme = theme;
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
+ });
+
+ // Waterfall theme selector changed
+ document.getElementById("wftheme_selector").addEventListener("change", () => {
+ var wftheme = document.getElementById("wftheme_selector").value;
+ spectrum.setColorMap(wftheme);
+ config.wftheme = wftheme;
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
});
- // Update channel selector clicked
+ // Update channel selector clicked
document.getElementById("update_channel_selector").addEventListener("click", () => {
config.update_channel = document.getElementById("update_channel_selector").value;
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
diff --git a/gui/src/index.html b/gui/src/index.html
index c957f0fc..b76f107b 100644
--- a/gui/src/index.html
+++ b/gui/src/index.html
@@ -1192,6 +1192,17 @@
+
Waterfall Theme
+
+
Update channel