Commit graph

449 commits

Author SHA1 Message Date
DiSlord c322d5e3cb Add limited variable offset support, and constant sin_cos tables for various offset and ADC speed 2020-04-29 13:43:32 +03:00
DiSlord 018b9c7776 Exapmple definition for header file 2020-04-29 13:41:30 +03:00
DiSlord e6450aa3ea Update header file for future fixes:
Variable sweep_points support
Increase ADC from 48kHz to 96kHz
Some in code definitions for easy compile and platform change
2020-04-29 13:40:53 +03:00
DiSlord 3dab9cadfd Remove double code from plot.c
Update battery icon
2020-04-26 01:07:09 +03:00
DiSlord 49b52213cf Change config and properties flash address definitions
Show BW settings at bottom of screen
2020-04-04 08:43:32 +03:00
DiSlord c572e66231 Allow better si5351 generate frequency less than 50k
Small speedup DSP processing, less size
Add Cortex M4 DSP instruction support
2020-04-02 22:11:32 +03:00
DiSlord e09ee19646 Move bandwidth option from properties to config
Little fixes
2020-04-02 16:36:59 +03:00
DiSlord 30ff60a3de Made LCD rx DMA mode optional (disabled by default), use __USE_DISPLAY_DMA_RX__ for enable 2020-04-01 12:42:05 +03:00
DiSlord e6d680cd44 Not wait sweep end for apply bandwidth command
More size screen/font definitions
Prevent overflow on bigger POINTS_COUNT values
2020-04-01 00:36:43 +03:00
DiSlord 2f288d20cd More screen size depends definition fixes 2020-03-30 23:35:45 +03:00
DiSlord e34f460b22 Fix typo 2020-03-30 21:45:06 +03:00
DiSlord 20649012df Little speedup and less size fft
Better support other size LCD and font
Fix CH1 unstable at begin sweep
2020-03-30 20:01:51 +03:00
DiSlord 59b9534a5c Set minimum calibration bandwidth as BANDWIDTH_100 (can be greater if manually set)
Need for speedup calibrate if need
2020-03-24 11:04:34 +03:00
DiSlord 48e28f79d0 Use compact variant sin_cos table in fft (not decrease speed, and need only 208 bytes flash) 2020-03-23 15:10:01 +03:00
DiSlord 9221ad04ca Revert, use sin_cos table in fft.h
#define FFT_USE_SIN_COS_TABLE by default
Increase code size on 700 bytes, but huge speedup (x3) transform
2020-03-23 01:16:36 +03:00
DiSlord 0c0f399657 Improve button input, better debounce less code size 2020-03-22 19:18:40 +03:00
DiSlord 2ed2f96f4a Size fixes
- bandwidth count stored in menu (less error on add new values)
- allow set any bandwidth count from command
- bandwidth command print bandwidth freq on apply
2020-03-21 21:58:51 +03:00
DiSlord ddf51987eb On calibration use max bandwidth setting 2020-03-21 20:23:59 +03:00
DiSlord 7b17e9cfa6 Add bandwidth command 2020-03-21 18:25:36 +03:00
DiSlord 4c8a476265 Size fixes:
accumerate_count not changed in sweep
2020-03-21 17:54:47 +03:00
DiSlord 4a44ecc37c Fix comment 2020-03-21 16:47:32 +03:00
DiSlord e837578586 Fix typo 2020-03-21 16:40:49 +03:00
DiSlord 22e4df1577 Little rework bandwidth:
- Not reset sweep on request
- Better menu response
- little DSP optimization

Faster i2c bus (now 600kHz, allow more faster add settings)
Add i2c command (disabled by default)
Little fix stat command
2020-03-21 16:15:03 +03:00
TT 5a10105b1a Merge branch 'bandwidth' 2020-03-21 21:19:53 +09:00
TT 1656342eeb feat: add bandwidth setting of detector 2020-03-21 21:03:08 +09:00
TT 0d407577f8 style: uniform code style and untabify 2020-03-21 09:33:33 +09:00
TT a4821604a5
Merge pull request #126 from DiSlord/master
Fix screen artifacts, change start/stop or center/span mode set, remove Mutex use
2020-03-21 09:22:06 +09:00
DiSlord 597c2c2958 Better solutiom of prev fixes (reload si5351 settings on sweep begin) 2020-03-15 16:02:22 +03:00
DiSlord 23c765b719 Fix very strange bug, on band 2
!!!!! Don`t understand why si5351 non stable on band 2 then change from band 3
It fixed if set before sweep one frequency from band 1 (for example 50MHz)
Possibly problem in tlv320aic3204_set_gain, call only si5351_set_frequency_with_offset not work

Little faster call command from shell

Fix interpolation if points < POINTS_COUNT
2020-03-15 14:14:52 +03:00
DiSlord 3eb8a4cfe9 Fix interpolation range if sweep_points!=source calibration points count
use sweep_points exept POINTS_COUNT on marker search and so

Now possible change sweep_points in process (for faster sweep)
2020-03-14 21:23:02 +03:00
DiSlord fdb3886b0f Move define to str macro in nanovna.h (it allow output define valuer in error messages) 2020-03-14 16:50:35 +03:00
DiSlord 45dfd7d970 Fix sweep if points < maximum (mot sweep if frequency[i] == 0)
Fix my tupo in extended scan command (not correctly parse point count)
2020-03-14 16:48:36 +03:00
DiSlord 8a11eaa764 Extend scan command, now in have additional input variable (optional), allow more faster get measured data
usage: scan {start(Hz)} {stop(Hz)} [points] [outmask]
[outmask] - optional, allow output measured data, its a mask (allow dec, hex, bin, oct)
0b001 - output frequency
0b010 - output CH0 data
0b100 - output CH1 data
Example:
'scan 1000000 5000000 101 0b111' - output data in format: freq ch0[0] ch0[1] ch1[0] ch1[1]
'scan 1000000 5000000 101 0b101' - output data in format: freq ch1[0] ch1[1]
'scan 1000000 5000000 101 0x7'   - output data as 0b111
2020-03-14 16:05:26 +03:00
DiSlord ec81a01226 Not use float in vbat measure (faster, less size), yes get little error (but less then 1mV) 2020-03-14 15:21:26 +03:00
DiSlord 922b66abdb Move offset variable to si5351.c (better use it as independent library)
Define and move constants in nanovna.h, and use it
Fix command 'marker' - display marker freq (not current freq)
2020-03-14 15:18:14 +03:00
DiSlord 88617a31fe In ili9341.c remove tabs, add palette mode blit function
In plot.c prepare for 8bit/pixel mode (test, allow increase cell buffer size by use 4 or 8bit/pixel mode, but not need for now)
main.c little change wait execute shell command in sweep thread
2020-03-13 22:42:28 +03:00
DiSlord 8bdb650212 Implement color command, allow change color settings in config (enabled bu default ENABLE_COLOR_COMMAND)
Usage: usage: color {id} {rgb24}
- Grid color: id = -3
- Menu bg color: id = -2
- Selected menu: id = -1
- Trace 1-4: id = 0..3
Color in hex RGB format (but possible any type input, dec, hex, bin. oct)
2020-03-12 21:43:35 +03:00
DiSlord 6f25d0d43f Remove Mutex use (CH_CFG_USE_MUTEXES = FALSE), now all Mutex depend functions run in sweep thread
It allow:
- reduce shell thread stack size
- more compact code
- fix some hardcoded scan command code, allow write better scan version
- run calibrate (not depend from pause sweep flag)

Rewrite uint32_t my_atoui(const char *p), now its allow read:
hex 0xaAbBcC1122
dec 12345678
bin 0b00011100
oct 0o12345678

Add some comments
2020-03-12 19:53:58 +03:00
DiSlord 51b5cce016 Fix Random jitters at band 1 and band change on some freq ranges
Improve frequency stability on band change (100 MHz, 150MHz, 300 MHz, 450MHz)

Restore freq cache in CW mode
2020-03-11 20:11:46 +03:00
DiSlord 10ae59e786 Little cleanup 2020-03-09 23:57:03 +03:00
DiSlord 3714e05395 Fix artifacts after marker move
(For faster screen update on marker move, all old area update info invalidate after use draw_all_cells(TRUE) on page switch)
Force redraw all cells after end marker move
2020-03-09 22:47:35 +03:00
DiSlord eebb625b9d Always update marker info 2020-03-09 22:28:05 +03:00
DiSlord 04fb661b1a Add flag in config for sweep mode
#define FREQ_MODE_START_STOP    0x0
#define FREQ_MODE_CENTER_SPAN   0x1
Now sweep mode not defined from frequency0 > frequency1 or frequency0 < frequency1
frequency0 always < frequency1

All freq must get by use get_sweep_frequency(mode)

Revert Select CH0 reflect channel before set freq, add additional delay on 0 sweep point
2020-03-09 18:24:31 +03:00
DiSlord f9074149bb Size fixes, use define exept const, typdef index_t for indexes 2020-03-09 16:18:29 +03:00
DiSlord 19121b3371 Auto determine mark_map mask size from MAX_MARKMAP_X on compilation (up to MAX_MARKMAP_X = 32) 2020-03-09 14:40:17 +03:00
DiSlord 2d273a5548 Fix typo 2020-03-09 14:22:59 +03:00
DiSlord a19722cdc3 Reduce last patch fix size (use pointers) 2020-03-09 14:08:06 +03:00
DiSlord 90407d5730 Fix screen artifacts:
In mark_cells_from_index(void) mark all rectangle (in most cases this not decrease render speed, and more fast in calculation, and no errors)
2020-03-09 13:12:01 +03:00
DiSlord 5cf86ee1a6 Revert dsp changes, need more research 2020-03-09 10:28:33 +03:00
DiSlord a2d90a5e91 Try not lost data on dsp (Less noise on small signals)
Use int64_t acc for values
Use double on calculation

Not cache freq on si5351_set_frequency_with_offset (to fast change in rare cases on cw mode, and process wrong DSP block) as i write before need change DSP delay tactic
2020-03-09 01:25:46 +03:00