-
Notifications
You must be signed in to change notification settings - Fork 4
/
Todo.txt
546 lines (497 loc) · 21.2 KB
/
Todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
- [x] put code on github
- [x] see about linking in libusbx and libusb and libusb-compat as git submodules
- [x] let user select which waves to import when importing another EAD file
- [x] ImportEadDialog: don't show empty waves
- [x] ImportEadDialog: in m_map, select all displayed waves initially
- [x] let user delete waves
- [x] mac: edit ScopeTest.pro to handle idac hex files, also consider mac vs macx keywords
- [x] build GcEad on mac
- [x] build GcEad on windows
- [x] windows: update software in vmplayer Syntech7 image
- [x] error in libusb0 -- just upgraded using Zidac driver, see whether it works now, but should copy libusb.a and usb.h first
- [x] build release version and run depends on it, then update GcEad-windows.nsi
- [x] GcEad-windows.nsi: install libusb0.dll no matter what, even if we don't install the drivers
- [x] create idac2.inf and put it in the drivers directory too
- [x] installer: default to installing the drivers
- [ ] test installer on clean windows machine
- [x] BUG: on windows, IDAC 2, using external input, voltage range 4.9mV properly shows 1mV amplidude, but 19mV falsely shows 15mV amplitude.
- [x] switch windows version to libusb from libusb-win32, since libusb now supports isochronous transfers
- [x] remove LIBUSBX/LIBUSB0 defines
- [x] replace define WIN32 with Q_OS_WIN
- [x] Upgrade to newest libusb and get rid of libusb0 for Windows
- [x] Increment GcEad version and year
- [x] Update Installables/Windows/driver
- [ ] Why isn't IDAC4 working?
- error occurs at IdacDriver4.cpp:473, static int iso_submit(int iTransfer)
- for information about difficult ways to get isochronous working under windows, see https://github.com/ktossell/libuvc/issues/12
- [ ] Update Setup/GcEad*.nsi files
- [x] figure out how to distinguish 32/64 bit, since IA64 isn't an option for libusb anymore
- [x] remove IA64 check, and set IA64 to X86
- [x] try windeployqt from http://doc.qt.io/qt-5/windows-deployment.html
- [x] update GcEad*.nsi to copy files from Installables\Windows\windeployqt
- [x] Try to create a libusbK inf Wizard installer: http://libusbk.sourceforge.net/UsbK3/usbk_installers.html
- [ ] compile NSI installer again and re-try C:\Users\McGoo\Documents\GitHub\gcead\Setup\GcEad-1.2.5-windows-installer.exe
- [ ] add note to README about running setup_windows.bat
- [ ] Re-setup libusbK drivers again and document how to do it
- InfWizard for both IDAC2 and IDAC4, run re-pack-drivers.cmd from git console
- [ ] maybe try to remove the debug_and_config CONFIG option from the pro files
- [ ] Do we need the .CAT files from Zadig?
- [ ] Update README.md regarding library versions
- [ ] Update README.md for creating Mac package
- [ ] Update README.md for updating Installables/Windows/driver
- [ ] Build NSI installers
- [ ] After upgrading libusb, respond to email from 2014-10-02 and ask them to try again with the new version
- [ ] switch to HDF5 for file format?
QML:
- display a QML dialog in QMainWindow: http://www.ics.com/blog/combining-qt-widgets-and-qml-qwidgetcreatewindowcontainer#.UwovrviVthE
Biggest challenges for driver:
IdacSetBufferEvent
function which shows dialog
create DLL entry function and create driver objects
create DLL with exported functions
install DLL in proper folder
register DLL
figure out how to debug
BIG STUFF FOR FUTURE:
Think about how to completely separate the data from the UI, using a client/server architecture
Layers:
datastore
receives edit and read requests
return information about what has changed
load/save data
maintain recovery information in case of crash
application data logic
receives non-UI commands for actions and edits
translates commands to datastore requests
handle undo/redo commands for the datastore
propogates datastore responses up to next layer
application view logic
translate data into QObjects for use in QML
translate datastore reponses into list and property update signals
receive and handle UI commands
application view
hook up application view logic to QML
implement additional UI functions which can't have concrete implementations in the logic layer
Major requirements:
Single copy of data
Changes to data are automatically propogated to GUI (but with a delay to allow for cascading changes)
Various GUI lists of data objects get dynamically updated when objects are added or deleted
All modifications of data from GUI go through Commands (see QUndoCommand)
Data read/write via scripting (though perhaps not normally exposed to user)
All GUI commands executable via scripting
Create some construct to allow for new objects to be constructed from underlying data and updated dynamically for display in the GUI (so automatically maintain "companion" objects)
COMMAND LIST INPUT:
INP: EDIT WAVE rec01/wav01 name "EAD Fly 1"
OUT: EDIT WAVE rec01/wav01 name "EAD Fly 1" "EAD 1"
INP: EDIT TOP top nextRec 3
INP: NEW WAVE { type=0, time=... }
INP: NEW WAVE { type=1, time=... }
INP: NEW WAVE { type=2, time=... }
createRec("rec02");
createWave("rec02/wav01");
rec02/wav01: name = "EAD 2", comment = "Second"
OUTPUT:
rec01/wav01:name
recs.addRow ...
Check out next:
x models for QTableView
x undo/redo
x add command to create/delete a wave
x have Project create dynamic table models which automatically add/remove rows
MainWindow:
docks:
x command log
x undo view
x script console
item property viewer:
list of items
slider
property browser
menus:
Edit: undo, redo
central widget:
Lists and sub-lists:
ItemRepository:
activate()
addInactive()
Items need to belong to an item list, which they send command requests to
Property setting pathway:
setProperty is called on an Item
Item forwards the request to its ItemList
ItemList forwards the reqest to
the item forwards the request through a GUI Workspace component
Workspace asks Project to encode the command as a CommandData object
Workspace wraps CommandData in a QUndoCommand
Workspace (creates QUndoCommand objects)
Project (maintains interconnected consistency)
ItemRepository (keeps inactive items)
ItemList (notifies about list and item changes)
Item (create property commands)
Data (hold actual data)
CommandDataProperty {
item
sProperty
vOld
vNew
}
EdmObject* ExObject::findPath(cmd) {
ExObject* obj = this;
QObject* parent = this->parent();
while (parent != NULL) {
if (parent->isType(ExObject)) {
cmd->path.push(obj);
obj = parent;
}
parent = parent->parent();
}
return obj;
}
EdmObject::sendProperty(cmd) {
findPath(cmd);
obj->handleProperty(cmd);
if (cmd->bDelete)
delete cmd;
}
EdmObject::sendCommand(cmd) {
findPath(cmd);
obj->handleCommand(cmd);
if (cmd->bDelete)
delete cmd;
}
Item::handleCommand(cmd) {
}
Item::setProperty(...) {
cmd = new CommandPropertyData(this, sProperty, vOld, vNew);
m_setter
if (m_list != NULL)
m_list->postCommand(cmd);
else
handleCommand(cmd);
}
List::postCommand(CommandPropertyData* cmd) {
if (m_repo != NULL) {
}
}
CommandPropertyHandler::sendCommand(CommandPropertyData* cmd) {
if (m_setter != NULL)
m_setter->sendCommand(cmd);
else
handleCommand(cmd);
}
CommandPropertyHandler::handleCommand(CommandPropertyData* cmd) {
cmd->item->itemData()->setProperty(...);
emit propertyChanged(cmd->item->itemId(), cmd->sProperty);
}
Sample script session:
project.loadSampleProject()
wave = waves.add();
wave.type = 1;
wave.name = "One";
wave.comment = "Yay";
wave.toggleInvert();
wave.shift += 10;
clone = waves.cloneForTransaction(wave);
clone.shift -= 20;
clone.toggleInvert();
waves.commit(clone);
wave = waves.copy(wave);
wave.name = "Two";
waves.delete(wave);
More separation thoughts:
script interfaces: everything that can be changed by script should be logged
Item: sends all modifications back to workspace as commands
ItemList: sends all modifications back to workspace as commands
Project: receives commands from the workspace, filters them, and forwards them to the ItemLists and Items
Workspace: embeds commands into QUndoCommands
exposed to script:
project
items
item lists
items
ui
the ui is an item itself
child items
separate Project into Project/ProjectData, where ProjectData holds the ItemLists.
create model sorter and filterer
create task views
View Task:
item selection (preferably multi-selection also possible)
easy editing of common parameters
it'd be nice to have mouse cursor feedback when moving over widgets
QGraphicsView with custom layout of widgets
custom widget with custom layout of widgets
custom widget with custom layout and drawing of everything
QTreeView
derive from QAbstractItemView
Separate QUndoStack and QUndoCommand from Project, because they are in the Gui module
create ObjectPropertyMapper
create GceadProject
see how these views work out with an MVP framework?
create GceadWorkspace, which holds all the data for the UI
create task "presenters"
use QSqlite for project file
write all edits to a recovery file
create an even more abstract Command class that is for both edits and non-edits, and save these so that we can get a more detailed log of the user's actions.
tap into application event loop in order to log events
catch exceptions so that log files can be flushed
for python scripting, see http://doc.trolltech.com/qq/qq23-pythonqt.html
allow a brief delay before updating the ave waves
only update the ave waves if they are displayed
Save all edits in a temporary file
Crash recovery
Allow user to easily move waves around among files
OpenGL for graphs
Touch-based UI
Any good way to use a state machine?
------------
Add support for Engineering Spirit drivers:
search for IDAC8_32.dll instead of shipping with it:
http://en.wikipedia.org/wiki/Dynamic-link_library#C_and_C.2B.2B_2
Fix IDAC4 Settings dialog:
. make it smaller?
. Create my own Autospike recordings for testing ASC import
msex_test.asc EAD:
-8390 to 1996 (height is 76% of 3 units ~= 4.6mV)
f1 = 116.364313
a1 = 10386
r1 = a1/f1 = 89.254
msex_test.asc FID:
-3 to 10719 (height is 75% of 3 units)
recording.asc EAD:
min/max: -3083 to 417
347 to -3009 = 3356 = 8.8mV
f2 = 11.636431
a2 = 3356
r2 = a2/f2 = 288.40
Import ASC file from Autospike
? ImportRecordDialog: add stretch widget to right sight
? ImportRecordDialog: add OK and Cancel buttons (in platform-dependent order?)
? ImportRecordDialog: fill in map
fix conversion to voltage
make sure FID is also being imported
? don't offer digital import
Add libusbmac.mak
create mac installable
Screenshots for Peter's documentation
more unit tests
Model/View:
EadFile:
QUndoStack undoStack
Commands:
RecordingWavesCreate
RecordingWavesKeep
RecordingWavesDiscard
WaveNameChange
WaveVisibleToggle
WaveSensitivityChange
WaveOffsetChange
WaveShiftChange
WaveInvertToggle
WaveCommentChange
getWaveTableModel()
WaveTableModel: QAbstractTableModel
recId
type
name
comments
offset
sensitivity
shift
visible[5] (for each view)
pos[5] (for each view)
ViewWaveTableModel: QAbstractTableModel
(everything from WaveTableModel)
category
visible
PropertyTableModel: QAbstractTableModel
takes a list of QObjects and a list of property names
ViewWaveListView: QAbstractItemView
takes a ViewWaveTableModel and displays them
FiltersScope: QAbstractTableModel
-----------------------
Other thoughts about separating data from display and control more thoroughly
Think of the storable data in terms of database tables
each column of each row emits a change signal
when the column of a row changes, the row emits a columnChanged() signal
rows know nothing about their tables or parent objects
tables capture all columnChanged() signals and emit rowColumnChanged()
------
when a wave is added/removed to a filter, the display of that wave should be recalculated
------
Pure storage data tables:
Project (settings, comment, pver, rver, wver)
Waves (waveId*, recId, waveType, name, comment, offset, sensitivity, shift)
Views (viewId*)
ViewWaves (viewId + waveId*, visible, pos)
Filters (filterId*, filterType, waveType)
FilterWaves (filterId + waveId*)
Filter1s (filter1 settings)
Question for Peter:
should I drop "min" unit from time when the unit is minutes?
is the thicker tick what you had in mind?
Digital wave recording:
only record digital wave when it's enabled!
when digital wave is disabled, should the display be different in the dialog?
BUG: open recording dialog, close dialog and *quickly* close program; shouldn't crash
this is for IDAC4; might be for IDAC2 too
exitIdacThreads() should make sure that IdacDriver4::sampleLoop is finished before it starts deleting objects
BUG: on Windows; start recording; close program; select discard twice; shouldn't crash
BUG (maybe): record a wave; Ave view; zoom in on EAD AVE wave; Stop and Save; reopen file; EAD Ave wave might not have kept its sensitivity
website: copy image and css files from vivia-video website
Ian's suggestion about timebase (make it obvious that timebase refers to grid width)
improve selecting region for zoom-in so that zoom factor isn't so large sometimes
mac: get isochronous transfer to work for IDAC4 (try libusb-1.1 when it comes out)
import of old EAG files
scaling factors
comments
Think about merging recording from another EAD file
? import all records from another EAD file
test importing from both GcEad/2010 and the old EAD program
but: also need to let user delete waves then?
Create unit tests
x load sample project
x charts
x zooming
x scrolling
x edit/show wave comments
. peaks
show time
show percentage
show amplitude
enter and leave markers mode
x hiding/unhiding waves
x adding/removing extra waves from charts
x inverting a wave
. save/load
wave comment with XML special characters
file comment with XML special characters
BUG: in Chart:All, EAG Ave doesn't remain hidden
importing from both GcEad/2010 and the old EAD program
publishing
recording
recording label shown when recording starts
recording label updates during recording (RECORDING & REMAINING)
recording label hidden after recording done
chart updates during recording
proper scrolling as recording goes off current visible region
loading/saving settings
show peak percent vs amplitude
add attributes to root node of EAD file:
pver: program version which wrote this file
wver: version of xml format which was written (integer)
rver: minimum version of the xml format reader which can read this XML
display some message to user if trying to open/save an older XML version
display some message to user if trying to open/save a newer XML version
Improve handling of IDAC overflow
Run unit tests in GUI
separate View and ViewMain
create ViewTest
run with valgrind
Create new installer for Windows
build EXE in Windows
update version number too
Windows 7 x64 USB:
http://www.jungo.com/st/wdusb.html#
http://www.thesycon.de/eng/usbio.shtml
Could WinUSB be used with IDAC2, or does the reset requirement (see IdacDriverUsb::sendFirmware) prevent this?
Could IDAC4 firmware be re-written to not use isochronous transfer, so that WinUSB could be used?
Could IDAC firmware be rewritten to implement a "Communication Class", in particular "Asynchronous Transfer Mode", and then use the standard Windows driver?
libusbx:
http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/
BEFORE A RELEASE:
INSTALLER:
IDAC2
? IdacDriver2: get inverted status correct
handle 0x7ffe (or whatever the reset code is)? (only if I can look at the original code which generated/handled 0x7ffe)
get symbolic codes for the IDAC2
TEST:
test that voltage conversions are done right
test that digital stimulus channel works on IDAC2
is the decimation value really right for IDAC2?
run through a couple use-cases
FOR PETER:
IDAC2: same signal on INPUT 2 reads about 10x smaller than on INPUT 1...
IDAC2: when I set ext amp=1, signal on INPUT 1 is *2mV* peak to peak
IDAC4: when I set ext amp=10, signal on INPUT 1 is *1mV* peak to peak
CLEANUP:
x remove/reduce compiler warnings
x suppress debug output in release mode
x svn:eol-style=native on all relevant files
x copyright notices in all files
x svn:ignore relevant directories/files
x set proper app version number
update webpages:
rsync -aiv [files] whiteh12,[email protected]:htdocs/
testing
Verify that all menu actions are connected
Run program through valgrind
user documentation
programmer documentation
open-source it
upload EXEs to sourceforge
FUTURE STUFF suggested by Peter:
Import .aspk files (along with dialog to select which waves) (see Aspkdoc.cpp, CAutoSpkDoc::Serialize)
Add band-pass filter from EAD program
FUTURE STUFF:
Store log files in a user directory instead of in program directory?
for recordings with digital waves, could we try to autodetect EAD peaks?
add programmer documentation to IdacDriver* projects
Markers Edit; click Add; move marker; remove marker: autodetect of peak should be re-added?
BUG: Load Sample Project, edit it, Save As over an existing file: should ask for overwrite confirmation! Appears to be a Qt or KDE bug, because other applications have the same problem, and I think it might have worked correctly in windows -- 2010-05-05.
integrate RecordHandler into Idac/ or IdacDriver/ (and delete RecordHandler)
EadFile: redraw graph when filters change
ChartWidget: antialias the marker lines in Publish mode
ChartWidget: vertical "crosshair" line
ChartWidget: When changing number of horizontal divisions in Publish task, move the scrollbar appropriately
ChartWidget: When the user first presses Ctrl, update the mouse cursor if appropriate (i.e., about to set a peak)
ChartWidget: Don't let user zoom in on an empty document using mouse dragging
ChartWidget: when dragging markers, marker snaps to mouse-x instead of dragging smoothly
EadFile: returned more detailed information when load/save fail (and show it to user)
Globals: set whether File or Print output was last selected (variables already exist in PublisherSettings, and they are loaded and saved in Globals)
MainScope: only enable m_actions->fileExportRetentionData when the user has set/verified peaks
MainScope: add undo/redo
MainWindow: when right-click on toolbar, don't give option to hide it
MainWindow: Beep when done recording?
PanelTabs: consider choosing equal widths for tabs, if space allows
PanelTabs: draw shadow around active tab?
RecordDialog: when trigger comes, somehow start saving data on EXACTLY the sample where the trigger occurred, rather than waiting for the next data block
RecordSettingsDialog: add +- sign to range values?
RecordSettingsDialog: right-align the comboboxes (http://www.qtforum.org/article/20839/text-alignment-in-qcombobox.html)
SweepWidget: when signal is out of range, make it visible somehow (limit to viewport?)
TaskPublishWidget: add btnResetColors
TaskPublishWidget: when printing the time of a recording, only print hour and minute (not seconds), but keep it localized!
TaskPublishWidget: save user-title to EadFile
TaskPublishWidget: pen width for signals (Peter's request)
TaskPublishWidget: color of signals (Peter's request)
TaskPublishWidget: when printing in black/white, need to make peak labels b/w too
TaskPublishWidget: Qt BUG: SVG painting doesn't clip signals above and below the viewbox properly
TaskReviewWidget: in Recording view, let user select any EAD/FID wave he wants (not just the averages)
TaskReviewWidget: allow adding comments to average waves
WaveEditorWidget: add a [Delete] command
WaveEditorWidget: add a wave color?
WaveEditorWidget: let user edit name
REFACTOR: Remove enum EadMarkerMode?
Refactor: ChartPixmap: remove knowledge of the current EadTask (perform task-specific logic via other variables)
Refactor: ChartScope: remove knowledge of the current EadTask (perform task-specific logic via other variables)
Refactor: MainScope: move File|Open Recent from MainWindow to MainScope
Refactor: Task*Scope: create scope classes for the Task widgets too
Refactor: Rename widgets for the right side: View*Widget
Refactor: only call Globals->file()->updateAveWaves() from ViewInfo?
Refactor: WaveInfo: vwiUser is a HACK, see if we can improve this
Refactor: TaskReviewWidget: figure out a way to use WaveEditorWidget instead of painting everything ourselves, but still maintain smooth drawing
Link for info about writing a MatLab plugin
www.mathworks.com/access/helpdesk/help/pdf_doc/daq/adaptorkit.pdf
FILE FORMAT FROM OLD EAD PROGRAM (EXAMPLE1.EAD):
04E2: BcDataSet<CR><NL><6F><BF><02><00>
04F2: <9F><0F><00><00>: size
04F6: EAD data start
4372: EAD data end, then FID stuff
<42><43><02><00>... (11 bytes)
437D: <9F><0F><00><00>: size
81FD: FID data end
0x02BF = 703
0x0002BF6F = 180079
81FD:
Portable ADC:
http://forums.adafruit.com/viewtopic.php?f=31&t=12269 (18-bit arduino)
http://www.protostack.com/blog/2011/04/analogue-to-digital-conversion-interrupts-on-an-atmega168a/ (10-bit)