Commit graph

220 commits

Author SHA1 Message Date
TT 93d1233d8b feat: change the operations to select lever mode 2020-02-22 22:41:50 +09:00
DiSlord 02a5715bb4 Big code redisign (increase CELL draw size, more faster screen render), also save about 4-5kB flash size
Try remove all hardcoded values from code (use definition if set)
Some error fix

main.c:
Rewrite Shell, now it run on main thread and require less RAM (not need stack)
 (possible run it as thread if define VNA_SHELL_THREAD
Remove not used trace_info[].scale_unit in set_trace_scale/get_trace_scale (it just divede on set and multiple on get, better use it for default scale set)

Replace some hardcoded values
 MARKERS_MAX
 SAVEAREA_MAX
 TRACES_MAX

plot.c
Rewrite CELLWIDTH and CELLHEIGHT use, now possible set any CELL width and height (CELLWIDTH * CELLHEIGHT <= spi_buffer size)
Free RAM from shell stack use fore increase spi_buffer size now it have 2048 pixel (64x32)
Rewrite cell index and markmap use (now correct use cell size, and more faster), correct use CELLWIDTH and CELLHEIGHT in calculation
Fore set update area use invalidateRect (still need use some hardcoded values :( )
Rewrite cell_draw_line
Rewrite many hardcoded size definitions
Refrence point now draw as bitmap (less size, more costumable)
Fix drag marker (now correct search closest index in search_nearest_index)
Rewrite plot_into_index, now correct use size definitions, moe

ui.c
Small rewrite keyboard definitions, for use less flash size
Define KP_WIDTH, KP_HEIGHT for set key size
Better look some big font symvols

All:
use static fore some local functions (use less space on calls)
replace tabs on spaces (code style)
Use M_PI from math.h fore define pi value

Fix printf on print HEX values
2020-02-22 10:50:54 +03:00
DiSlord e9f65b1426 Huge rework chsnprintf function (basic functional more compact and faster):
I can`t upload my version chprintf.c to ChibiOS\os\hal\lib\streams upload it to root :(
 now support print float and Suffix if use example %.1F on 1.234e-3 print 1.234m, %F print 1.23m
 now support + flag %+d on 8 print +8, %+d on -8 print -8
 now support freq output if use %q example %q on 1234567890 print 1.234 567 890 GHz, %.8q print 1.234567GHz
 fix rounding errors on print float example if print use %.2f on 2.199 print 2.20 (before 2.19)
Use it in code - made more compact (save about 2k bytes) and easy display values (set output more digits after . for some values)
Made some font glyph more compact, allow 3px glyph

More correct create frequencies table on big span (not use float operations), also produce more compact code
Use double value input from keyboard (not lost Hz on input)
Set sweep_points as uint Optimize set_sweep_frequency size

Fix freq commands broken after freq set as uint32 (add str to uint32 functions for freq bigger then 2 147 483 647):
 cmd_freq
 cmd_offset
 cmd_threshold
 cmd_scan
 cmd_sweep

Define _isdigit macro (replace isdigit() function, its too big)

Rewrite std universal atoi() to more compact my_atoi and write new unsigned variant my_atoui
2020-02-11 11:54:05 +03:00
TT dd4074d501 fix: gain table covers 2.7GHz 2020-02-01 00:18:38 +09:00
ВшЫдщкв 5a4d02208f define POINTS_COUNT in nanovna.h
fix 'micro' char in font
fix draw STOP distance in frequency field
fix x position calc in plot_into_index
fix frequencies delta defined as int in plot.c
fix frequencies defined as int in ui.c
2020-01-25 20:54:03 +03:00
ВшЫдщкв 90dc36418d Remove test code
Optimize size trace command function
2020-01-19 16:14:22 +03:00
ВшЫдщкв 6f666cf31b Change Font size (more readable)
Rework display spi driver:
 use DMA for read, write
 add blitBitmap functions
 Use DMA for color fill
 More correct SPI bus control
Move color definitions to nanovna.h
Some code optimization for speed and size (save about 3k bytes)
Change grid Y resolution to 10
Fix convert from float to int (fix some rounding errors on plot)
Disable unused HAL serial
Change battery icon
2020-01-19 11:16:18 +03:00
TT 18a1ca4e6e feat: add marker tracking 2020-01-18 22:27:56 +09:00
TT c4edbee973 fix: boundary check of center/span 2020-01-18 14:25:37 +09:00
TT e1ba0c77f0 chore: store velocity factor in float 2020-01-18 13:03:38 +09:00
TT c4495b6d58 chore: add reserved room in properties and config 2020-01-18 12:34:59 +09:00
TT fcb0be6def fix: remove upper limit of signed int32 for frequency setting 2020-01-18 12:07:21 +09:00
TT ed85ca193b fix: make touch cal default suitable for 2.8 panel 2019-11-17 11:28:50 +09:00
TT dd4eaed475 fix: change to marker lever mode on transform enabled 2019-11-17 11:16:08 +09:00
TT b909ccb716 feat: add lever operations (center, span, search) 2019-11-17 11:00:01 +09:00
TT e6035a5d96 doc: add guide on clearconfig 2019-11-06 21:38:36 +09:00
TT f6e9c6f434 fix: adjust delay 2019-10-22 09:36:41 +09:00
TT 0124e1b32d chore: update codec control 2019-10-21 20:25:44 +09:00
TT b80790477c chore: disable dump command 2019-10-20 21:54:42 +09:00
TT 85c8b5c893 fixed: update interpolation status on changing sweep freq from serial #84 2019-10-18 00:38:45 +09:00
TT e3a10a7868 fixed: #70 first measurement point sometimes has wrong value 2019-10-08 23:59:16 +09:00
TT 5651d1e447 Merge branch 'format_delay' 2019-10-08 23:08:44 +09:00
TT 07de5cd579 enhancement: adjust delay 2019-10-08 07:38:38 +09:00
TT 342c5ff669 add trace format of group delay 2019-10-08 07:18:39 +09:00
TT 3fc17e18f9 fix: break sweep loop on frequency change 2019-10-07 22:24:32 +09:00
TT f7e712798a chore: remove warnings 2019-10-06 07:56:25 +09:00
TT bfd45c715d fix: fix digit loss of sweep frequency 2019-10-05 21:48:00 +09:00
TT 3a6de231c6 fix: remove glitch on interpolation 2019-10-05 21:11:19 +09:00
TT 94659a22ba feat: add threshold command 2019-10-05 19:56:38 +09:00
TT 18c529984b chore: use table to adjust gain related to freq 2019-10-05 19:08:20 +09:00
TT 50bce64575 feat: add transform command 2019-10-05 10:13:00 +09:00
TT ea1c74240a fix: update display in pause 2019-09-29 11:20:47 +09:00
TT 0aeadaa213 fix: #52. Previous fix 4e2036b was incomplete. 2019-09-29 11:20:47 +09:00
TT 064477291a fixed: freeze device by clicking pause 2019-09-28 22:28:00 +09:00
TT 4e2036ba36 fix: #52 2019-09-28 21:49:59 +09:00
TT 0d36621411 fix: unexpectedly cal reset on changing frequency range 2019-09-28 16:07:39 +09:00
TT b552d04f96 fix: apply cal on scan 2019-09-28 13:08:03 +09:00
TT 5fea75f92f chore: move loop of scan command into sweep thread 2019-09-28 13:08:03 +09:00
TT 571e45d50b feat: add scan command 2019-09-28 13:08:03 +09:00
TT 516319b354 fix: plot only if sweep completed 2019-09-28 13:08:03 +09:00
TT c72abc7bb9 fix: usage of sweep command 2019-09-28 13:05:27 +09:00
TT 0b885f2640 fix: unexpected ripple of s21 in thru 2019-09-27 08:31:19 +09:00
TT 47f48d83e4 fix: omit drawing screen from usb thread 2019-09-26 09:06:43 +09:00
cho45 1120d5c33b Fix timedomain transform (based on acd944d5fa by @erikkaashoek ) 2019-09-21 22:20:08 +09:00
TT e89c9bd6a7
Merge pull request #32 from cho45/timedomain
[proposal] Time Domain Operation
2019-09-19 06:17:23 +09:00
TT d68ab20c30 fix: increase stack area to prevent fault caused from nanovna-saver 2019-09-17 22:39:41 +09:00
TT c388832ef0 Revert "add command battery"
This reverts commit be45653c2b.
2019-09-14 19:49:02 +09:00
cho45 aa4faa5a6e rename TDR -> TD 2019-09-11 23:05:01 +09:00
cho45 472b895d5b windowing 2019-09-11 22:35:44 +09:00
cho45 6bad9de606 change menu name to 'TRANSFORM' 2019-09-11 20:47:17 +09:00
cho45 b17ecfa533 minor fixes 2019-09-11 08:17:40 +09:00
cho45 8f0bfacf3d setting velocity factor 2019-09-11 00:24:06 +09:00
cho45 95ab399567 save domain mode 2019-09-10 23:49:08 +09:00
cho45 889d675836 TDR feature 2019-09-10 22:39:20 +09:00
TT be45653c2b add command battery 2019-09-10 21:52:30 +09:00
cho45 a9457dbd0a show battery indicator (requires implementing D2 on board) 2019-09-10 01:01:24 +09:00
cho45 5e9756e4e0 append reset dfu command and CONFIG -> ENTER DFU 2019-09-06 21:11:33 +09:00
cho45 39b7fdf95e append version info screen to UI 2019-09-05 23:58:30 +09:00
cho45 480ad0f745 static inline reduce stack memory usage 2019-08-29 01:05:55 +09:00
TT 3e841920fb refactor: introduce trace_info 2019-08-26 23:58:47 +09:00
TT 96f4811b82 add trace command usage 2019-08-25 23:07:39 +09:00
TT 7ff53357bd feat: use default scale on format change 2019-08-25 23:07:01 +09:00
TT c48cb8e407 feat: add command options for trace type real/imag/r/x 2019-08-25 21:00:06 +09:00
cho45 f9a5d2e3ef Add REAL IMAG R X trace format 2019-08-24 07:45:53 +09:00
cho45 7ce755d666 optimize protocol of capture function 2019-08-23 02:22:42 +09:00
cho45 1c4718ae4a implement capture command 2019-08-23 02:07:22 +09:00
TT 28614dbb4a store version as separate string 2019-08-18 21:11:03 +09:00
TT 53d07e8c12 feat: add version command 2019-08-18 08:19:17 +09:00
TT eedf0e1aa7 fix: remove glitch at first sweep point 2019-08-16 04:56:50 +09:00
TT 0a8bfbff33 feat: interpolate from current cal file and only if cal applied 2019-08-16 04:51:46 +09:00
TT 3b953f061b feat: adjust gain and frequency band, enpower LO drive strength. 2019-08-12 23:07:10 +09:00
TT bcb0644070 gain adjust for frequency 2019-08-12 20:53:49 +09:00
TT a4ef290126 experiment: x5 harmonic mode 2019-08-12 20:53:49 +09:00
TT e626c581ee feat: add sample command to evalutate dynamic range 2019-08-12 20:53:33 +09:00
TT 8fdedea919 feat: interpolate CAL from current saved file 2019-08-11 13:09:21 +09:00
TT c4edf2a6eb omit: unused buffer refiq 2019-08-10 14:13:56 +09:00
TT c6a4b651d0 feat: add controling stimulus power and gain by frequency 2019-08-10 13:04:48 +09:00
TT 10a58f9580 feat: extend to 900MHz 2019-07-25 06:23:27 +09:00
TT 0cac8f4adc fix s11 error correction mistake 2019-07-20 19:00:26 +09:00
TT 63d19f3f6f WIP: up/down touch operation on numeric area 2017-10-01 11:14:41 +09:00
TT e0197b8381 WIP: touch operation on numeric input area 2017-10-01 08:59:33 +09:00
TT b64826b76a add numeric input support scale and electrical delay 2017-10-01 00:56:43 +09:00
TT f3a473bffa work with keypad 2017-09-30 23:58:31 +09:00
TT 7228ebd5fa add numeric input (WIP) 2017-09-30 23:06:21 +09:00
TT 5d1934d85f support electrical delay 2017-09-21 00:48:33 +09:00
TT 5a441edc6b update marker position on sweep frequency change 2017-09-17 20:19:12 +09:00
TT 043972e6ca fix segv on active trace 4, apply error term inside sweep loop, show active trace on marker info 2017-09-17 18:52:02 +09:00
TT 774a11ae74 add interpolation on cal 2017-09-15 22:13:17 +09:00
TT ee6f5a9d83 change keypads on scale, scale handling 2017-02-03 21:18:33 +09:00
TT c30a2730f3 skip redrawing after touch cal to avoid hanging up 2017-02-03 19:54:00 +09:00
TT b42749e57d fix jump of touch sense, add touchtest command, draw on touch cal, fix gap of drag marker position 2017-02-03 05:40:57 +09:00
TT 0db99b9c7c add lower range 50kHz support, fix frequency inversion 2017-02-02 05:56:11 +09:00
TT abfe237d23 fix correlation detection 2017-01-27 00:11:24 +09:00
TT 095b250137 implemented correlation detection, worked, but no good result 2017-01-26 09:10:48 +09:00
TT 10bbe7dc82 re-enable dump command 2017-01-22 13:34:01 +09:00
TT 1db0259173 adjust thread stack size 2017-01-22 13:10:29 +09:00
TT 16923eaacf add DUMP_ENABLED option 2017-01-22 13:05:36 +09:00
TT 79d1060a46 add hard_fault handler 2017-01-22 13:03:40 +09:00
TT 373e56f006 add clearconfig command 2017-01-20 08:57:17 +09:00
TT 295ec105e6 set scale and refpos temporally 2017-01-17 23:06:32 +09:00