Klen
Member level 1
Sorry for the vague title, but I couldn`t think of anything! O
Well, my problem is as follows. I have a C++ project (regarding a Motion Simulator Unit). I wrote a thread which generates a PPS(pulse per second) from a FTDI Module. The moment I detect a rising edge of my PPS (and then succesively after every 20ms till the start of a new rising edge), I need to inform my main code of the detection and change a value therein. I have been looking at some windows functions like CreatEvent etc, but at the end of the day, it all leaves me more confused! Could anyone please lenmd me some badly needed help!
I will try rephrasing the question in a general way: If in a thread, a variable changes a value, how does one notify the main program (in a diferent .cpp file ofcourse) about the change? Would extern work or I have to use some event signalling? Any nudge in the right direction would be very much appreciated!
Regards
Klen
Well, my problem is as follows. I have a C++ project (regarding a Motion Simulator Unit). I wrote a thread which generates a PPS(pulse per second) from a FTDI Module. The moment I detect a rising edge of my PPS (and then succesively after every 20ms till the start of a new rising edge), I need to inform my main code of the detection and change a value therein. I have been looking at some windows functions like CreatEvent etc, but at the end of the day, it all leaves me more confused! Could anyone please lenmd me some badly needed help!
I will try rephrasing the question in a general way: If in a thread, a variable changes a value, how does one notify the main program (in a diferent .cpp file ofcourse) about the change? Would extern work or I have to use some event signalling? Any nudge in the right direction would be very much appreciated!
Regards
Klen