OpenHantek
Loading...
Searching...
No Matches
definitions.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2
3#pragma once
4
5#include <QMetaType>
6#include <QString>
7#include <stdint.h>
8
9#define HANTEK_GAIN_STEPS 8
10#define HANTEK_CHANNEL_NUMBER 2
11
12namespace Hantek {
21
22#pragma pack( push, 1 )
23
24// The strct reflects the offset layout in EEPROM
25// All values are offset binariy bytes (0 -> 0x80)
26// The 1st 32 bytes are already factory calibration values
27// 16 byte offset at low speed: CH0@20mV, CH1@20mV, CH0@50mV,...,CH1@5V
28// 16 byte offset at high speed: CH0@20mV, CH1@20mV, CH0@50mV,...,CH1@5V
29// The next 16 bytes are written by python calibration tool
30// 16 byte gain: CH0@20mV, CH1@20mV, CH0@50mV,...,CH1@5V
31// The next 32 bytes are an optional fractional part of offset (*250)
32// 16 byte offset (ls) fractional part: CH0@20mV, CH1@20mV, CH0@50mV,...,CH1@5V
33// 16 byte offset (hs) fractional part: CH0@20mV, CH1@20mV, CH0@50mV,...,CH1@5V
34
38
39struct Offsets {
42};
43
49
50#pragma pack( pop )
51
52} // namespace Hantek
#define HANTEK_CHANNEL_NUMBER
Definition definitions.h:10
#define HANTEK_GAIN_STEPS
Definition definitions.h:9
Definition controlsettings.h:9
UsedChannels
The enabled channels.
Definition definitions.h:15
@ USED_CH1CH2
Channel 1 and 2 are both activated.
Definition definitions.h:19
@ USED_CH1
Only channel 1 is activated.
Definition definitions.h:17
@ USED_NONE
No channels are activated.
Definition definitions.h:16
@ USED_CH2
Only channel 2 is activated.
Definition definitions.h:18
Definition definitions.h:44
Offsets off
Definition definitions.h:45
Steps gain
Definition definitions.h:46
Offsets fine
Definition definitions.h:47
Definition definitions.h:39
Steps hs
Definition definitions.h:41
Steps ls
Definition definitions.h:40
Definition definitions.h:35
uint8_t step[HANTEK_GAIN_STEPS][HANTEK_CHANNEL_NUMBER]
Definition definitions.h:36