Skip to content

Commit f47a59b

Browse files
committed
Fix Thermal compilation error
1 parent ee77593 commit f47a59b

File tree

2 files changed

+77
-73
lines changed

2 files changed

+77
-73
lines changed

examples/Unit/THERMAL_MLX90640/MLX90640_API.h

100755100644
Lines changed: 76 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,76 @@
1-
/**
2-
* @copyright (C) 2017 Melexis N.V.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*
16-
*/
17-
#ifndef _MLX640_API_H_
18-
#define _MLX640_API_H_
19-
20-
#define SCALEALPHA 0.000001
21-
22-
typedef struct {
23-
int16_t kVdd;
24-
int16_t vdd25;
25-
float KvPTAT;
26-
float KtPTAT;
27-
uint16_t vPTAT25;
28-
float alphaPTAT;
29-
int16_t gainEE;
30-
float tgc;
31-
float cpKv;
32-
float cpKta;
33-
uint8_t resolutionEE;
34-
uint8_t calibrationModeEE;
35-
float KsTa;
36-
float ksTo[5];
37-
int16_t ct[5];
38-
uint16_t alpha[768];
39-
uint8_t alphaScale;
40-
int16_t offset[768];
41-
int8_t kta[768];
42-
uint8_t ktaScale;
43-
int8_t kv[768];
44-
uint8_t kvScale;
45-
float cpAlpha[2];
46-
int16_t cpOffset[2];
47-
float ilChessC[3];
48-
uint16_t brokenPixels[5];
49-
uint16_t outlierPixels[5];
50-
} paramsMLX90640;
51-
52-
int MLX90640_DumpEE(uint8_t slaveAddr, uint16_t *eeData);
53-
int MLX90640_GetFrameData(uint8_t slaveAddr, uint16_t *frameData);
54-
int MLX90640_ExtractParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
55-
float MLX90640_GetVdd(uint16_t *frameData, const paramsMLX90640 *params);
56-
float MLX90640_GetTa(uint16_t *frameData, const paramsMLX90640 *params);
57-
void MLX90640_GetImage(uint16_t *frameData, const paramsMLX90640 *params,
58-
float *result);
59-
void MLX90640_CalculateTo(uint16_t *frameData, const paramsMLX90640 *params,
60-
float emissivity, float tr, float *result);
61-
int MLX90640_SetResolution(uint8_t slaveAddr, uint8_t resolution);
62-
int MLX90640_GetCurResolution(uint8_t slaveAddr);
63-
int MLX90640_SetRefreshRate(uint8_t slaveAddr, uint8_t refreshRate);
64-
int MLX90640_GetRefreshRate(uint8_t slaveAddr);
65-
int MLX90640_GetSubPageNumber(uint16_t *frameData);
66-
int MLX90640_GetCurMode(uint8_t slaveAddr);
67-
int MLX90640_SetInterleavedMode(uint8_t slaveAddr);
68-
int MLX90640_SetChessMode(uint8_t slaveAddr);
69-
void MLX90640_BadPixelsCorrection(uint16_t *pixels, float *to, int mode,
70-
paramsMLX90640 *params);
71-
72-
#endif
1+
/**
2+
* @copyright (C) 2017 Melexis N.V.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
19+
#ifndef _MLX640_API_H_
20+
#define _MLX640_API_H_
21+
22+
#include <stdint.h>
23+
24+
#define SCALEALPHA 0.000001
25+
26+
typedef struct {
27+
int16_t kVdd;
28+
int16_t vdd25;
29+
float KvPTAT;
30+
float KtPTAT;
31+
uint16_t vPTAT25;
32+
float alphaPTAT;
33+
int16_t gainEE;
34+
float tgc;
35+
float cpKv;
36+
float cpKta;
37+
uint8_t resolutionEE;
38+
uint8_t calibrationModeEE;
39+
float KsTa;
40+
float ksTo[5];
41+
int16_t ct[5];
42+
uint16_t alpha[768];
43+
uint8_t alphaScale;
44+
int16_t offset[768];
45+
int8_t kta[768];
46+
uint8_t ktaScale;
47+
int8_t kv[768];
48+
uint8_t kvScale;
49+
float cpAlpha[2];
50+
int16_t cpOffset[2];
51+
float ilChessC[3];
52+
uint16_t brokenPixels[5];
53+
uint16_t outlierPixels[5];
54+
} paramsMLX90640;
55+
56+
int MLX90640_DumpEE(uint8_t slaveAddr, uint16_t *eeData);
57+
int MLX90640_GetFrameData(uint8_t slaveAddr, uint16_t *frameData);
58+
int MLX90640_ExtractParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
59+
float MLX90640_GetVdd(uint16_t *frameData, const paramsMLX90640 *params);
60+
float MLX90640_GetTa(uint16_t *frameData, const paramsMLX90640 *params);
61+
void MLX90640_GetImage(uint16_t *frameData, const paramsMLX90640 *params,
62+
float *result);
63+
void MLX90640_CalculateTo(uint16_t *frameData, const paramsMLX90640 *params,
64+
float emissivity, float tr, float *result);
65+
int MLX90640_SetResolution(uint8_t slaveAddr, uint8_t resolution);
66+
int MLX90640_GetCurResolution(uint8_t slaveAddr);
67+
int MLX90640_SetRefreshRate(uint8_t slaveAddr, uint8_t refreshRate);
68+
int MLX90640_GetRefreshRate(uint8_t slaveAddr);
69+
int MLX90640_GetSubPageNumber(uint16_t *frameData);
70+
int MLX90640_GetCurMode(uint8_t slaveAddr);
71+
int MLX90640_SetInterleavedMode(uint8_t slaveAddr);
72+
int MLX90640_SetChessMode(uint8_t slaveAddr);
73+
void MLX90640_BadPixelsCorrection(uint16_t *pixels, float *to, int mode,
74+
paramsMLX90640 *params);
75+
76+
#endif

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ category=Device Control
88
url=https://github.com/m5stack/m5stack
99
architectures=esp32
1010
includes=M5Stack.h
11-
depends=M5Family
11+
depends=M5Family,M5Module-4Relay,MODULE_GRBL13.2,Ethernet2

0 commit comments

Comments
 (0)