- Changed order cards in HTML

- Optimization lookups
This commit is contained in:
Rene Zeldenthuis
2023-02-09 00:51:37 +01:00
parent 2739ed4953
commit 276b0d4230
7 changed files with 24 additions and 31 deletions

View File

@@ -3,10 +3,9 @@
#include <string.h>
#include <esp_camera.h>
typedef char camera_gainceiling_name_t[5];
typedef struct
{
const camera_gainceiling_name_t name;
const char name[5];
const gainceiling_t value;
} camera_gainceiling_entry_t;
@@ -23,7 +22,7 @@ const gainceiling_t lookup_camera_gainceiling(const char *name)
{
// Lookup table for the frame name to framesize_t
for (const auto &entry : camera_gain_ceilings)
if (strncmp(entry.name, name, sizeof(camera_gainceiling_entry_t)) == 0)
if (strncmp(entry.name, name, sizeof(entry.name)) == 0)
return entry.value;
return GAINCEILING_2X;