summaryrefslogtreecommitdiff
path: root/src/typedefs.h
blob: 2af29211a6ec6c09a2c4e4102e0246952b22d53f (plain)
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
#pragma once

#include <libcamera/pixel_format.h>

#include "constants.h"

struct Counters
{
    uint32_t timestampUs{0};
    uint32_t measurementCounter{0};
    int32_t encoderPosition{0};
};

struct Image
{
    int width;
    int height;
    uint16_t data[img_height][img_width];
    uint16_t rotated_cw[img_width][img_height];
    size_t dataSize;
    unsigned int stride;
    libcamera::PixelFormat pixelFormat;
    Counters counters{};
};

struct requested_params_t
{
    int32_t exposureTime = {1000};
    int32_t laserLevel = {3000};
    uint32_t stepsPerMm{200};
};

enum ScanningModeFlags : uint8_t { None = 0, Calibration };