Add support for the MLX90641 (#1117)

This commit is contained in:
Kwabena W. Agyeman 2021-01-12 16:35:59 -08:00 committed by GitHub
parent 9edea973fb
commit 7689622982
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 1899 additions and 25 deletions

View File

@ -18,6 +18,9 @@ if (fir.type() == fir.FIR_MLX90621):
elif (fir.type() == fir.FIR_MLX90640): elif (fir.type() == fir.FIR_MLX90640):
w = w * 5 w = w * 5
h = h * 5 h = h * 5
elif (fir.type() == fir.FIR_MLX90641):
w = w * 5
h = h * 5
elif (fir.type() == fir.FIR_AMG8833): elif (fir.type() == fir.FIR_AMG8833):
w = w * 10 w = w * 10
h = h * 10 h = h * 10

View File

@ -18,6 +18,9 @@ if (fir.type() == fir.FIR_MLX90621):
elif (fir.type() == fir.FIR_MLX90640): elif (fir.type() == fir.FIR_MLX90640):
w = w * 10 w = w * 10
h = h * 10 h = h * 10
elif (fir.type() == fir.FIR_MLX90641):
w = w * 10
h = h * 10
elif (fir.type() == fir.FIR_AMG8833): elif (fir.type() == fir.FIR_AMG8833):
w = w * 20 w = w * 20
h = h * 20 h = h * 20

View File

@ -55,6 +55,7 @@ LSM6DS3_DIR=drivers/lsm6ds3
WINC1500_DIR=drivers/winc1500 WINC1500_DIR=drivers/winc1500
MLX90621_DIR=drivers/mlx90621 MLX90621_DIR=drivers/mlx90621
MLX90640_DIR=drivers/mlx90640 MLX90640_DIR=drivers/mlx90640
MLX90641_DIR=drivers/mlx90641
LIBPDM_DIR=lib/libpdm LIBPDM_DIR=lib/libpdm
TENSORFLOW_DIR=lib/libtf TENSORFLOW_DIR=lib/libtf
OMV_BOARD_CONFIG_DIR=$(TOP_DIR)/$(OMV_DIR)/boards/$(TARGET)/ OMV_BOARD_CONFIG_DIR=$(TOP_DIR)/$(OMV_DIR)/boards/$(TARGET)/

View File

@ -21,25 +21,25 @@
#define pow(a,b) powf(a,b) #define pow(a,b) powf(a,b)
#define sqrt(x) sqrtf(x) #define sqrt(x) sqrtf(x)
void ExtractVDDParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractVDDParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractPTATParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractPTATParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractGainParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractGainParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractTgcParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractTgcParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractResolutionParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractResolutionParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractKsTaParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractKsTaParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractKsToParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractKsToParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractAlphaParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractAlphaParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractOffsetParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractOffsetParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractKtaPixelParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractKtaPixelParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractKvPixelParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractKvPixelParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractCPParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractCPParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
void ExtractCILCParameters(uint16_t *eeData, paramsMLX90640 *mlx90640); static void ExtractCILCParameters(uint16_t *eeData, paramsMLX90640 *mlx90640);
int ExtractDeviatingPixels(uint16_t *eeData, paramsMLX90640 *mlx90640); static int ExtractDeviatingPixels(uint16_t *eeData, paramsMLX90640 *mlx90640);
int CheckAdjacentPixels(uint16_t pix1, uint16_t pix2); static int CheckAdjacentPixels(uint16_t pix1, uint16_t pix2);
float GetMedian(float *values, int n); static float GetMedian(float *values, int n);
int IsPixelBad(uint16_t pixel,paramsMLX90640 *params); static int IsPixelBad(uint16_t pixel,paramsMLX90640 *params);
int ValidateFrameData(uint16_t *frameData); static int ValidateFrameData(uint16_t *frameData);
int ValidateAuxData(uint16_t *auxData); static int ValidateAuxData(uint16_t *auxData);
int MLX90640_DumpEE(uint8_t slaveAddr, uint16_t *eeData) int MLX90640_DumpEE(uint8_t slaveAddr, uint16_t *eeData)
{ {

View File

@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,25 @@
# This file is part of the OpenMV project.
#
# Copyright (c) 2013-2021 Ibrahim Abdelkader <iabdalkader@openmv.io>
# Copyright (c) 2013-2021 Kwabena W. Agyeman <kwagyeman@openmv.io>
#
# This work is licensed under the MIT license, see the file LICENSE for details.
#
# MLX90641 Makefile
SRCS = $(wildcard src/*.c)
OBJS = $(addprefix $(BUILD)/, $(SRCS:.c=.o))
OBJ_DIRS = $(sort $(dir $(OBJS)))
all: | $(OBJ_DIRS) $(OBJS)
$(OBJ_DIRS):
$(MKDIR) -p $@
$(BUILD)/%.o : %.c
$(ECHO) "CC $<"
$(CC) $(CFLAGS) -c -o $@ $<
$(BUILD)/%.o : %.s
$(ECHO) "AS $<"
$(AS) $(AFLAGS) $< -o $@
-include $(OBJS:%.o=%.d)

View File

@ -0,0 +1,69 @@
/**
* @copyright (C) 2017 Melexis N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _MLX90641_API_H_
#define _MLX90641_API_H_
#define SCALEALPHA 0.000001
typedef struct
{
int16_t kVdd;
int16_t vdd25;
float KvPTAT;
float KtPTAT;
uint16_t vPTAT25;
float alphaPTAT;
int16_t gainEE;
float tgc;
float cpKv;
float cpKta;
uint8_t resolutionEE;
uint8_t calibrationModeEE;
float KsTa;
float ksTo[8];
int16_t ct[8];
uint16_t alpha[192];
uint8_t alphaScale;
int16_t offset[2][192];
int8_t kta[192];
uint8_t ktaScale;
int8_t kv[192];
uint8_t kvScale;
float cpAlpha;
int16_t cpOffset;
float emissivityEE;
uint16_t brokenPixel;
} paramsMLX90641;
int MLX90641_DumpEE(uint8_t slaveAddr, uint16_t *eeData);
int MLX90641_SynchFrame(uint8_t slaveAddr);
int MLX90641_TriggerMeasurement(uint8_t slaveAddr);
int MLX90641_GetFrameData(uint8_t slaveAddr, uint16_t *frameData);
int MLX90641_ExtractParameters(uint16_t *eeData, paramsMLX90641 *mlx90641);
float MLX90641_GetVdd(uint16_t *frameData, const paramsMLX90641 *params);
float MLX90641_GetTa(uint16_t *frameData, const paramsMLX90641 *params);
void MLX90641_GetImage(uint16_t *frameData, const paramsMLX90641 *params, float *result);
void MLX90641_CalculateTo(uint16_t *frameData, const paramsMLX90641 *params, float emissivity, float tr, float *result);
int MLX90641_SetResolution(uint8_t slaveAddr, uint8_t resolution);
int MLX90641_GetCurResolution(uint8_t slaveAddr);
int MLX90641_SetRefreshRate(uint8_t slaveAddr, uint8_t refreshRate);
int MLX90641_GetRefreshRate(uint8_t slaveAddr);
int MLX90641_GetSubPageNumber(uint16_t *frameData);
float MLX90641_GetEmissivity(const paramsMLX90641 *mlx90641);
void MLX90641_BadPixelsCorrection(uint16_t pixel, float *to);
#endif

View File

@ -0,0 +1,25 @@
/**
* @copyright (C) 2017 Melexis N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef _MLX90641_I2C_Driver_H_
#define _MLX90641_I2C_Driver_H_
#include <stdint.h>
void MLX90641_I2CInit(cambus_t *bus);
int MLX90641_I2CGeneralReset(void);
int MLX90641_I2CRead(uint8_t slaveAddr,uint16_t startAddress, uint16_t nMemAddressRead, uint16_t *data);
int MLX90641_I2CWrite(uint8_t slaveAddr,uint16_t writeAddress, uint16_t data);
void MLX90641_I2CFreqSet(int freq);
#endif //_MLX90641_I2C_Driver_H_

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,69 @@
/**
* @copyright (C) 2017 Melexis N.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#include <stdio.h>
#include "cambus.h"
#include "MLX90641_I2C_Driver.h"
static cambus_t *bus;
void MLX90641_I2CInit(cambus_t *hbus)
{
bus = hbus;
}
int MLX90641_I2CGeneralReset(void)
{
if (cambus_gencall(bus, 0x06) != 0) {
return -1;
}
return 0;
}
int MLX90641_I2CRead(uint8_t slaveAddr, uint16_t startAddress, uint16_t nMemAddressRead, uint16_t *data)
{
startAddress = __REVSH(startAddress);
if (cambus_write_bytes(bus, (slaveAddr<<1), (uint8_t *) &startAddress, 2, CAMBUS_XFER_NO_STOP) != 0) {
return -1;
}
if (cambus_read_bytes(bus, (slaveAddr<<1), (uint8_t *) data, nMemAddressRead*2, CAMBUS_XFER_NO_FLAGS) != 0) {
return -1;
}
for(int i=0; i<nMemAddressRead; i++) {
data[i] = __REVSH(data[i]);
}
return 0;
}
int MLX90641_I2CWrite(uint8_t slaveAddr, uint16_t writeAddress, uint16_t data)
{
data = __REVSH(data);
writeAddress = __REVSH(writeAddress);
if (cambus_write_bytes(bus, (slaveAddr << 1), (uint8_t*) &writeAddress, 2, CAMBUS_XFER_SUSPEND) != 0) {
return -1;
}
if (cambus_write_bytes(bus, (slaveAddr << 1), (uint8_t *) &data, 2, CAMBUS_XFER_NO_FLAGS) != 0) {
return -1;
}
return 0;
}

View File

@ -123,6 +123,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (1)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (0) #define OMV_ENABLE_FIR_LEPTON (0)

View File

@ -282,6 +282,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (0)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (1) #define OMV_ENABLE_FIR_LEPTON (1)

View File

@ -283,6 +283,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (1)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (1) #define OMV_ENABLE_FIR_LEPTON (1)

View File

@ -398,6 +398,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (0)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (1) #define OMV_ENABLE_FIR_LEPTON (1)

View File

@ -83,7 +83,7 @@
#endif #endif
// Enable get_similarity() // Enable get_similarity()
#define IMLIB_ENABLE_GET_SIMILARITY // #define IMLIB_ENABLE_GET_SIMILARITY
// Enable find_lines() // Enable find_lines()
#define IMLIB_ENABLE_FIND_LINES #define IMLIB_ENABLE_FIND_LINES

View File

@ -436,6 +436,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (1)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (1) #define OMV_ENABLE_FIR_LEPTON (1)

View File

@ -544,6 +544,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (1)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (1) #define OMV_ENABLE_FIR_LEPTON (1)

View File

@ -385,6 +385,7 @@
// FIR Module // FIR Module
#define OMV_ENABLE_FIR_MLX90621 (1) #define OMV_ENABLE_FIR_MLX90621 (1)
#define OMV_ENABLE_FIR_MLX90640 (1) #define OMV_ENABLE_FIR_MLX90640 (1)
#define OMV_ENABLE_FIR_MLX90641 (1)
#define OMV_ENABLE_FIR_AMG8833 (1) #define OMV_ENABLE_FIR_AMG8833 (1)
#define OMV_ENABLE_FIR_LEPTON (1) #define OMV_ENABLE_FIR_LEPTON (1)

View File

@ -21,6 +21,10 @@
#include "MLX90640_API.h" #include "MLX90640_API.h"
#include "MLX90640_I2C_Driver.h" #include "MLX90640_I2C_Driver.h"
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
#include "MLX90641_API.h"
#include "MLX90641_I2C_Driver.h"
#endif
#include "framebuffer.h" #include "framebuffer.h"
#include "py_assert.h" #include "py_assert.h"
@ -43,6 +47,12 @@
#define MLX90640_EEPROM_DATA_SIZE 832 #define MLX90640_EEPROM_DATA_SIZE 832
#define MLX90640_FRAME_DATA_SIZE 834 #define MLX90640_FRAME_DATA_SIZE 834
#define MLX90641_ADDR 0x33
#define MLX90641_WIDTH 16
#define MLX90641_HEIGHT 12
#define MLX90641_EEPROM_DATA_SIZE 832
#define MLX90641_FRAME_DATA_SIZE 242
#define AMG8833_ADDR 0xD2 #define AMG8833_ADDR 0xD2
#define AMG8833_WIDTH 8 #define AMG8833_WIDTH 8
#define AMG8833_HEIGHT 8 #define AMG8833_HEIGHT 8
@ -63,7 +73,7 @@
}) })
static cambus_t fir_bus = {}; static cambus_t fir_bus = {};
#if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1)) #if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1))
static void *fir_mlx_data = NULL; static void *fir_mlx_data = NULL;
#endif #endif
@ -75,6 +85,9 @@ static enum {
#if (OMV_ENABLE_FIR_MLX90640 == 1) #if (OMV_ENABLE_FIR_MLX90640 == 1)
FIR_MLX90640, FIR_MLX90640,
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
FIR_MLX90641,
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
FIR_AMG8833, FIR_AMG8833,
#endif #endif
@ -155,6 +168,20 @@ static void fir_MLX90640_get_frame(float *Ta, float *To)
} }
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
static void fir_MLX90641_get_frame(float *Ta, float *To)
{
uint16_t *data = fb_alloc(MLX90641_FRAME_DATA_SIZE * sizeof(uint16_t), FB_ALLOC_NO_HINT);
PY_ASSERT_TRUE_MSG(MLX90641_GetFrameData(MLX90641_ADDR, data) >= 0,
"Failed to read the MLX90641 sensor data!");
*Ta = MLX90641_GetTa(data, fir_mlx_data);
MLX90641_CalculateTo(data, fir_mlx_data, 0.95f, *Ta - 8, To);
fb_free();
}
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
static void fir_AMG8833_get_frame(float *Ta, float *To) static void fir_AMG8833_get_frame(float *Ta, float *To)
{ {
@ -266,7 +293,7 @@ static mp_obj_t py_fir_deinit()
fir_sensor = FIR_NONE; fir_sensor = FIR_NONE;
} }
#if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1)) #if ((OMV_ENABLE_FIR_MLX90621 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1))
if (fir_mlx_data != NULL) { if (fir_mlx_data != NULL) {
xfree(fir_mlx_data); xfree(fir_mlx_data);
fir_mlx_data = NULL; fir_mlx_data = NULL;
@ -303,6 +330,12 @@ mp_obj_t py_fir_init(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
break; break;
} }
#endif #endif
#if (OMV_ENABLE_FIR_MLX90640 == 0) && (OMV_ENABLE_FIR_MLX90641 == 1)
case (MLX90641_ADDR << 1): {
type = FIR_MLX90641;
break;
}
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
case AMG8833_ADDR: { case AMG8833_ADDR: {
type = FIR_AMG8833; type = FIR_AMG8833;
@ -429,6 +462,52 @@ mp_obj_t py_fir_init(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
return mp_const_none; return mp_const_none;
} }
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
case FIR_MLX90641: {
// parse refresh rate and ADC resolution
int ir_fresh_rate = py_helper_keyword_int(n_args, args, 1, kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_refresh), 32);
int adc_resolution = py_helper_keyword_int(n_args, args, 2, kw_args, MP_OBJ_NEW_QSTR(MP_QSTR_resolution), 19);
// sanitize values
ir_fresh_rate = __CLZ(__RBIT((ir_fresh_rate > 64) ? 64 : ((ir_fresh_rate < 1) ? 1 : ir_fresh_rate))) + 1;
adc_resolution = ((adc_resolution > 19) ? 19 : ((adc_resolution < 16) ? 16 : adc_resolution)) - 16;
fir_mlx_data = xalloc(sizeof(paramsMLX90641));
fir_sensor = FIR_MLX90641;
FIR_MLX90641_RETRY:
cambus_init(&fir_bus, FIR_I2C_ID, CAMBUS_SPEED_FULL); // The EEPROM must be read at <= 400KHz.
MLX90641_I2CInit(&fir_bus);
fb_alloc_mark();
uint16_t *eeprom = fb_alloc(MLX90641_EEPROM_DATA_SIZE * sizeof(uint16_t), FB_ALLOC_NO_HINT);
int error = MLX90641_DumpEE(MLX90641_ADDR, eeprom);
error |= MLX90641_SetRefreshRate(MLX90641_ADDR, ir_fresh_rate);
error |= MLX90641_SetResolution(MLX90641_ADDR, adc_resolution);
error |= MLX90641_ExtractParameters(eeprom, fir_mlx_data);
fb_alloc_free_till_mark();
if (error != 0) {
if (first_init) {
first_init = false;
cambus_pulse_scl(&fir_bus);
goto FIR_MLX90641_RETRY;
} else {
py_fir_deinit();
mp_raise_msg(&mp_type_ValueError, MP_ERROR_TEXT("Failed to init the MLX90641!"));
}
}
// Switch to FAST speed
cambus_deinit(&fir_bus);
cambus_init(&fir_bus, FIR_I2C_ID, CAMBUS_SPEED_FAST);
fir_width = MLX90641_WIDTH;
fir_height = MLX90641_HEIGHT;
fir_ir_fresh_rate = ir_fresh_rate;
fir_adc_resolution = adc_resolution;
return mp_const_none;
}
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
case FIR_AMG8833: { case FIR_AMG8833: {
fir_sensor = FIR_AMG8833; fir_sensor = FIR_AMG8833;
@ -513,8 +592,8 @@ static mp_obj_t py_fir_refresh()
#if (OMV_ENABLE_FIR_MLX90621 == 1) #if (OMV_ENABLE_FIR_MLX90621 == 1)
const int mlx_90621_refresh_rates[16] = {512, 512, 512, 512, 512, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0}; const int mlx_90621_refresh_rates[16] = {512, 512, 512, 512, 512, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 0};
#endif #endif
#if (OMV_ENABLE_FIR_MLX90640 == 1) #if (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90641 == 1)
const int mlx_90640_refresh_rates[8] = {0, 1, 2, 4, 8, 16, 32, 64}; const int mlx_90640_1_refresh_rates[8] = {0, 1, 2, 4, 8, 16, 32, 64};
#endif #endif
switch (fir_sensor) { switch (fir_sensor) {
case FIR_NONE: case FIR_NONE:
@ -523,9 +602,14 @@ static mp_obj_t py_fir_refresh()
case FIR_MLX90621: case FIR_MLX90621:
return mp_obj_new_int(mlx_90621_refresh_rates[fir_ir_fresh_rate]); return mp_obj_new_int(mlx_90621_refresh_rates[fir_ir_fresh_rate]);
#endif #endif
#if (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1)
#if (OMV_ENABLE_FIR_MLX90640 == 1) #if (OMV_ENABLE_FIR_MLX90640 == 1)
case FIR_MLX90640: case FIR_MLX90640:
return mp_obj_new_int(mlx_90640_refresh_rates[fir_ir_fresh_rate]); #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
case FIR_MLX90641:
#endif
return mp_obj_new_int(mlx_90640_1_refresh_rates[fir_ir_fresh_rate]);
#endif #endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
case FIR_AMG8833: case FIR_AMG8833:
@ -550,8 +634,13 @@ static mp_obj_t py_fir_resolution()
case FIR_MLX90621: case FIR_MLX90621:
return mp_obj_new_int(fir_adc_resolution + 15); return mp_obj_new_int(fir_adc_resolution + 15);
#endif #endif
#if (OMV_ENABLE_FIR_MLX90640 == 1) || (OMV_ENABLE_FIR_MLX90640 == 1)
#if (OMV_ENABLE_FIR_MLX90640 == 1) #if (OMV_ENABLE_FIR_MLX90640 == 1)
case FIR_MLX90640: case FIR_MLX90640:
#endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
case FIR_MLX90641:
#endif
return mp_obj_new_int(fir_adc_resolution + 16); return mp_obj_new_int(fir_adc_resolution + 16);
#endif #endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
@ -630,6 +719,17 @@ mp_obj_t py_fir_read_ta()
return result; return result;
} }
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
case FIR_MLX90641: {
fb_alloc_mark();
uint16_t *data = fb_alloc(MLX90641_FRAME_DATA_SIZE * sizeof(uint16_t), FB_ALLOC_NO_HINT);
PY_ASSERT_TRUE_MSG(MLX90641_GetFrameData(MLX90641_ADDR, data) >= 0,
"Failed to read the MLX90641 sensor data!");
mp_obj_t result = mp_obj_new_float(MLX90641_GetTa(data, fir_mlx_data));
fb_alloc_free_till_mark();
return result;
}
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
case FIR_AMG8833: { case FIR_AMG8833: {
int16_t temp; int16_t temp;
@ -683,6 +783,17 @@ mp_obj_t py_fir_read_ir(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
return result; return result;
} }
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
case FIR_MLX90641: {
fb_alloc_mark();
float Ta, *To = fb_alloc(MLX90641_WIDTH * MLX90641_HEIGHT * sizeof(float), FB_ALLOC_NO_HINT);
fir_MLX90641_get_frame(&Ta, To);
mp_obj_t result = fir_get_ir(MLX90641_WIDTH, MLX90641_HEIGHT, Ta, To,
arg_hmirror ^ true, arg_vflip, fir_transposed, false);
fb_alloc_free_till_mark();
return result;
}
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
case FIR_AMG8833: { case FIR_AMG8833: {
fb_alloc_mark(); fb_alloc_mark();
@ -1011,6 +1122,21 @@ mp_obj_t py_fir_snapshot(uint n_args, const mp_obj_t *args, mp_map_t *kw_args)
break; break;
} }
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
case FIR_MLX90641: {
float Ta, *To = fb_alloc(MLX90641_WIDTH * MLX90641_HEIGHT * sizeof(float), FB_ALLOC_NO_HINT);
fir_MLX90641_get_frame(&Ta, To);
if (!scale_obj) {
fast_get_min_max(To, MLX90641_WIDTH * MLX90641_HEIGHT, &min, &max);
}
imlib_fill_image_from_float(&src_img, MLX90641_WIDTH, MLX90641_HEIGHT, To, min, max,
arg_hmirror ^ true, arg_vflip, arg_transpose, false);
fb_free();
break;
}
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
case FIR_AMG8833: { case FIR_AMG8833: {
float Ta, *To = fb_alloc(AMG8833_WIDTH * AMG8833_HEIGHT * sizeof(float), FB_ALLOC_NO_HINT); float Ta, *To = fb_alloc(AMG8833_WIDTH * AMG8833_HEIGHT * sizeof(float), FB_ALLOC_NO_HINT);
@ -1058,6 +1184,9 @@ STATIC const mp_rom_map_elem_t globals_dict_table[] = {
#if (OMV_ENABLE_FIR_MLX90640 == 1) #if (OMV_ENABLE_FIR_MLX90640 == 1)
{ MP_ROM_QSTR(MP_QSTR_FIR_MLX90640), MP_ROM_INT(FIR_MLX90640) }, { MP_ROM_QSTR(MP_QSTR_FIR_MLX90640), MP_ROM_INT(FIR_MLX90640) },
#endif #endif
#if (OMV_ENABLE_FIR_MLX90641 == 1)
{ MP_ROM_QSTR(MP_QSTR_FIR_MLX90641), MP_ROM_INT(FIR_MLX90641) },
#endif
#if (OMV_ENABLE_FIR_AMG8833 == 1) #if (OMV_ENABLE_FIR_AMG8833 == 1)
{ MP_ROM_QSTR(MP_QSTR_FIR_AMG8833), MP_ROM_INT(FIR_AMG8833) }, { MP_ROM_QSTR(MP_QSTR_FIR_AMG8833), MP_ROM_INT(FIR_AMG8833) },
#endif #endif

View File

@ -1227,6 +1227,7 @@ Q(FIR_NONE)
Q(FIR_SHIELD) Q(FIR_SHIELD)
Q(FIR_MLX90621) Q(FIR_MLX90621)
Q(FIR_MLX90640) Q(FIR_MLX90640)
Q(FIR_MLX90641)
Q(FIR_AMG8833) Q(FIR_AMG8833)
Q(FIR_LEPTON) Q(FIR_LEPTON)
// duplicate Q(init) // duplicate Q(init)

View File

@ -55,6 +55,7 @@ OMV_CFLAGS += -I$(TOP_DIR)/$(LSM6DS3_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(WINC1500_DIR)/include/ OMV_CFLAGS += -I$(TOP_DIR)/$(WINC1500_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90621_DIR)/include/ OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90621_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90640_DIR)/include/ OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90640_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90641_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(TENSORFLOW_DIR)/$(CPU)/ OMV_CFLAGS += -I$(TOP_DIR)/$(TENSORFLOW_DIR)/$(CPU)/
OMV_CFLAGS += -I$(TOP_DIR)/$(LIBPDM_DIR)/ OMV_CFLAGS += -I$(TOP_DIR)/$(LIBPDM_DIR)/
@ -81,6 +82,7 @@ FIRM_OBJ += $(wildcard $(BUILD)/$(WINC1500_DIR)/src/*.o)
endif endif
FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90621_DIR)/src/*.o) FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90621_DIR)/src/*.o)
FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90640_DIR)/src/*.o) FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90640_DIR)/src/*.o)
FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90641_DIR)/src/*.o)
#------------- OpenMV Objects ----------------# #------------- OpenMV Objects ----------------#
FIRM_OBJ += $(addprefix $(BUILD)/$(CMSIS_DIR)/src/, \ FIRM_OBJ += $(addprefix $(BUILD)/$(CMSIS_DIR)/src/, \
@ -346,6 +348,7 @@ FIRMWARE_OBJS: | $(BUILD) $(FW_DIR)
$(MAKE) -C $(HAL_DIR) BUILD=$(BUILD)/$(HAL_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(HAL_DIR) BUILD=$(BUILD)/$(HAL_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(MLX90621_DIR) BUILD=$(BUILD)/$(MLX90621_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(MLX90621_DIR) BUILD=$(BUILD)/$(MLX90621_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(MLX90640_DIR) BUILD=$(BUILD)/$(MLX90640_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(MLX90640_DIR) BUILD=$(BUILD)/$(MLX90640_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(MLX90641_DIR) BUILD=$(BUILD)/$(MLX90641_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(OMV_DIR) BUILD=$(BUILD)/$(OMV_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(OMV_DIR) BUILD=$(BUILD)/$(OMV_DIR) CFLAGS="$(CFLAGS) -MMD"
$(FIRMWARE): FIRMWARE_OBJS $(FIRMWARE): FIRMWARE_OBJS

View File

@ -43,6 +43,7 @@ OMV_CFLAGS += -I$(TOP_DIR)/$(LSM6DS3_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(WINC1500_DIR)/include/ OMV_CFLAGS += -I$(TOP_DIR)/$(WINC1500_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90621_DIR)/include/ OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90621_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90640_DIR)/include/ OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90640_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(MLX90641_DIR)/include/
OMV_CFLAGS += -I$(TOP_DIR)/$(TENSORFLOW_DIR)/$(CPU)/ OMV_CFLAGS += -I$(TOP_DIR)/$(TENSORFLOW_DIR)/$(CPU)/
OMV_CFLAGS += -I$(TOP_DIR)/$(LIBPDM_DIR)/ OMV_CFLAGS += -I$(TOP_DIR)/$(LIBPDM_DIR)/
@ -91,6 +92,7 @@ FIRM_OBJ += $(wildcard $(BUILD)/$(WINC1500_DIR)/src/*.o)
endif endif
FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90621_DIR)/src/*.o) FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90621_DIR)/src/*.o)
FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90640_DIR)/src/*.o) FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90640_DIR)/src/*.o)
FIRM_OBJ += $(wildcard $(BUILD)/$(MLX90641_DIR)/src/*.o)
#------------- OpenMV Objects ----------------# #------------- OpenMV Objects ----------------#
FIRM_OBJ += $(addprefix $(BUILD)/$(CMSIS_DIR)/src/, \ FIRM_OBJ += $(addprefix $(BUILD)/$(CMSIS_DIR)/src/, \
@ -482,6 +484,7 @@ UVC_OBJ += $(wildcard $(BUILD)/$(LSM6DS3_DIR)/src/*.o)
endif endif
UVC_OBJ += $(wildcard $(BUILD)/$(MLX90621_DIR)/src/*.o) UVC_OBJ += $(wildcard $(BUILD)/$(MLX90621_DIR)/src/*.o)
UVC_OBJ += $(wildcard $(BUILD)/$(MLX90640_DIR)/src/*.o) UVC_OBJ += $(wildcard $(BUILD)/$(MLX90640_DIR)/src/*.o)
UVC_OBJ += $(wildcard $(BUILD)/$(MLX90641_DIR)/src/*.o)
endif endif
################################################### ###################################################
@ -527,6 +530,7 @@ ifeq ($(MICROPY_PY_WINC1500), 1)
endif endif
$(MAKE) -C $(MLX90621_DIR) BUILD=$(BUILD)/$(MLX90621_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(MLX90621_DIR) BUILD=$(BUILD)/$(MLX90621_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(MLX90640_DIR) BUILD=$(BUILD)/$(MLX90640_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(MLX90640_DIR) BUILD=$(BUILD)/$(MLX90640_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(MLX90641_DIR) BUILD=$(BUILD)/$(MLX90641_DIR) CFLAGS="$(CFLAGS) -MMD"
$(MAKE) -C $(OMV_DIR) BUILD=$(BUILD)/$(OMV_DIR) CFLAGS="$(CFLAGS) -MMD" $(MAKE) -C $(OMV_DIR) BUILD=$(BUILD)/$(OMV_DIR) CFLAGS="$(CFLAGS) -MMD"
ifeq ($(CUBEAI), 1) ifeq ($(CUBEAI), 1)
$(MAKE) -C $(CUBEAI_DIR) BUILD=$(BUILD)/$(CUBEAI_DIR) CFLAGS="$(CFLAGS) -fno-strict-aliasing -MMD" $(MAKE) -C $(CUBEAI_DIR) BUILD=$(BUILD)/$(CUBEAI_DIR) CFLAGS="$(CFLAGS) -fno-strict-aliasing -MMD"