1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-27 19:53:45 +02:00
Commit Graph

29 Commits

Author SHA1 Message Date
Werner Almesberger
9cc032816e ubb-la/gui.c (pos_step): step one sample at maximum zoom
This permits precise interval/frequency calculation with the user-defined
reference.
2013-02-01 00:38:19 -03:00
Werner Almesberger
b99c81409f ubb-la/gui.c: add user-defined zero reference (set/unset with space) 2013-02-01 00:34:02 -03:00
Werner Almesberger
5b050b4b36 ubb-la/gui.c (gui): move position display to show_position; add position in samples 2013-01-31 23:24:24 -03:00
Werner Almesberger
f9b3c36c6b ubb-la/gui.c (gui): the upper bound for "pos" is nibbles-skip-1, not "nibbles" 2013-01-31 14:48:26 -03:00
Werner Almesberger
709506e6d6 ubb-la/gui.c (show_map): fix calculation of middle point
Also here, we need to take into account that "pos" is zero-based.
2013-01-31 14:48:26 -03:00
Werner Almesberger
137ed18dc2 ubb-la/gui.c (show_buffer): fix calculation of the position offset (dp)
"pos" counts from zero so the middle point is (nibbles-skip)/2 while
the code assumed "pos" was an index into the actual buffer and the
middle point would therefore have been (nibbles+skip)/2
2013-01-31 14:43:33 -03:00
Werner Almesberger
8b69d26fa9 ubb-la/gui.c: make debug output clearer and more detailed 2013-01-31 10:51:44 -03:00
Werner Almesberger
f26fd3564a ubb-la/gui.c (show_map): keep view rectangle size constant
Before, we had rounding effects that could make the rectangle width vary by
one pixel, depending on position.
2013-01-31 04:03:31 -03:00
Werner Almesberger
db133f2cb6 ubb-la/gui.c: display time of center (from start of buffer) 2013-01-31 03:52:24 -03:00
Werner Almesberger
b0a576dd64 ubb-la/gui.c: mark the center of the view area 2013-01-31 03:25:21 -03:00
Werner Almesberger
a83d8bf323 ubb-la/gui.c: add small gap (UNIT_GAP) between numbers and units 2013-01-31 03:15:33 -03:00
Werner Almesberger
ba033cc27e ubb-la/gui.c: add section comments for color and layout definitions 2013-01-31 02:59:37 -03:00
Werner Almesberger
159a128d28 ubb-la.c/gui.c: show units in light blue to better separate them from numbers 2013-01-31 02:57:27 -03:00
Werner Almesberger
06c5f6b0fa ubb-la/gui.c (textf): use vsnprintf+valloca instead of vasprintf
This way, we don't malloc/free all the time, which could lead to more
memory fragmentation than alloca at roughly the same stack location.
2013-01-31 02:50:01 -03:00
Werner Almesberger
52c3dcc16a ubb-la/gui.c (textf): vasprintf ain't alloca, so we need to free() 2013-01-31 01:45:42 -03:00
Werner Almesberger
cdcfb6c181 ubb-la/gui.c: show division size (in samples and seconds) 2013-01-31 01:21:56 -03:00
Werner Almesberger
8d81b584a0 ubb-la/gui.c (XWIDTH): move view width into macro instead of open-coding it 2013-01-31 01:11:18 -03:00
Werner Almesberger
acd9fd6673 ubb-la/gui.c: show horizontal divisions 2013-01-31 01:09:42 -03:00
Werner Almesberger
5bb086e0e8 ubb-la/: display sample rate and sample interval in the GUI 2013-01-31 01:08:39 -03:00
Werner Almesberger
e1be0f242b ubb-la/gui.c: display a small map of buffer and view 2013-01-31 00:07:32 -03:00
Werner Almesberger
f99b62636f ubb-la/gui.c: label channels 2013-01-30 23:19:09 -03:00
Werner Almesberger
0925b0f060 ubb-la/gui.c: add section titles and reorder some of the functions 2013-01-30 22:07:31 -03:00
Werner Almesberger
533e9643ac ubb-la/gui.c (DEBUG): make debugging fprintfs optional via DEBUG macro 2013-01-30 21:25:47 -03:00
Werner Almesberger
435144223d ubb-la/gui.c (gui): make panning zoom-dependent (2 samples at maximum zoom) 2013-01-30 21:08:25 -03:00
Werner Almesberger
4fb2a8cbee ubb-la/gui.c (gui_init): enable keyboard repeat 2013-01-30 20:55:58 -03:00
Werner Almesberger
c702fc0e90 ubb-la/gui.c: add horizontal panning (WIP) 2013-01-30 20:51:22 -03:00
Werner Almesberger
12a1808e09 ubb-la/gui.c (gui): fix the event loop to properly ignore unrecognized events 2013-01-30 20:37:42 -03:00
Werner Almesberger
1b0a2cff51 ubb-la/gui.c: use powers of two for zoom and integer arithmetic (WIP)
This looks better and avoids the risk of math issues.
2013-01-30 20:37:10 -03:00
Werner Almesberger
94e099eebc ubb-la/gui.c: experimental GUI code (WIP) 2013-01-30 14:38:54 -03:00