This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
First on the water test
#5
(2019-08-06, 09:06 AM)sideluxe Wrote:
Quote:Next problem is in opencpn plugin the 3 port controls all read 429496 and do not work properly. The 3 starboard 1, 10, 110 work properly.

In Standby the buttons turned in the wrong direction.
In AP active mode direction is correct.
probably old version of plugin


Hi Sean, 

i dont think its the version, i have the same error when using the latest avaiable plugin on my ubuntu 16.04 laptop. 
The windows version og the plugin works right.

I only use the plugin to open the calibrate settings, which other way round does not work within the windows plugin, so i did not start to dig for the error source.

Ahoi!

Good to hear someone can confirm this.
I'm taking a stab at fixing it  but it's going slow.
25 years ago was pretty good programmer but even then had minimal c++ experience.

I assume that the button is being created on line 284 of pypilot_pi/src/pypilotDialog.cpp.

  AddButton(-angles[negind], m_fgControlAnglesNeg);

If I change to:
  AddButton(-10, m_fgControlAnglesNeg);
The 3 negative boxes change to 429496.
Tried a few negative numbers and got the same.

If I change to:
  AddButton( 10, m_fgControlAnglesNeg);
The 3 negative boxes come up as 10 as I expected.

Suspecting AddButton.

Running windows is not an option for me.

John

(2019-08-18, 12:17 AM)johnm Wrote:
(2019-08-06, 09:06 AM)sideluxe Wrote:
Quote:Next problem is in opencpn plugin the 3 port controls all read 429496 and do not work properly. The 3 starboard 1, 10, 110 work properly.

In Standby the buttons turned in the wrong direction.
In AP active mode direction is correct.
probably old version of plugin


Hi Sean, 

i dont think its the version, i have the same error when using the latest avaiable plugin on my ubuntu 16.04 laptop. 
The windows version og the plugin works right.

I only use the plugin to open the calibrate settings, which other way round does not work within the windows plugin, so i did not start to dig for the error source.

Ahoi!

Good to hear someone can confirm this.
I'm taking a stab at fixing it  but it's going slow.
25 years ago was pretty good programmer but even then had minimal c++ experience.

I assume that the button is being created on line 284 of pypilot_pi/src/pypilotDialog.cpp.

  AddButton(-angles[negind], m_fgControlAnglesNeg);

If I change to:
  AddButton(-10, m_fgControlAnglesNeg);
The 3 negative boxes change to 429496.
Tried a few negative numbers and got the same.

If I change to:
  AddButton( 10, m_fgControlAnglesNeg);
The 3 negative boxes come up as 10 as I expected.

Suspecting AddButton.

Running windows is not an option for me.

John

Think I may have got it.

In AddButton changed %ld to %i.
Now angles buttons all display properly :-)
Not boat tested and may break 32 bit version.




void pypilotDialog::AddButton(int angle, wxSizer *sizer)
{
    if(m_sAPMode.Contains("wind"))
        angle = -angle;

/*    wxButton *button = new wxButton( this, wxID_ANY, wxString::Format("%ld", angle)); */
    wxButton *button = new wxButton( this, wxID_ANY, wxString::Format("%i", angle));
    button->Connect( wxEVT_COMMAND_BUTTON_CLICKED,
                     wxCommandEventHandler( pypilotDialog::OnControlAngle ), NULL, this );
    button->SetMaxSize(wxSize(60, -1));
    sizer->Add( button, 0, wxALL, 5 );
}
Reply


Messages In This Thread
First on the water test - by johnm - 2019-08-05, 12:21 AM
RE: First on the water test - by seandepagnier - 2019-08-05, 10:01 PM
RE: First on the water test - by johnm - 2019-08-06, 01:14 AM
RE: First on the water test - by sideluxe - 2019-08-06, 09:06 AM
RE: First on the water test - by johnm - 2019-08-18, 12:17 AM
RE: First on the water test - by skyeyedoc - 2019-08-27, 12:21 PM
RE: First on the water test - by johnm - 2019-09-06, 02:46 AM
RE: First on the water test - by CapnKernel - 2019-09-06, 04:56 AM
RE: First on the water test - by johnm - 2019-09-07, 06:13 PM
RE: First on the water test - by johnm - 2019-09-10, 07:22 PM
RE: First on the water test - by seandepagnier - 2019-08-18, 03:27 AM
RE: First on the water test - by seandepagnier - 2019-09-11, 12:30 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)