PhantomSDR Support Forum

General Category => General Discussion => Topic started by: Emmanuel SV1BTL on Dec 03, 2024, 08:18 AM

Title: Share your modifications
Post by: Emmanuel SV1BTL on Dec 03, 2024, 08:18 AM
Since the beginning of the project, there were many modifications until now. Some of them (e.g. Audio processing and AGC improvements by OH5HB), are already included in .git, but there are many others that they are published here in the forum, wonderful modifications made by NY4Q, HB9RYZ etc.
I invite you to share here every new try you've made, so to help each other getting new functions, or improvements. Some files will need to be personalized of course before re~compile, to fit the needs or the concept of every server's owner.
All this maybe will help our admin magicint1337 to create the newer huge upgrade of PhantomSDR.
Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 03, 2024, 08:26 AM
Starting sharing the latest App.svelte, located in /PhantomSDR-Plus/frontend/src, modified by NY4Q & HB9RYZ, with my minor modifications to fit my needs.App.svelte
Title: Re: Share your modifications
Post by: Bas ON5HB on Dec 03, 2024, 03:32 PM
Damn....I just altered mine to new looks.... :o

Oh well, I know how to do it now, so it should be pretty simple to change it again ;)

I set volume to 75%, as it's too low by default.
I changed AM bw to 4900 both instead of 5000 as the filtering isn't steep enough, so neighbour stations disturb too much.

And I believe the case band section should be removed and put into the onclick section, so you can set the lower/upper waterfall width directly for every button.
Far easier to maintain.
Title: Re: Share your modifications
Post by: Bas ON5HB on Dec 04, 2024, 02:51 PM
Simple way to compile Svelte.

apt install npm

then go here:

https://github.com/nodesource/distributions

after it should compile without problems.

npm run build

My latest GUI.

Schermafdruk op 2024-12-04 16-18-21.png

The code: https://github.com/Steven9101/frontend/compare/main...ON5HB:frontend:main
Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 04, 2024, 05:00 PM
Quotelet band;
let newFrequency = 0;
let newMode;
let currentBand = 40;

Your initial freq is on 80m. band, so maybe is better to change "let currentBand =" to "80" insteaf of "40"

It should read the TOML file, doesn't look like the backend sends that part.
But I change it. Thanks.

I changed let currentband = band now it starts like normal, showing the entire spectrum. Fixed ;D
Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 04, 2024, 05:01 PM
Anyone who can build buttons for Step Tuning?
Title: Re: Share your modifications
Post by: Phil - NY4Q on Dec 04, 2024, 06:33 PM
Quote from: Emmanuel SV1BTL on Dec 04, 2024, 05:01 PMAnyone who can build buttons for Step Tuning?

https://www.phantomsdr.fun/index.php?topic=114.0
Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 17, 2024, 08:33 AM
Two scripts for a date/clock:

1.- Format  Day/month/date/clock (https://svelte.dev/playground/4d96e4db232b476b80ab971cace7fb1b?version=3.38.2#H4sIAAAAAAAACoVSy27bMBD8lQVRVA4gv4LmotgGghZtfeipuVU9MOLKIkItBXJlxxX07wWthx8pUAIEpdnZnR1yG0GyRJGI72iMhYN1RolY5NqgF8mvRvCxCuEAiHggP1XVzO_RcMBepMd_4ZklRmIvErHymdMVb1JKWZeVdQwNWPpha2JoIXe2hKhLjB5TCrT5HL4hs6YdPBcIn2vnkBi-SEb4CM-6RHgiBT97zpZTAjDIkHXMQDyx1kB4OOVN7kJtDrvXnkzuYL2B5gRzZskzaGJ0e2lgDR552_9dM1P-vwq3MSwXi8Vdbyhlh1w7gttKBqUbZQb1scjpbM-dd03m1pWSGV0vvCU2s6GZr6fgJFKYy9pwFA9iB8RXJY8JRL6wjqO4g0tLXNyCHY_qEp3OBrCwtXuPlppqxgSi-6nSOz2W8JhZUu_xUGV5n0AujcezPUr5QwIqPPD6bHDWfU1uLjxkrObnsaKV56PBTZgCAJiF4ZOa0AXv0K8Xmb3unK1JTTNrrEuALOHjBcE6hW7qpNK1T-ChersI5pZ46vUfTGD56SpSoN4VnICs2V7AB63CvV6gbej01F-wOeUwOc2NwqEv9rBYnLNW88FeSiul95AZ6f06FaPPVPTer8KjzBgOqwlw29PnSu83QSGcIhaMbywSdjW2v9u__nQk-x8EAAA=)

2.- Analog clock (https://svelte.dev/playground/clock?version=5.14.1)

Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 18, 2024, 02:23 PM
Adjust brightness in every band.

In App.svelte the code will be this.
"let mwa" is min-waterfall. Every variable written in every "case" represents the min-waterfall control with slider. The value in the "Waterfall Control" slider, is not auto updated:

//Band selector
  let band;
  let mwa;
 let newFrequency;
 let newMode;
 let setMaxOffset;
 let currentBand = band; // Set to your startup band or the wrong band button will be highlighted.
 function setBand(band,newFrequency,newMode,setMaxOffset) {
   currentBand = band;
   frequencyInputComponent.setFrequency(newFrequency * 1e3);
   handleFrequencyChange({ detail: newFrequency * 1e3 });
   SetMode(newMode);

   let [l, m, r] = audio.getAudioRange();
   const [waterfallL, waterfallR] = waterfall.getWaterfallRange();
   const offset = ((m - waterfallL) / (waterfallR - waterfallL)) * waterfall.canvasWidth;
   m = Math.min(waterfall.waterfallMaxSize - 512, Math.max(512, m));
   l = Math.floor(m - 512);
   r = Math.ceil(m + 512);
   switch (band) {
     //some cases here

       case 40:
       l -= 19000;
       r += 13000;
       mwa = -30;
       break;

     //some more cases   
    }
   waterfall.setWaterfallRange(l, r);
   frequencyMarkerComponent.updateFrequencyMarkerPositions();
   updatePassband();
   waterfall.setMinOffset(mwa);
}
  //end Bands

#####

Then go to  // Waterfall magnification controls
and change:
case "min":
        l = 0;
        r = waterfall.waterfallMaxSize;
        waterfall.setMinOffset(-30);
        break;

This will allow you to return to default brightness when you zoom out.
Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 19, 2024, 02:38 PM
The final (?) setup of the App.svelte file, including ALL modifications made by dear members of this forum.

- Look up the current frequency in external sites and MW/SW databases,
- Date/clock,
- Improvements are made to the Callsign Lookup,
- Second initial window, which includes various information about the current WebSDR,
- Band selector,
- Custom band buttons with saved information of brightness used for each band,
- Second initial window, which includes various information about the current WebSDR,
- Various Step buttons,
- Wheel step buttons,
- Bookmarks with more saved information, like volume, squelch, brightness, filters
- and some other things, like FM modulation improvement.

Thank you all for your efforts, and I hope Stephen will find all these information useful, for his future huge upgrade.

(my modified files)
Updated App.svelte (25/12/2024) -
Updated topics:
- AutoAdjust is corrected
- Different setup for brightness for every band and back to default with "min"
- Wheel Step selector for each band
- Some SW Radio bands are added
Title: Re: Share your modifications
Post by: Emmanuel SV1BTL on Dec 19, 2024, 02:39 PM
(more modified files)

(update): Newer files uploaded (25/12/2024)
- new colors in waterfall (colormaps.js)
- updated settings for autoAdjust (waterfall.js)
- updated AGC (audioprocessing.cpp)
- FM audio improvements (audio.js)