Changeset 4226
- Timestamp:
- 06/26/07 11:42:12 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
experimental/write_to_file/trunk/write_to_file/write_to_file.py
r4127 r4226 22 22 def pushPacket(self, I_data, Q_data): 23 23 '''Store the data to be written to file when the Write Packet button is bushed''' 24 self.gui.I_data = I_data 25 self.gui.Q_data = Q_data 24 self.gui.I_data.append[self.gui.buffer_count] = I_data 25 self.gui.Q_data.append[self.gui.buffer_count] = Q_data 26 27 self.gui.buffer_count = self.gui.buffer_count + 1 28 if self.gui.buffer_count == self.gui.buffer_len: 29 self.gui.buffer_count = 0 26 30 27 31 … … 39 43 40 44 self._init_ctrls(parent) 45 46 self.buffer_len = 8 47 self.buffer_count = 0 41 48 42 49 self.I_data = [] … … 143 150 #write the data out 144 151 open_file = open(self.i_file_name, 'w') #open the file for writing 145 open_file.write(str(self.I_data ))152 open_file.write(str(self.I_data[self.buffer_count])) 146 153 open_file.close() 147 154 148 155 open_file = open(self.q_file_name, 'w') #open the file for writing 149 open_file.write(str(self.Q_data ))156 open_file.write(str(self.Q_data[self.buffer_count])) 150 157 open_file.close() 151 158 … … 157 164 #write the data out 158 165 open_file = open(self.i_file_name, 'w') #open the file for writing 159 open_file.write(str( self.I_data))166 open_file.write(str(packet for packet in self.I_data)) 160 167 open_file.close() 161 168 162 169 open_file = open(self.q_file_name, 'w') #open the file for writing 163 open_file.write(str( self.Q_data))170 open_file.write(str(packet for packet in self.Q_data)) 164 171 open_file.close() 165 172