I am using a G120 microcontroller. I have two problems with my timers. The first problem is Gadgeeter timer is not working. The other problem is (and it is a critical issue for me) netmf timer is sleeping after a while. What is my mistake?
Gadgeeter Timer code:
GT.Timer t2 = new GT.Timer(500, GT.Timer.BehaviorType.RunContinuously);
t2.Tick += new GT.Timer.TickEventHandler(main_Tick);
t2.Start();
class TimerCls
{
public DateTime generalCheckTask;
public DateTime gsmSendTask;
public DateTime satSendTask;
public DateTime gsmSendTaskNew;
public DateTime satSendTaskNew;
public DateTime checkInputTask;
}
TimerCls cls = new TimerCls();
cls.generalCheckTask = new DateTime();
cls.gsmSendTask = new DateTime();
cls.satSendTask = new DateTime();
cls.gsmSendTaskNew = new DateTime();
cls.satSendTaskNew = new DateTime();
cls.checkInputTask = new DateTime();
without seeing more code to understand how you start things and how you know they’ve stopped, I suspect you have been GCed. How long before this apparent stop occurs (that’s a pretty important factor you should be looking at). What does debug output show you at that time (another important debugging step).
sorry, it’s worth reducing your code to a simple example that proves your issue and post it here. And you still need to answer what you use to think it stops, and show debugging output.
Gadgeteer is long gone and it is not supported as of years ago but we will try to help as much as possible. To do so, the we (and the community) need small example that they can see and try to determine what might be wrong., Most of us here no longer have VS2013/gadgeteer installed on our machines and we have no way of trying it.
… or just upgrade to SITCore and enjoy the latest and greatest with full support