Menu

Temp Probe 3 & .Net Framework error with Windows App 3.0.6.7

Dr_Ju_Ju
2020-11-16
2020-11-20
  • Dr_Ju_Ju

    Dr_Ju_Ju - 2020-11-16

    Hi Rob,

    I have a couple of issues with the latest firmware 334 & desktop app (using Rev 5 boards):

    The temp probe (3) is recognised by the system at boot time, but I'm not getting any readings from it. I've checked the R20 voltage etc. and the probes work ok on temp1\2 etc. so unless I've missed something in the docs, is there something I need to enable ??

    As for the App, I am constantly getting the .Net error below after a few minutes using the app

    See the end of this message for details on invoking
    just-in-time (JIT) debugging instead of this dialog box.

    ** Exception Text **
    System.ComponentModel.Win32Exception (0x80004005): The handle is invalid
    at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
    at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize)
    at myDewControllerPro3.myDewController.timer1_Tick(Object sender, EventArgs e)
    at System.Windows.Forms.Timer.OnTick(EventArgs e)
    at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    ** Loaded Assemblies **
    mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4250.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    myDewControllerPro3
    Assembly Version: 3.0.0.0
    Win32 Version: 3.0.0.0
    CodeBase: file:///C:/Users/Julian.Stone/AppData/Local/Apps/2.0/P2TOOCWH.PPQ/9BN509PT.APE/myde..tion_5f119df23ddd8283_0003.0000_1151ee1fd2e9d8b0/myDewControllerPro3.exe
    ----------------------------------------
    System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4200.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
    ----------------------------------------
    System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
    ----------------------------------------
    System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
    ----------------------------------------
    System.Windows.Forms.DataVisualization
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4200.0
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.DataVisualization/v4.0_4.0.0.0__31bf3856ad364e35/System.Windows.Forms.DataVisualization.dll
    ----------------------------------------
    Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
    ----------------------------------------
    System.Deployment
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
    ----------------------------------------

    ** JIT Debugging **
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.

    For example:

    <configuration>
    <system.windows.forms jitdebugging="true">
    </system.windows.forms></configuration>

    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.

    Julian

     
  • brownrb

    brownrb - 2020-11-16

    I am currently on a different system so can only answer part of this at this time. I will look the remaining issue very shortly today.

    Hi Julian
    If you can enable logging in the dew controller app, then wait for the error to happen, that would be a great help. The error seems to be related to copying a bitmap area, not sure where that is happening in the code though. I have no idea what you have enabled or disabled or configured or not configured so it is a little hard to speculate on what the issues are.

    It would also help to have a screenshot of the windows app when running so at least I can how you are running it. There are so many things that could be happening too, do you have auto refresh updates of values on etc, what is the timing intervals etc, the log file is very helpful in this regard.

    As you can appreciate, there is a lot of things going on and if I know what your configuration and firmware is, it means I can replicate that here and get to the bottom of the error. What firmware version are you using and what version of the windows app?

    Looking at the firmware 334
    void seteepromdefaults()
    where
    dewconfig.shadowch = 0
    meaning ch3 to track None (0)

    In the windows app setting you can set the mode of ch3 to use the tempprobe3 (which sets the value of dewconfig.shadowch to 4).
    This then should be remembered from that point on and saved to eeprom.

    I will think about creation of new firmware release to make things easier to config etc.

    Regards
    Robert

     
  • brownrb

    brownrb - 2020-11-17

    I believe that occurs in the Line Graph tab. I currently am unable to reproduce your issue.
    Are you using multiple desktops or desktop resolutions. I believe is probably related to what is happening with the screen at the time.

    When the controller app is running, it copies the current cursor location square box (around the cursor of about 340x340 pixels) into the bitmap on the dew controller line graph tab.

    The purpose of this is to inspect the graph points. However it looks like that is being invalidated by what or where your cursor was pointing at the time of the error.

    Without log files I cannot go any further into this particular issue.

     
  • brownrb

    brownrb - 2020-11-17

    Hi Julian
    I have made some changes which should fix both issues.

    Please see the recent uploaded firmware, pdf and windows application.

     
  • Dr_Ju_Ju

    Dr_Ju_Ju - 2020-11-17

    If they help, here are some logs, from when I just connected app to controller & left it

     
  • Dr_Ju_Ju

    Dr_Ju_Ju - 2020-11-17

    Just saw your message, I'll have a look on Thursday, as I have errands to run...

    Julian

     
  • brownrb

    brownrb - 2020-11-18

    Hi Julian
    in terms of the temperature probe3 issue,channel 3 would only occur upon a reset of the controller when it was changed to use the temperature probe3.

    I have updated the code now such that if the ch3 mode is changed to temperature probe3 from any other mode, then there is no need for a controller reset, and the code now invokes a search for the temperature probe3. I have also finetuned the way that temperature requests and readings are handled for ch3.

    Thank you for pointing the issues out. You will also note that I have changed the firmware configuration, hopefully to make this simpler. This configuration is in the file controllerconfig.h and is explained in detail on the new pdf.

    There are also quite a few other changes that occured in porting the code to the new configuration. Another improvement relates to the saving of changed data (in previous firmware this may not have occured depending on the type of change). All changes now invoke a 30s wait delay before changes are written to EEPROM.

    If you find any issues, please let me know,

    regards
    Robert

     
  • Dr_Ju_Ju

    Dr_Ju_Ju - 2020-11-19

    Hi Robert,

    Thanks for your help & the updates, All appears to be working, but I need to get my head around a few things....

    Temp. for channel 3 appears to be working'ish, I was expecting that even if Chnl 3 was in manual mode, the probe temp would still be displayed ??

    Also I've noticed that when Chnl 3 is in manual mode, the probe isn't recognised at boot time, with the initial boot screen just showing 2 probes and the fan probe, but it can be 'restored' by setting things back to probe.

     
  • brownrb

    brownrb - 2020-11-19

    Hi
    1.if Chnl 3 was in manual mode, the probe temp would still be displayed

    No. In manual mode, there is no need to read the temp probe. It is what it says. Manual. The power slide controls the temp output.

    1. Also I've noticed that when Chnl 3 is in manual mode, the probe isn't recognised at boot time, with the initial boot screen just showing 2 probes and the fan probe, but it can be 'restored' by setting things back to probe.

    That is correct. In manual mode, the probe is irrelevant. Only the output matters using the slider.

    Probe 3 is only used for ch3 when in the correct mode.
    In manual mode the slider controls the output

    Probe3 is typically used for eyepieces or finderscopes or focuser drawtubes before the imaging camera. where you want to just apply a bit of heat and not worry about having an extra probe.

    Cheers
    Robert

     
  • Dr_Ju_Ju

    Dr_Ju_Ju - 2020-11-20

    Thanks Robert,

    i thought it was probably my perceptions being way out....

    Yours, Julian

     
  • brownrb

    brownrb - 2020-11-20

    Or perhaps not enough documentation.

    I have updated the PDF with what I hope are clearer explanations on using Channel 3.

    regards
    Robert

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.