8000 Little suggestion for display STEREO symbol on FM · Issue #39 · goshante/ats20_ats_ex · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Little suggestion for display STEREO symbol on FM #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Jedrusia opened this issue Feb 6, 2025 · 3 comments
Open

Little suggestion for display STEREO symbol on FM #39

Jedrusia opened this issue Feb 6, 2025 · 3 comments

Comments

@Jedrusia
Copy link
Jedrusia commented Feb 6, 2025

Would it be possible to show the "Stereo" tag on the display in FM mode, e.g. as a graphic symbol of two letters "o" joined together in half? Something like this:
https://commons.wikimedia.org/wiki/File:Stereo.png

Thanks

@diqezit
Copy link
diqezit commented Apr 22, 2025

It is possible, but it requires more code - and the best way is to use the * symbol over the existing SYNC mode position.
As an option, can draw a graphical primitive ∞.
But I'm not sure that this library supports this font.

Let's stop at *, need to modify - after adding

#if USE_RDS
    showRDS();
#endif

// Check and update stereo status only if we are in FM, S-meter is off, RDS is not displayed and settings are not active.
if (g_currentMode == FM && !g_sMeterOn && !g_displayRDS && !g_settingsActive) 
{
    g_si4735.getCurrentReceivedSignalQuality(); // Get current signal data
    bool newStereoStatus = g_si4735.getCurrentPilot(); // Check the presence of stereo pilot tone

    // If the status has changed, update the flag and redraw the indicator
    if (g_stereoStatus != newStereoStatus)
    {
        g_stereoStatus = newStereoStatus;
        showModulation(); // Update the modulation display (including the indicator *)
    }
}

And replace the function

void showModulation()
{
    // Display mode name (FM, AM, SSB, etc.)
    oledPrint(g_bandModeDesc[g_currentMode], 0, 0, DEFAULT_FONT, g_cmdBand && g_currentMode == FM);

    // Do not display additional indicators (S/*) if the settings mode is active
    if (!g_settingsActive) {
        oled.setCursor(24, 0); // Set cursor for S/* indicator

        if (isSSB() && g_Settings[SettingsIndex::Sync].param == 1)
        {
            // Display 'S' for SSB Sync
            oled.print(“S”);
        }
        else if (g_currentMode == FM && g_stereoStatus)
        {
            // Display '*' for FM Stereo
            oled.print(“*”);
        }
        else
        {
            // In other cases (including AM or FM without stereo) print a space to clear the space
            oled.print(” ”);
        }
    } else {
         // If the settings are active, we should also clear the space, if there was something there.
         oled.setCursor(24, 0);
         oled.print(” ”);
    }

    showBandTag(); // Display Bandpass filter / BFO / etc.
}

Well so.. Only appears incorrect display of characters on the screen in AM mode (ssb etc), apparently somewhere where the text buffer is not cleared or incorrect order of rendering. So for now

@Jedrusia
Copy link
Author

Good solution, unfortunately I'm very bad at programming, so it would be great if someone could generate a *BIN file for me with the bootloader and pin A1 set to the battery level indicator.

Thank you.

@ColinPamplin
Copy link

I wonder how you managed to get that code to compile.
I get "text section exceeds available space in board."
Sketch uses 30792 bytes (100%) of program storage space. Maximum is 30720 bytes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
0