- 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

@@ -2,10 +2,9 @@
#include <string.h>
typedef char camera_wb_mode_name_t[7];
typedef struct
{
const camera_wb_mode_name_t name;
const char name[7];
const int value;
} camera_wb_mode_entry_t;
@@ -20,7 +19,7 @@ const int lookup_camera_wb_mode(const char *name)
{
// Lookup table for the frame name to framesize_t
for (const auto &entry : camera_wb_modes)
if (strncmp(entry.name, name, sizeof(camera_wb_mode_entry_t)) == 0)
if (strncmp(entry.name, name, sizeof(entry.name)) == 0)
return entry.value;
return 0;