| 202 | } |
| 203 | |
| 204 | int SendForNextPlot() |
| 205 | { |
| 206 | |
| 207 | if(nbSendForNextPlot>0 && debug >2 ) cout << " ###### Warning more than 1 SendForNextPlot" << nbSendForNextPlot+1 << endl; |
| 208 | if(nbSendForNextPlot) return 0; |
| 209 | nbSendForNextPlot++; |
| 210 | |
| 211 | // to send a event to plot the date sheet. |
| 212 | // and out a timer to wait to the end of read.. |
| 213 | // every 25/ second.. = 1000/25 = 40 ms |
| 214 | if(NoMorePlot) |
| 215 | { |
| 216 | if(gwait ) |
| 217 | {usleep((useconds_t)(1e6*gwait)); Fin(0); } |
| 218 | |
| 219 | if((debug > 1)) cout << " send signal For Next plot, skip: No More Plot ! " << endl; |
| 220 | nbSendForNextPlot--; |
| 221 | return 0; |
| 222 | } |
| 223 | if((debug > 1)) cout << " Try to read read plot "<< endl; |
| 224 | // put a timer for wait to the end of read |
| 225 | glutTimerFunc(40,TimerNextPlot,40); |
| 226 | return 1; |
| 227 | } |
| 228 | static bool TryNewPlot( void ); |
| 229 | |
| 230 | |