forked from nanovna-v2/NanoVNA2-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.cpp
57 lines (47 loc) · 1.62 KB
/
globals.cpp
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
#include "globals.hpp"
#include "ili9341.hpp"
#include <board.hpp>
volatile bool sweep_enabled = true;
int16_t vbat;
uint8_t registers[registerSize];
int16_t lastsaveid = 0;
config_t config = {
.magic = CONFIG_MAGIC,
.dac_value = 1922,
.grid_color = DEFAULT_GRID_COLOR,
.menu_normal_color = DEFAULT_MENU_COLOR,
.menu_active_color = DEFAULT_MENU_ACTIVE_COLOR,
.trace_color = { DEFAULT_TRACE_1_COLOR, DEFAULT_TRACE_2_COLOR, DEFAULT_TRACE_3_COLOR, DEFAULT_TRACE_4_COLOR },
#ifndef DISPLAY_ST7796
.touch_cal = { 1950, 1900, -90, -120 }, //{ 620, 600, 160, 190 }, // 2.8 display module
#else
.touch_cal = { 1977, 1945, -61, -91 }, // 4' display module
#endif
.default_loadcal = 0,
.harmonic_freq_threshold = 300000000,
.ui_options = 0,
.checksum = 0
};
properties_t current_props;
complexf measuredFreqDomain[2][SWEEP_POINTS_MAX] alignas(8);
complexf measured[2][SWEEP_POINTS_MAX] alignas(8);
volatile EcalStates ecalState = ECAL_STATE_MEASURING;
__attribute__((used))
volatile int MEASUREMENT_NPERIODS_NORMAL = BOARD_MEASUREMENT_NPERIODS_NORMAL;
__attribute__((used))
volatile int MEASUREMENT_NPERIODS_CALIBRATING = BOARD_MEASUREMENT_NPERIODS_CALIBRATING;
__attribute__((used))
volatile int MEASUREMENT_ECAL_INTERVAL = BOARD_MEASUREMENT_ECAL_INTERVAL;
__attribute__((used))
volatile int MEASUREMENT_NWAIT_SWITCH = BOARD_MEASUREMENT_NWAIT_SWITCH;
uistat_t uistat = {
digit: 6,
digit_mode: 0,
current_trace: 0,
value: 0,
lever_mode: LM_MARKER,
previous_marker: 0,
marker_search_mode: MarkerSearchModes::Max,
marker_tracking: false,
marker_delta: false
};