removing the Display from the designer causes them to fire and work as they should.
i’ve also noticed if i move the
display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10); from the generated code to the ProgramStated() after the addition of my other events, they fire just fine…:
i also noticed that if i rearrange the InitializeModules() to where the Display is the first one to be initialized causes the events to fire upon boot:
//original code
private void InitializeModules()
{
// Initialize GTM.Modules and event handlers here.
usbHost = new GTM.GHIElectronics.UsbHost(3);
sdCard = new GTM.GHIElectronics.SDCard(5);
display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);
}
and this one below works:
//Modified Code
private void InitializeModules()
{
// Initialize GTM.Modules and event handlers here.
display = new GTM.GHIElectronics.Display_T35(14, 13, 12, 10);
usbHost = new GTM.GHIElectronics.UsbHost(3);
sdCard = new GTM.GHIElectronics.SDCard(5);
}
unfortunately that is not a solution since that files gets generated automatically.
maybe GHI can check it out and let us know.
it’s very simple add the sd Card, USB Host, and TF35 Display, modules using the designer and create the sdCard and USBHost event listeners the usual way in the program started… and notice how the events don’t fire upon boot, now if you completely remove the display from the designer they will fire… next to try and shift the code in the Program.generated.cs as shown above and they will fire…
ah i forgot to mention that it works on Stand alone, meaning USB or Power Adapter … but it doesn’t fire when you DEBUG…
So if you hit Debug in VS your events won’t fire… but if you hit reset and the board restarts the events fire up as they should…
i used this in the SDCard Mount to see it fire when i’m not debugging.
Debug.Print("Mounted");
for (int i = 0; i < 100; i++)
{
PulseDebugLED();
Thread.Sleep(50);
}
Not here,
i uninstalled all SDK’s and reinstall them without any effect on the current issue…
i also noticed another rather weird thing.
if i leave my USB plugged in and plug my 12V 4A Adapter the screen goes white and the USB gets unloaded from windows. it makes the ding sound that the usb got unplugged… and sure enough VS2010 doesn’t detect it…
while this same adapter and same USB cable and port worked fine together yesterday…