##// END OF EJS Templates
Ajout d'un paramètre à la fonction sendTimecodePeriodically()...
leroy -
r63:3581c05019b0 default
parent child
Show More
@@ -388,12 +388,8 void rmapplugin::connectPythonWrapper()
388 // TIMECODES
388 // TIMECODES
389 connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sig_sendOneTimecode()),
389 connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sig_sendOneTimecode()),
390 this->UI->starDundee, SLOT(sendOneTimecode()) );
390 this->UI->starDundee, SLOT(sendOneTimecode()) );
391 connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sig_sendTimecodePeriodically()),
391 connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sig_sendTimecodePeriodically(unsigned char)),
392 this->UI->starDundee, SLOT(sendTimecodePeriodically()) );
392 this->UI->starDundee, SLOT(startSendingTimecodePeriodically(unsigned char)) );
393 connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sig_sendOneTimePacketAndOneTimecode()),
394 this->UI->starDundee, SLOT(sendOneTimePacketAndOneTimecode()) );
395 connect( (rmappluginPythonWrapper*)this->pyObject, SIGNAL(sig_sendOneTimePacketAndTimecodePeriodically()),
396 this->UI->starDundee, SLOT(sendOneTimePacketAndTimecodePeriodically()) );
397 }
393 }
398
394
399
395
@@ -158,8 +158,10 void rmappluginPythonWrapper::sendOneTim
158 emit sig_sendOneTimecode();
158 emit sig_sendOneTimecode();
159 }
159 }
160
160
161 void rmappluginPythonWrapper::sendTimecodePeriodically()
161 void rmappluginPythonWrapper::sendTimecodePeriodically( unsigned int onOff )
162 {
162 {
163 emit sig_sendTimecodePeriodically();
163 unsigned char newOnOff;
164 newOnOff = (unsigned char) onOff;
165 emit sig_sendTimecodePeriodically( newOnOff );
164 }
166 }
165
167
@@ -43,7 +43,7 signals:
43 //*******************
43 //*******************
44 // TIMECODE SIGNALS
44 // TIMECODE SIGNALS
45 void sig_sendOneTimecode();
45 void sig_sendOneTimecode();
46 void sig_sendTimecodePeriodically();
46 void sig_sendTimecodePeriodically(unsigned char);
47
47
48 public slots:
48 public slots:
49 QList<QVariant> ReadSPW(unsigned int size=0);
49 QList<QVariant> ReadSPW(unsigned int size=0);
@@ -67,7 +67,7 public slots:
67 //*******************
67 //*******************
68 // TIMECODE FUNCTIONS
68 // TIMECODE FUNCTIONS
69 void sendOneTimecode();
69 void sendOneTimecode();
70 void sendTimecodePeriodically();
70 void sendTimecodePeriodically(unsigned int onOff);
71
71
72 };
72 };
73
73
@@ -1045,6 +1045,7 void StarDundee::sendTimecodePeriodicall
1045
1045
1046 flag_sendTimecodePeriodically = true;
1046 flag_sendTimecodePeriodically = true;
1047 this->starDundeeSendTimecodePeriodically->setText("stop timecodes at 1 Hz");
1047 this->starDundeeSendTimecodePeriodically->setText("stop timecodes at 1 Hz");
1048 starDundeeSendOneTimePacketAndTimecodePeriodically->setEnabled( false );
1048 }
1049 }
1049 else
1050 else
1050 {
1051 {
@@ -1057,6 +1058,28 void StarDundee::sendTimecodePeriodicall
1057 }
1058 }
1058 }
1059 }
1059
1060
1061 void StarDundee::startSendingTimecodePeriodically(unsigned char onOff)
1062 {
1063 if (onOff == 0)
1064 {
1065 if (!USBSpaceWire_TC_EnableAutoTickIn(hDevice, 0, 0))
1066 emit sendMessage("Could not disable auto tick-in");
1067
1068 flag_sendTimecodePeriodically = false;
1069 this->starDundeeSendTimecodePeriodically->setText("start timecodes at 1 Hz");
1070 starDundeeSendOneTimePacketAndTimecodePeriodically->setEnabled( true );
1071 }
1072 else
1073 {
1074 if (!USBSpaceWire_TC_EnableAutoTickIn(hDevice, 1, 1))
1075 emit sendMessage("Could not enable auto tick-in");
1076
1077 flag_sendTimecodePeriodically = true;
1078 this->starDundeeSendTimecodePeriodically->setText("stop timecodes at 1 Hz");
1079 starDundeeSendOneTimePacketAndTimecodePeriodically->setEnabled( false );
1080 }
1081 }
1082
1060 void StarDundee::sendUpdateTime(long time)
1083 void StarDundee::sendUpdateTime(long time)
1061 {
1084 {
1062 Packet_TC_LFR_UPDATE_TIME_t packet;
1085 Packet_TC_LFR_UPDATE_TIME_t packet;
@@ -62,6 +62,7 public slots:
62 // TIMECODES
62 // TIMECODES
63 void sendOneTimecode();
63 void sendOneTimecode();
64 void sendTimecodePeriodically();
64 void sendTimecodePeriodically();
65 void startSendingTimecodePeriodically( unsigned char onOff );
65 void sendOneTimePacketAndOneTimecode();
66 void sendOneTimePacketAndOneTimecode();
66 void sendOneTimePacketAndTimecodePeriodically();
67 void sendOneTimePacketAndTimecodePeriodically();
67 void updateTimeToSend(long timeToSend);
68 void updateTimeToSend(long timeToSend);
General Comments 0
You need to be logged in to leave comments. Login now