![]() |
How to write Notifier help!!
OK im trying to write a notifier class to cause a delay in my program where one task would be preformed after another with a specific delay.
I get to the part where i named what the notifier is but when the little box appears after i put the name then -> the box says Notifier(TimerEventHandler handler, void *param) Now i dont know whatvalues to put in or what any of this means Any documentation or code any one could give me to simply write a notifier would be much appreciated |
Re: How to write Notifier help!!
I'll post some help later tonight.
|
Re: How to write Notifier help!!
First you write a function that does whatever you want to do after the notifier delay. Say you want to activate a solenoid after the delay. The Notifier calls a function that takes a void pointer as an argument. We'll pass it a pointer to our solenoid and cast it back in the function so we can use it.
Here's the function: Code:
void SolenoidDelayEventHandler(void* param)Code:
//As a member of your robot class,Code:
solenoidNotifier.StartSingle(time);Any questions? |
Re: How to write Notifier help!!
Quote:
I just downloaded the WPILibSource20100107.zip because I am curious how they implemented the notifiers. Is that the latest library source from WPI as far as you know? THX! |
Re: How to write Notifier help!!
Quote:
As far as how notifiers work, they seem to work on an interrupt level (I'm assuming through a hardware timer run in the FPGA). This is just a guess from glancing over the header file; anyone can feel free to confirm or correct me here. |
Re: How to write Notifier help!!
I still need help with the notifier if anyone else has info
kinda close to ship date :eek: |
Re: How to write Notifier help!!
Quote:
http://first.wpi.edu/Images/CMS/Firs...te20100217.exe |
| All times are GMT -5. The time now is 13:54. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi