Welcome, Guest. Please Login or Register
Home Help Search Login Register
Pages: 1 2 
Send Topic Print
Step-by-step developer guide (Read 14870 times)
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #15 - 04/22/11 at 16:08:16
 
I don't know why Microsoft deprecates so much with every revision. Most of the warnings, though, are moot.
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #16 - 04/04/12 at 11:00:56
 
Hi Steve,

I found some code where in OCC milliseconds would be displayed in minutes and seconds... I would like to know if you can help me out with it on how to display milliseconds in days HH:mm:ss.ms?

ExposureTime is a value of x milliseconds...

This is what I found and slightly changed:


            Code (C++):
TimeEstimate = ExposureTime;
            TimeEstimateDays= ________________;
            TimeEstimateHours= ________________;
            TimeEstimateMinutes=(TimeEstimate/1000)/60;
            TimeEstimateSeconds=(TimeEstimate/1000)-(TimeEstimateMinutes*60);
            TimeEstimateMilliseconds= ________________;

            // days
            ________________;
            // hours
            ________________;
            // minutes
            dummy=TimeEstimateMinutes-(int(TimeEstimateMinutes/10)*10);
            PA_OutputText (1,18,5,"%d:",dummy);
            dummy=int((TimeEstimateMinutes-dummy)/10);
            PA_OutputText (1,17,5,"%d",dummy);
            // seconds
            dummy=TimeEstimateSeconds-(int(TimeEstimateSeconds/10)*10);
            PA_OutputText (1,21,5,"%d",dummy);
            dummy=int((TimeEstimateSeconds-dummy)/10);
            PA_OutputText (1,20,5,"%d",dummy);
            // milliseconds
            ________________; 



Any idea? Roll Eyes

Thanks in advance
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #17 - 05/04/12 at 11:21:35
 
Can't wait for your start! Smiley
Back to top
 
 
IP Logged
 
Steve Chapman
Ex Member


Re: Step-by-step developer guide
Reply #18 - 05/06/12 at 03:20:24
 
I was really hoping for more community participation with this. Maybe I could do a line-by-line commentary of the basic trigger program?
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #19 - 05/10/12 at 11:16:54
 
Well this would be something that is better than nothing Smiley
Back to top
 
 
IP Logged
 
Yogie
Ex Member


Re: Step-by-step developer guide
Reply #20 - 06/06/12 at 07:47:28
 
Quote:
I don't know why Microsoft deprecates so much with every revision. Most of the warnings, though, are moot.


Well the deprecation warning are not coming from the MS environment they are directly from the PAlib. All other warnings and errors I had could be eliminated by just changing the code a bit and following the instructions of the messages, for example...

REG_EXMEMCNT = ~0x8080;

is throwing an error and I found out writing it like this:

REG_EXMEMCNT &= ~(0x8080);      

is fine and does not give any error or warning anymore!

And I also have had a warning in the OCC main routine TakeAShot which I could eliminate, but this was just because you compared different data types to each other.
Back to top
 
 
IP Logged
 
Pages: 1 2 
Send Topic Print