refactoring: const
This commit is contained in:
parent
6348d21d44
commit
2aa66e22fb
|
@ -35,7 +35,7 @@ void initDataStructures(DECLARE_ENGINE_PARAMETER_F) {
|
|||
initSpeedDensity(PASS_ENGINE_PARAMETER_F);
|
||||
}
|
||||
|
||||
void initAlgo(Logging *sharedLogger, engine_configuration_s *engineConfiguration) {
|
||||
void initAlgo(Logging *sharedLogger, const engine_configuration_s *engineConfiguration) {
|
||||
initInterpolation(sharedLogger);
|
||||
#if EFI_SIMULATOR
|
||||
// todo: this is a mess, remove code duplication with PROD
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
#include "main.h"
|
||||
#include "engine_configuration.h"
|
||||
void initDataStructures(DECLARE_ENGINE_PARAMETER_F);
|
||||
void initAlgo(Logging *sharedLogger, engine_configuration_s *engineConfiguration);
|
||||
void initAlgo(Logging *sharedLogger, const engine_configuration_s *engineConfiguration);
|
||||
|
||||
#endif /* ALGO_H_ */
|
||||
|
|
|
@ -78,7 +78,7 @@ void printSpiState(Logging *logger, board_configuration_s *boardConfiguration) {
|
|||
|
||||
extern board_configuration_s *boardConfiguration;
|
||||
|
||||
static void printOutputs(engine_configuration_s *engineConfiguration) {
|
||||
static void printOutputs(const engine_configuration_s *engineConfiguration) {
|
||||
scheduleMsg(&logger, "injectionPins: mode %s", getPin_output_mode_e(boardConfiguration->injectionPinMode));
|
||||
for (int i = 0; i < engineConfiguration->specs.cylindersCount; i++) {
|
||||
brain_pin_e brainPin = boardConfiguration->injectionPins[i];
|
||||
|
@ -198,7 +198,7 @@ const char* getConfigurationName(engine_type_e engineType) {
|
|||
/**
|
||||
* @brief Prints current engine configuration to human-readable console.
|
||||
*/
|
||||
void printConfiguration(engine_configuration_s *engineConfiguration) {
|
||||
void printConfiguration(const engine_configuration_s *engineConfiguration) {
|
||||
|
||||
scheduleMsg(&logger, "Template %s/%d trigger %s/%s/%d", getConfigurationName(engineConfiguration->engineType),
|
||||
engineConfiguration->engineType, getTrigger_type_e(engineConfiguration->trigger.type),
|
||||
|
@ -1134,7 +1134,7 @@ static void setValue(const char *paramStr, const char *valueStr) {
|
|||
}
|
||||
}
|
||||
|
||||
void initSettings(engine_configuration_s *engineConfiguration) {
|
||||
void initSettings(const engine_configuration_s *engineConfiguration) {
|
||||
// todo: start saving values into flash right away?
|
||||
|
||||
addConsoleActionP("showconfig", (VoidPtr) doPrintConfiguration, &engine);
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
#include "engine.h"
|
||||
|
||||
void initSettings(engine_configuration_s *engineConfiguration);
|
||||
void initSettings(const engine_configuration_s *engineConfiguration);
|
||||
void printSpiState(Logging *logger, board_configuration_s *boardConfiguration);
|
||||
void printConfiguration(engine_configuration_s *engineConfiguration);
|
||||
void printConfiguration(const engine_configuration_s *engineConfiguration);
|
||||
void stopEngine(void);
|
||||
void setEngineType(int value);
|
||||
const char* getConfigurationName(engine_type_e engineType);
|
||||
|
|
Loading…
Reference in New Issue