diff --git a/firmware/console/binary/tunerstudio_outputs.h b/firmware/console/binary/tunerstudio_outputs.h index 5dd709129e..46049220e0 100644 --- a/firmware/console/binary/tunerstudio_outputs.h +++ b/firmware/console/binary/tunerstudio_outputs.h @@ -14,9 +14,9 @@ #include "scaled_channel.h" #include "tunerstudio_debug_struct.h" -typedef struct { +struct egt_values_s { uint16_t values[EGT_CHANNEL_COUNT]; -} egt_values_s; +}; enum class TsCalMode : uint8_t { @@ -42,7 +42,7 @@ enum class TsCalMode : uint8_t { * * please be aware that 'float' (F32) type requires TunerStudio version 2.6 and later */ -typedef struct { +struct TunerStudioOutputChannels { /* see also [OutputChannels] in rusefi.input */ /** @@ -288,7 +288,6 @@ typedef struct { /* see also [OutputChannels] in rusefi.input */ /* see also TS_OUTPUT_SIZE in rusefi_config.txt */ - -} TunerStudioOutputChannels; +}; extern TunerStudioOutputChannels tsOutputChannels; diff --git a/firmware/controllers/actuators/electronic_throttle_impl.h b/firmware/controllers/actuators/electronic_throttle_impl.h index 613b08a419..71ce93220c 100644 --- a/firmware/controllers/actuators/electronic_throttle_impl.h +++ b/firmware/controllers/actuators/electronic_throttle_impl.h @@ -31,7 +31,7 @@ public: void reset() override; // Update the controller's state: read sensors, send output, etc - void update(); + void update() override; // Called when the configuration may have changed. Controller will // reset if necessary. diff --git a/firmware/controllers/gauges/malfunction_central.h b/firmware/controllers/gauges/malfunction_central.h index b8731f5981..0e88d9795a 100644 --- a/firmware/controllers/gauges/malfunction_central.h +++ b/firmware/controllers/gauges/malfunction_central.h @@ -13,10 +13,10 @@ #define MAX_ERROR_CODES_COUNT 10 -typedef struct { +struct error_codes_set_s { int count = 0; obd_code_e error_codes[MAX_ERROR_CODES_COUNT]; -} error_codes_set_s; +}; /** * @brief Adds an error code into the set of current errors. diff --git a/firmware/controllers/serial/serial_sensor.cpp b/firmware/controllers/serial/serial_sensor.cpp index f7f76fb12a..53ccd6ba83 100644 --- a/firmware/controllers/serial/serial_sensor.cpp +++ b/firmware/controllers/serial/serial_sensor.cpp @@ -33,15 +33,14 @@ typedef enum SUPP_V_LOW = 9 } sensor_error_code_t; -typedef struct -{ +struct sensor_data_t { int function_code; float AFR; float AFR_multiplier; float lambda; float warmup; sensor_error_code_t error_code; -} sensor_data_t; +}; static sensor_data_t innovate_o2_sensor[NUM_INNOVATE_O2_SENSORS]; diff --git a/firmware/controllers/settings.cpp b/firmware/controllers/settings.cpp index 681c2551f7..1deecb3e81 100644 --- a/firmware/controllers/settings.cpp +++ b/firmware/controllers/settings.cpp @@ -887,20 +887,20 @@ static void printAllInfo(void) { #endif } -typedef struct { +struct plain_get_integer_s { const char *token; int *value; -} plain_get_integer_s; +}; -typedef struct { +struct plain_get_short_s { const char *token; uint16_t *value; -} plain_get_short_s; +}; -typedef struct { +struct plain_get_float_s { const char *token; float *value; -} plain_get_float_s; +}; #if ! EFI_UNIT_TEST @@ -1030,15 +1030,15 @@ static void setFsioCurve2Value(float value) { setLinearCurve(engineConfiguration->fsioCurve2, value, value, 1); } -typedef struct { +struct command_i_s { const char *token; VoidInt callback; -} command_i_s; +}; -typedef struct { +struct command_f_s { const char *token; VoidFloat callback; -} command_f_s; +}; const command_f_s commandsF[] = { #if EFI_ENGINE_CONTROL diff --git a/firmware/hw_layer/digital_input/digital_input.h b/firmware/hw_layer/digital_input/digital_input.h index eeced5010e..02383a7ed1 100644 --- a/firmware/hw_layer/digital_input/digital_input.h +++ b/firmware/hw_layer/digital_input/digital_input.h @@ -10,7 +10,7 @@ #include "global.h" #include "listener_array.h" -typedef struct { +struct digital_input_s { #if HAL_USE_ICU ICUDriver *driver; #endif /* HAL_USE_ICU */ @@ -24,4 +24,4 @@ typedef struct { // Width/Period names are historically inherited from ICU implementation, todo: migrate to better names, high/low? rise/hall? void setWidthCallback(VoidInt handler, void *arg); void setPeriodCallback(VoidInt handler, void *arg); -} digital_input_s; +};