Skip to content

Commit 8c87be0

Browse files
Fix a bug where bilinear interpolation was not weighted correctly after changing resolution.
1 parent b6cc6c5 commit 8c87be0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

MLX90640.ino

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#endif
1919

2020
/*--------------------------------------------------------------------------------
21-
* Step 2: Configure Operational settings
21+
* Step 2: Configure operational settings
2222
*--------------------------------------------------------------------------------*/
2323
#define ENA_INTERPOLATION true // Enable interpolation
2424
#define ENA_MULTITASKING true // Enable multi-task by FreeRTOS
@@ -52,10 +52,10 @@
5252
* Step 4: Configure flash memory setting to save touch calibration data
5353
* Preferences requires at least 2 partitions. Check the partition scheme on Tools.
5454
*--------------------------------------------------------------------------------*/
55-
#define USE_PREFERENCES true
55+
#define USE_PREFERENCES false
5656

5757
/*--------------------------------------------------------------------------------
58-
* Configure MLX90640 settings
58+
* Step 5: Configure resolution settings
5959
*--------------------------------------------------------------------------------*/
6060
#if ENA_INTERPOLATION
6161
#define INTERPOLATE_SCALE 8
@@ -194,9 +194,6 @@ void setup() {
194194
touch_setup();
195195
widget_setup();
196196

197-
// Initialize interpolation
198-
interpolate_setup(mlx_cnf.interpolation);
199-
200197
#if ENA_MULTITASKING
201198
// Start tasks
202199
task_setup(ProcessInput, ProcessOutput);

mlx.hpp

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ typedef struct MLXConfig {
7676

7777
void filter_reset(void);
7878
filter_reset();
79+
80+
void interpolate_setup(const int);
81+
interpolate_setup(interpolation);
7982
}
8083
} MLXConfig_t;
8184

0 commit comments

Comments
 (0)