gabonator / DS203

DS203 quad oscilloscope firmware compatible with gcc
http://www.valky.eu/?data/hardware/ds203.txt
289 stars 86 forks source link

x10 Probe #8

Closed QuentinC closed 9 years ago

QuentinC commented 11 years ago

Hi,

First, thanks a lot for your work, it's great and very usefull, I'm gonna use it everytime ! But something else I've seen: setting the probe to x10 dont change anything on the screen display, shouldn't it show somethine 10 times higher than in x1 ?

Thanks !

Quentin

gabonator commented 11 years ago

I know about this issue, I was too lazy to implement all these functions :) I will fix it later

FR4NK5T3R commented 11 years ago

Hi Gabonator,

I notice there have been a few updates since I last installed the software. Has the X10 issue been resolved yet please

Thanks

Frank

gabonator commented 11 years ago

I am sorry, but this issue hasn't been resolved yet. I will close this issue when it will be fixed.

ghost commented 9 years ago

Hello everyone

As a new owner of the DSO203, I installed this firmware and I also noticed the bug. Since it is not fixed yet, I tried to fix fixed it. With my changes, the displayed resolution is automatically adapted depending on the probe scale factor.

I post the modifications here so that everyone can do them and I hope that they will be added to the current firmware

Source/Core/Settings.h :

[...]
    class AnalogChannel : public CSerialize
    {
    public:
        static const char* const ppszTextEnabled[];
        static const char* const ppszTextCoupling[];
        static const char* const ppszTextResolution[];
        static const char* const ppszTextResolution10[];
        static const char* const ppszTextResolution100[];
        static const char* const ppszTextResolution1000[];
        static const char* const* ppszTextResolutionByProbe[4];
        static const char* const ppszTextProbe[];
[...]

Source/Core/Settings.cpp :

[...]
/*static*/ const char* const CSettings::AnalogChannel::ppszTextResolution[] =
        {"50mV", "100mV", "200mV", "500mV", "1V", "2V", "5V", "10V"};
/*static*/ const char* const CSettings::AnalogChannel::ppszTextResolution10[] =
        {"500mV", "1V", "2V", "5V", "10V", "20V", "50V", "100V"};
/*static*/ const char* const CSettings::AnalogChannel::ppszTextResolution100[] =
        {"5V", "10V", "20V", "50V", "100V", "200V", "500V", "1000V"};
/*static*/ const char* const CSettings::AnalogChannel::ppszTextResolution1000[] =
        {"50V", "100V", "200V", "500V", "1000V", "2000V", "5000V", "10000V"};
/*static*/ const char* const* CSettings::AnalogChannel::ppszTextResolutionByProbe[4] = 
        {CSettings::AnalogChannel::ppszTextResolution, CSettings::AnalogChannel::ppszTextResolution10, CSettings::AnalogChannel::ppszTextResolution100, CSettings::AnalogChannel::ppszTextResolution1000};
[...]

Source\Gui\Oscilloscope\Input\ItemAnalog.h :

[...]
        if ( !HasFocus() )
        {
            x += BIOS::LCD::Print( x, y, clr, RGBTRANS, 
                CSettings::AnalogChannel::ppszTextResolutionByProbe[m_pInfo->Probe][ m_pInfo->Resolution ] );
            x += BIOS::LCD::Draw(x, y, clr, RGBTRANS, CShapes::per_div);
        } else
        {
            x -= 8;
            x += BIOS::LCD::Draw(x, y, clr, RGBTRANS, CShapes::sel_left);
            x += BIOS::LCD::Print(x, y, RGB565(ffffff), clr, 
                CSettings::AnalogChannel::ppszTextResolutionByProbe[m_pInfo->Probe][ m_pInfo->Resolution ] );
            x += BIOS::LCD::Draw(x, y, clr, RGBTRANS, CShapes::sel_right);
            x += BIOS::LCD::Draw(x, y, clr, RGBTRANS, CShapes::per_div);
        }
[...]

Source\Gui\Oscilloscope\Controls\OscInfo.h :

[...]
        x += BIOS::LCD::Print( x, y, Settings.CH1.u16Color, RGB565(000000), "CH1: " );
        x += BIOS::LCD::Print( x, y, RGB565(ffffff), RGB565(000000), 
            CSettings::AnalogChannel::ppszTextResolutionByProbe[Settings.CH1.Probe][Settings.CH1.Resolution]);  

        x = _x + 100;
        x += BIOS::LCD::Print( x, y, Settings.CH2.u16Color, RGB565(000000), "CH2: " );
        x += BIOS::LCD::Print( x, y, RGB565(ffffff), RGB565(000000), 
            CSettings::AnalogChannel::ppszTextResolutionByProbe[Settings.CH2.Probe][Settings.CH2.Resolution]);
[...]

Benjamin

FR4NK5T3R commented 9 years ago

Is it in the new code yet please?

QuentinC commented 9 years ago

Not yet, I've made a pull request from my fork: https://github.com/QuentinC/DS203 You can clone mine to have the probe (working well), but it isn't in the main repository yet !

FR4NK5T3R commented 9 years ago

Hi QuentinC I would really like to get X10 working on my DS203. Can you tell me how please

QuentinC commented 9 years ago

The updated binaries are in my rpo: https://github.com/QuentinC/DS203 ! I've sent a pull request !