Updated iMON (Soundgraph) LCD Driver (1 Viewer)

Status
Not open for further replies.

fetzbraun

Portal Member
July 30, 2005
25
0
Hello everybody,

it works pretty good. The backlight turns off when you turn mediaportal or your computer off. You have to set the hook at backlight in setup. But i cant see any icons?

Anyway thank you for that enhancement
 

cybrmage

Portal Pro
May 30, 2007
498
86
Home Country
Canada Canada
Kossan: the logs are in the "log" directory of the location where MediaPortal is installed. This is probable c:\Program Files\MediaPortal\log\

Johan: Your problem is NOT with the iMONLCDg driver!

2007-09-04 19:43:16.921875 [Info.][MPMain]: Main: MediaPortal is starting up
2007-09-04 19:43:16.937500 [Info.][MPMain]: Main: Assembly creation time: 2007-06-13 10:27:16 (UTC)
2007-09-04 19:43:16.937500 [Warn.][MPMain]: Main: MediaPortal is already running
2007-09-04 19:43:16.968750 [Info.][MPMain]: D3D: Restoring from tray

This indicates that you already have an instance of MediaPortal running... This instance does not have the externaldisplay drivers loaded... so your display will not work...

The other exceptions (Method not found) are thrown by audioscrobbler... not related to the iMONLCDg driver... This could be caused by either A) you are running a v0.2.3 build of MediaPortal with a plugin designed for v0.2.3, or B) that you are running a v0.2.2 build of MediaPortal with plugins designed for v0.2.3.

Your first step is to make sure that you shut down MediaPortal... the install the drivers, then run configure to configure the plugin, and then run MediaPortal to see the results. Try this and let us know what happens.


fetzbraun: A few questions... 1) what device (Antec, soundgraph, silverstone, etc...) do you have? 2) Are you using the latest (debug) version of the plugin? if so, please post your log file...

Regards,
cybrmage
 

fetzbraun

Portal Member
July 30, 2005
25
0
Hi cybrmage,

i use a soundgraph lcd in a silverstone ml-02 case. I got no display at all with the ProcessPlugins.dll.debug version (09_03_2007). But the display works with ProcessPlugins.dll.release. Here is the error.log:

<error.log>
2007-09-04 21:53:13.437500 [ERROR][MPMain]: Exception :confused:ystem.NullReferenceException: Object reference not set to an instance of an object.
at ProcessPlugins.ExternalDisplay.ExternalDisplay.Stop()
at MediaPortal.GUI.Library.PluginManager.Stop()
at MediaPortalApp.OnExit()
at MediaPortalApp.Main(String[] args)
2007-09-04 21:53:13.437500 [ERROR][MPMain]: Exception :Object reference not set to an instance of an object.
2007-09-04 21:53:13.437500 [ERROR][MPMain]: site :Void Stop()
2007-09-04 21:53:13.437500 [ERROR][MPMain]: source :processPlugins
2007-09-04 21:53:13.437500 [ERROR][MPMain]: stacktrace: at ProcessPlugins.ExternalDisplay.ExternalDisplay.Stop()
at MediaPortal.GUI.Library.PluginManager.Stop()
at MediaPortalApp.OnExit()
at MediaPortalApp.Main(String[] args)
2007-09-04 21:53:13.437500 [ERROR][MPMain]: MediaPortal stopped due 2 an exception Object reference not set to an instance of an object. ProcessPlugins at ProcessPlugins.ExternalDisplay.ExternalDisplay.Stop()
at MediaPortal.GUI.Library.PluginManager.Stop()
at MediaPortalApp.OnExit()
at MediaPortalApp.Main(String[] args)
</error.log>


Thanks for your help

Sorry for these icons! I dont know what i did to put theme there?! Dont care shoulb be an P and an S

If i use the ProcessPlugins.dll.release version i found this line in error.log.

2007-09-04 22:04:36.875000 [ERROR][ExternalDisplay]: ERROR in iMONLCD SendPixelArray
 

ralphy

Portal Pro
June 15, 2007
52
6
Home Country
If i use the ProcessPlugins.dll.release version i found this line in error.log.

2007-09-04 22:04:36.875000 [ERROR][ExternalDisplay]: ERROR in iMONLCD SendPixelArray

This somewhat cryptic error message of mine means that the pixel array size is of the wrong dimensions. In config, you need to set no more than 96 columns and 16 rows. The "TODO" list includes checking that the user does not exceed these dimensions, and if the user does, reset to a max of 96 and 16. Such a simple test (min(_grows,16) and min(_gcols,96), I can't think of why I didn't implement it already! cynbrmage has made some more changes, I am not sure if I have the latest source to make this minor change.
 

cybrmage

Portal Pro
May 30, 2007
498
86
Home Country
Canada Canada
Time for an updated version...

Added: simple display test ( On the configuration screen, click "Advanced"... the display will be activated according to the options that you have set, display two lines of test and flash all the icons, then the display will be deactivated.

Fixed: limit display size to 96 x 16 pixels.


Source and debug/release versions of the DLL are included...
 

JoeDalton

Retired Team Member
  • Premium Supporter
  • September 27, 2004
    425
    18
    55
    Belgium
    Home Country
    Belgium Belgium
    Excellent work guys:)

    Some remarks though...

    Why do you keep a static reference ('instance') to the driver instance? I guess you are implementing some kind of Singleton Pattern? IMO this is not needed. The only place where it is actually used is in the OpenLcd method where you start the update icon thread. You can use this.UpdateIcons there instead.

    Also, at shutdown, in CloseLcd you do not wait until the icon update thread is actually stopped. After setting stopUpdateIconThread to true you should implement
    Code:
    while(_iconThread.IsAlive)
      Thread.Sleep(100);
    Otherwise the icon update thread can crash when it is trying to set the icons on a closed display.

    If you think my comments are inappropriate, leave your remarks here. I will wait for an updated version to put it in SVN...

    Joe
     

    Kossan

    Portal Pro
    August 11, 2007
    94
    0
    Home Country
    Sweden Sweden
    Still no luck.

    I tried the Advanced button on plugin-setting page and the display blinks and show "testing something".
    But when starting MP it crashes.

    My error.log
    2007-09-05 18:44:44.657299 [ERROR][UpdateIconThread]: MediaPortal: Unhandled exception occured
    2007-09-05 18:44:44.660299 [ERROR][UpdateIconThread]: Exception :confused:ystem.IndexOutOfRangeException: Indexet låg utanför gränserna för matrisen.
    vid ProcessPlugins.ExternalDisplay.Drivers.iMONLCDg.UpdateIcons()
    vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    vid System.Threading.ThreadHelper.ThreadStart()
    2007-09-05 18:44:44.661299 [ERROR][UpdateIconThread]: Exception :Indexet låg utanför gränserna för matrisen.
    2007-09-05 18:44:44.661299 [ERROR][UpdateIconThread]: site :Void UpdateIcons()
    2007-09-05 18:44:44.662299 [ERROR][UpdateIconThread]: source :processPlugins
    2007-09-05 18:44:44.662299 [ERROR][UpdateIconThread]: stacktrace: vid ProcessPlugins.ExternalDisplay.Drivers.iMONLCDg.UpdateIcons()
    vid System.Threading.ThreadHelper.ThreadStart_Context(Object state)
    vid System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    vid System.Threading.ThreadHelper.ThreadStart()

    ProcessPlugins.dll.debug shows nothing.
     

    cybrmage

    Portal Pro
    May 30, 2007
    498
    86
    Home Country
    Canada Canada
    Still no luck.
    ProcessPlugins.dll.debug shows nothing.

    Please post your MediaPortal.log anyways... it may provide some clues.
    I'm looking into it... hopefully, i'll have something for you soon...


    Excellent work guys:)
    Why do you keep a static reference ('instance') to the driver instance?

    Actually, I put in the thread code by borrowing it from one of my other projects... and had not cleaned it up... I had meant to get back to it but other things came up... I have updated the code (as you sugested) to be of proper form.

    If you think my comments are inappropriate, leave your remarks here.
    I think your comments are inappropriate!! 8-} (Just Kidding!!)

    I will wait for an updated version to put it in SVN...
    I have attached an updated version appropriate for SVN commit for your perusal.


    Also , I have been looking at the RC component of the device, with view of getting a workable API built (and as a way of determining if a VFD or LCD display is being used)... So I have added some experimental (but safe to use) code to the driver... so that I can gather some device specific information.

    To gather the information:
    1) install the ProcessPlugin.dll (either debug or release)
    2) copy SG_RC.dll to your MediaPortal directory.
    3) run MediaPortal.
    4) stop MediaPortal.
    5) load the MediaPortal.log file and search for a line that starts with "IDisplay(API) iMONLCDg.Setup() RC TEST". If the line reads "RC TEST FAILED", you have not placed the SG_VFD.dll in the MediaPortal directory.
    6) please post the device that you have (i.e. Antec Fusion Black display or SoundGraph MFC51, etc...) and the values returned by the RC TEST.
    7) regardless of success or failure of the RC test, your display will function normally.

    I thank you, in advance, for taking the time to run the test and post the information.

    Regards,
    Cybrmage
     

    Johan

    Portal Pro
    April 19, 2006
    443
    11
    48
    Home Country
    Sweden Sweden
    Johan: Your problem is NOT with the iMONLCDg driver!

    2007-09-04 19:43:16.921875 [Info.][MPMain]: Main: MediaPortal is starting up
    2007-09-04 19:43:16.937500 [Info.][MPMain]: Main: Assembly creation time: 2007-06-13 10:27:16 (UTC)
    2007-09-04 19:43:16.937500 [Warn.][MPMain]: Main: MediaPortal is already running
    2007-09-04 19:43:16.968750 [Info.][MPMain]: D3D: Restoring from tray

    This indicates that you already have an instance of MediaPortal running... This instance does not have the externaldisplay drivers loaded... so your display will not work...

    The other exceptions (Method not found) are thrown by audioscrobbler... not related to the iMONLCDg driver... This could be caused by either A) you are running a v0.2.3 build of MediaPortal with a plugin designed for v0.2.3, or B) that you are running a v0.2.2 build of MediaPortal with plugins designed for v0.2.3.

    Your first step is to make sure that you shut down MediaPortal... the install the drivers, then run configure to configure the plugin, and then run MediaPortal to see the results. Try this and let us know what happens.


    Well there is at least something weird going on for me with the later version of imon driver.
    The latest version that is working for me is the version where the displays turns off when MP exits but not when it goes to standby.

    To show what I mean I have attached two pictures where I do the exact same thing.
    Playing the exact same mp3 but with different versions of the imon driver.

    The one where the "Now playing" window is not shown is the one with the latest driver.
    With this version I also only get "/" in the display instead of "artist / track"

    Also note that the track is actually playing but I can not stop without closing MP.
    Video is also not working at all.

    I installed the debug version for logging and made the same procedure again.
    logfiles are included. However with debug version I don't get anything at all in the display.

    I have also restarted and checked so I am not running double instances of MP.
    I can not find this warning message in the logfile this time either.
     

    Attachments

    • mp-imon.jpg
      mp-imon.jpg
      117.4 KB
    • mp-now playing.jpg
      mp-now playing.jpg
      124.9 KB
    Status
    Not open for further replies.

    Users who are viewing this thread

    Top Bottom