Skip to content

Commit

Permalink
EFI_ACTIVE_CONFIGURATION_IN_FLASH
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Aug 7, 2024
1 parent 48b8f08 commit 4f1c7fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 1 addition & 2 deletions firmware/controllers/algo/engine_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@
*
* todo: place this field next to 'engineConfiguration'?
*/
static engine_configuration_s activeConfigurationLocalStorage;
engine_configuration_s & activeConfiguration = activeConfigurationLocalStorage;
engine_configuration_s activeConfiguration;

void rememberCurrentConfiguration() {
memcpy(&activeConfiguration, engineConfiguration, sizeof(engine_configuration_s));
Expand Down
9 changes: 1 addition & 8 deletions firmware/controllers/algo/engine_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,7 @@ extern engine_configuration_s *engineConfiguration;
extern persistent_config_s *config;
#endif // EFI_UNIT_TEST

/**
* & is reference in C++ (not C)
* Ref is a pointer that:
* you access with dot instead of arrow
* Cannot be null
* This is about EFI_ACTIVE_CONFIGURATION_IN_FLASH
*/
extern engine_configuration_s & activeConfiguration;
extern engine_configuration_s activeConfiguration;

// We store a special changeable copy of configuration is RAM, so we can just compare them
#define isConfigurationChanged(x) (engineConfiguration->x != activeConfiguration.x)
Expand Down

0 comments on commit 4f1c7fd

Please sign in to comment.