auto-sync
This commit is contained in:
parent
7ff2c7ead6
commit
eb4f7c5962
|
@ -1,6 +1,5 @@
|
|||
|
||||
CONSOLESRC = $(PROJECT_DIR)/console/eficonsole.c \
|
||||
$(PROJECT_DIR)/console/console_io.c
|
||||
|
||||
CONSOLE_SRC_CPP = $(PROJECT_DIR)/console/status_loop.cpp
|
||||
CONSOLESRC = $(PROJECT_DIR)/console/console_io.c
|
||||
|
||||
CONSOLE_SRC_CPP = $(PROJECT_DIR)/console/status_loop.cpp \
|
||||
$(PROJECT_DIR)/controllers/error_handling.cpp
|
||||
|
|
|
@ -3,61 +3,6 @@
|
|||
|
||||
#include "main.h"
|
||||
#include "io_pins.h"
|
||||
const char *getIo_pin_e(io_pin_e value){
|
||||
switch(value) {
|
||||
case INJECTOR_10_OUTPUT:
|
||||
return "INJECTOR_10_OUTPUT";
|
||||
case INJECTOR_11_OUTPUT:
|
||||
return "INJECTOR_11_OUTPUT";
|
||||
case INJECTOR_12_OUTPUT:
|
||||
return "INJECTOR_12_OUTPUT";
|
||||
case INJECTOR_1_OUTPUT:
|
||||
return "INJECTOR_1_OUTPUT";
|
||||
case INJECTOR_2_OUTPUT:
|
||||
return "INJECTOR_2_OUTPUT";
|
||||
case INJECTOR_3_OUTPUT:
|
||||
return "INJECTOR_3_OUTPUT";
|
||||
case INJECTOR_4_OUTPUT:
|
||||
return "INJECTOR_4_OUTPUT";
|
||||
case INJECTOR_5_OUTPUT:
|
||||
return "INJECTOR_5_OUTPUT";
|
||||
case INJECTOR_6_OUTPUT:
|
||||
return "INJECTOR_6_OUTPUT";
|
||||
case INJECTOR_7_OUTPUT:
|
||||
return "INJECTOR_7_OUTPUT";
|
||||
case INJECTOR_8_OUTPUT:
|
||||
return "INJECTOR_8_OUTPUT";
|
||||
case INJECTOR_9_OUTPUT:
|
||||
return "INJECTOR_9_OUTPUT";
|
||||
case IO_INVALID:
|
||||
return "IO_INVALID";
|
||||
case SPARKOUT_10_OUTPUT:
|
||||
return "SPARKOUT_10_OUTPUT";
|
||||
case SPARKOUT_11_OUTPUT:
|
||||
return "SPARKOUT_11_OUTPUT";
|
||||
case SPARKOUT_12_OUTPUT:
|
||||
return "SPARKOUT_12_OUTPUT";
|
||||
case SPARKOUT_1_OUTPUT:
|
||||
return "SPARKOUT_1_OUTPUT";
|
||||
case SPARKOUT_2_OUTPUT:
|
||||
return "SPARKOUT_2_OUTPUT";
|
||||
case SPARKOUT_3_OUTPUT:
|
||||
return "SPARKOUT_3_OUTPUT";
|
||||
case SPARKOUT_4_OUTPUT:
|
||||
return "SPARKOUT_4_OUTPUT";
|
||||
case SPARKOUT_5_OUTPUT:
|
||||
return "SPARKOUT_5_OUTPUT";
|
||||
case SPARKOUT_6_OUTPUT:
|
||||
return "SPARKOUT_6_OUTPUT";
|
||||
case SPARKOUT_7_OUTPUT:
|
||||
return "SPARKOUT_7_OUTPUT";
|
||||
case SPARKOUT_8_OUTPUT:
|
||||
return "SPARKOUT_8_OUTPUT";
|
||||
case SPARKOUT_9_OUTPUT:
|
||||
return "SPARKOUT_9_OUTPUT";
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
// auto-generated from../../firmware/\controllers/algo/rusefi_enums.h
|
||||
// by enum2string.jar tool
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
|
||||
#include "io_pins.h"
|
||||
const char *getIo_pin_e(io_pin_e value);
|
||||
// auto-generated from../../firmware/controllers/algo/rusefi_enums.h
|
||||
|
||||
|
||||
|
|
|
@ -134,18 +134,6 @@ public:
|
|||
uint32_t beforeIgnitionSch;
|
||||
uint32_t ignitionSchTime;
|
||||
|
||||
uint32_t time2;
|
||||
uint32_t time3;
|
||||
uint32_t time4;
|
||||
uint32_t time5;
|
||||
uint32_t time6;
|
||||
|
||||
uint32_t before2;
|
||||
uint32_t before3;
|
||||
uint32_t before4;
|
||||
uint32_t before5;
|
||||
uint32_t before6;
|
||||
|
||||
float sparkAtable[DWELL_CURVE_SIZE];
|
||||
float sparkBtable[DWELL_CURVE_SIZE];
|
||||
|
||||
|
|
|
@ -31,37 +31,6 @@ typedef enum {
|
|||
INJECTOR_NONE,
|
||||
} injector_channel_e;
|
||||
|
||||
/**
|
||||
* Logical pins. See brain_pin_e for physical pins.
|
||||
*/
|
||||
typedef enum {
|
||||
SPARKOUT_1_OUTPUT,
|
||||
SPARKOUT_2_OUTPUT,
|
||||
SPARKOUT_3_OUTPUT,
|
||||
SPARKOUT_4_OUTPUT,
|
||||
SPARKOUT_5_OUTPUT,
|
||||
SPARKOUT_6_OUTPUT,
|
||||
SPARKOUT_7_OUTPUT,
|
||||
SPARKOUT_8_OUTPUT,
|
||||
SPARKOUT_9_OUTPUT,
|
||||
SPARKOUT_10_OUTPUT,
|
||||
SPARKOUT_11_OUTPUT,
|
||||
SPARKOUT_12_OUTPUT,
|
||||
|
||||
INJECTOR_1_OUTPUT,
|
||||
INJECTOR_2_OUTPUT,
|
||||
INJECTOR_3_OUTPUT,
|
||||
INJECTOR_4_OUTPUT,
|
||||
INJECTOR_5_OUTPUT,
|
||||
INJECTOR_6_OUTPUT,
|
||||
INJECTOR_7_OUTPUT,
|
||||
INJECTOR_8_OUTPUT,
|
||||
INJECTOR_9_OUTPUT,
|
||||
INJECTOR_10_OUTPUT,
|
||||
INJECTOR_11_OUTPUT,
|
||||
INJECTOR_12_OUTPUT,
|
||||
|
||||
IO_INVALID,
|
||||
|
||||
/**
|
||||
* these seven segment display pins are related to unused external tachometer code
|
||||
|
@ -94,13 +63,9 @@ typedef enum {
|
|||
// LED_HUGE_19,
|
||||
// LED_HUGE_20,
|
||||
|
||||
} io_pin_e;
|
||||
|
||||
void initPrimaryPins(void);
|
||||
void initOutputPins(void);
|
||||
|
||||
io_pin_e getPinByName(const char *name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -141,11 +141,3 @@ void scheduleOutput(OutputSignal *signal, float delayMs, float durationMs) {
|
|||
scheduleTask("out down", sDown, (int) MS2US(delayMs) + MS2US(durationMs), (schfunc_t) &turnPinLow, signal->output);
|
||||
#endif
|
||||
}
|
||||
|
||||
io_pin_e getPinByName(const char *name) {
|
||||
if (startsWith(name, "spa")) {
|
||||
int index = atoi(name + 3);
|
||||
return (io_pin_e) ((int) SPARKOUT_1_OUTPUT - 1 + index);
|
||||
}
|
||||
return IO_INVALID;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
CONTROLLERSSRC = \
|
||||
$(PROJECT_DIR)/controllers/error_handling.c
|
||||
CONTROLLERSSRC =
|
||||
|
||||
CONTROLLERS_SRC_CPP = $(PROJECT_DIR)/controllers/settings.cpp \
|
||||
controllers/electronic_throttle.cpp \
|
||||
$(PROJECT_DIR)/controllers/error_handling.cpp \
|
||||
controllers/map_averaging.cpp \
|
||||
controllers/flash_main.cpp \
|
||||
controllers/injector_central.cpp \
|
||||
|
|
|
@ -239,8 +239,6 @@ void initInjectorCentral(Engine *engine) {
|
|||
|
||||
// todo: should we move this code closer to the injection logic?
|
||||
for (int i = 0; i < engineConfiguration->cylindersCount; i++) {
|
||||
io_pin_e pin = (io_pin_e) ((int) INJECTOR_1_OUTPUT + i);
|
||||
|
||||
NamedOutputPin *output = &enginePins.coils[i];
|
||||
|
||||
outputPinRegisterExt2(output->name, output, boardConfiguration->injectionPins[i],
|
||||
|
|
|
@ -34,12 +34,6 @@ EXTERN_ENGINE
|
|||
|
||||
extern engine_pins_s enginePins;
|
||||
|
||||
/**
|
||||
* this cache allows us to find a close-enough (with one degree precision) trigger wheel index by
|
||||
* given angle with fast constant speed
|
||||
*/
|
||||
static int triggerIndexByAngle[720];
|
||||
|
||||
/*
|
||||
* default Volumetric Efficiency
|
||||
*/
|
||||
|
@ -255,7 +249,7 @@ void findTriggerPosition(event_trigger_position_s *position, angle_t angleOffset
|
|||
angleOffset += CONFIG(globalTriggerAngleOffset);
|
||||
fixAngle(angleOffset);
|
||||
|
||||
int index = triggerIndexByAngle[(int)angleOffset];
|
||||
int index = TRIGGER_SHAPE(triggerIndexByAngle[(int)angleOffset]);
|
||||
angle_t eventAngle = TRIGGER_SHAPE(eventAngles[index]);
|
||||
if (angleOffset < eventAngle) {
|
||||
firmwareError("angle constraint violation in registerActuatorEventExt(): %f/%f", angleOffset, eventAngle);
|
||||
|
@ -333,7 +327,7 @@ void prepareOutputSignals(DECLARE_ENGINE_PARAMETER_F) {
|
|||
}
|
||||
|
||||
for (int angle = 0; angle < CONFIG(engineCycle); angle++) {
|
||||
triggerIndexByAngle[angle] = findAngleIndex(angle PASS_ENGINE_PARAMETER);
|
||||
TRIGGER_SHAPE(triggerIndexByAngle[angle]) = findAngleIndex(angle PASS_ENGINE_PARAMETER);
|
||||
}
|
||||
|
||||
injectonSignals.reset();
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
|
||||
typedef ArrayList<OutputSignal, OUTPUT_SIGNAL_MAX_SIZE> OutputSignalList;
|
||||
|
||||
#define INJECTOR_PIN_BY_INDEX(index) (io_pin_e) ((int) INJECTOR_1_OUTPUT + (index))
|
||||
|
||||
void findTriggerPosition(
|
||||
event_trigger_position_s *position, float angleOffset DECLARE_ENGINE_PARAMETER_S);
|
||||
|
||||
|
|
|
@ -38,6 +38,12 @@ public:
|
|||
|
||||
float dutyCycle[PWM_PHASE_MAX_WAVE_PER_PWM];
|
||||
|
||||
/**
|
||||
* this cache allows us to find a close-enough (with one degree precision) trigger wheel index by
|
||||
* given angle with fast constant speed
|
||||
*/
|
||||
int triggerIndexByAngle[720];
|
||||
|
||||
float syncRatioFrom;
|
||||
float syncRatioTo;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
DEV_SRC = development/hw_layer/poten.c \
|
||||
development/test/test.c \
|
||||
DEV_SRC = development/test/test.c \
|
||||
development/test/testbmk.c
|
||||
|
||||
DEV_SRC_CPP = development/trigger_emulator.cpp \
|
||||
development/hw_layer/poten.cpp \
|
||||
development/analog_chart.cpp \
|
||||
development/rfi_perftest.cpp \
|
||||
development/engine_emulator.cpp \
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
#include "pin_repository.h"
|
||||
#include "pwm_generator_logic.h"
|
||||
|
||||
extern "C" {
|
||||
#include "poten.h"
|
||||
}
|
||||
#include "trigger_emulator.h"
|
||||
|
||||
extern bool hasFirmwareErrorFlag;
|
||||
|
|
|
@ -5,17 +5,17 @@ HW_LAYER_EGT_CPP = $(PROJECT_DIR)/hw_layer/can_hw.cpp \
|
|||
$(PROJECT_DIR)/hw_layer/max31855.cpp
|
||||
|
||||
HW_LAYER_EMS = $(HW_LAYER_EGT) \
|
||||
$(PROJECT_DIR)/hw_layer/pin_repository.c \
|
||||
$(PROJECT_DIR)/hw_layer/mcp3208.c \
|
||||
$(PROJECT_DIR)/hw_layer/microsecond_timer.c \
|
||||
$(PROJECT_DIR)/hw_layer/flash.c \
|
||||
$(PROJECT_DIR)/hw_layer/rtc_helper.c \
|
||||
$(PROJECT_DIR)/hw_layer/mmc_card.c \
|
||||
$(PROJECT_DIR)/hw_layer/neo6m.c \
|
||||
$(PROJECT_DIR)/hw_layer/wave_analyzer_hw.c
|
||||
|
||||
HW_LAYER_EMS_CPP = $(HW_LAYER_EGT_CPP) \
|
||||
$(PROJECT_DIR)/hw_layer/pin_repository.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/hardware.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/neo6m.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/mmc_card.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/lcd/lcd_HD44780.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/adc_inputs.cpp \
|
||||
$(PROJECT_DIR)/hw_layer/board_test.cpp \
|
||||
|
|
|
@ -55,7 +55,7 @@ static FATFS MMC_FS;
|
|||
static Logging logger;
|
||||
|
||||
// print FAT error function
|
||||
static void printError(char *str, FRESULT f_error) {
|
||||
static void printError(const char *str, FRESULT f_error) {
|
||||
scheduleMsg(&logger, "FATfs Error \"%s\" %d", str, f_error);
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ static int totalPinsUsed = 0;
|
|||
/**
|
||||
* @deprecated - use hwPortname() instead
|
||||
*/
|
||||
char *portname(GPIO_TypeDef* GPIOx) {
|
||||
const char *portname(GPIO_TypeDef* GPIOx) {
|
||||
if (GPIOx == GPIOA)
|
||||
return "PA";
|
||||
if (GPIOx == GPIOB)
|
||||
|
@ -103,7 +103,7 @@ brain_pin_e parseBrainPin(const char *str) {
|
|||
}
|
||||
const char *pinStr = str + 2;
|
||||
int pin = atoi(pinStr);
|
||||
return basePin + pin;
|
||||
return (brain_pin_e)(basePin + pin);
|
||||
}
|
||||
|
||||
char *hwPortname(brain_pin_e brainPin) {
|
|
@ -31,7 +31,7 @@ char *hwPortname(brain_pin_e brainPin);
|
|||
brain_pin_e parseBrainPin(const char *str);
|
||||
void mySetPadMode(const char *msg, ioportid_t port, ioportmask_t pin, iomode_t mode);
|
||||
void mySetPadMode2(const char *msg, brain_pin_e pin, iomode_t mode);
|
||||
char *portname(GPIO_TypeDef* GPIOx);
|
||||
const char *portname(GPIO_TypeDef* GPIOx);
|
||||
iomode_t getInputMode(pin_input_mode_e mode);
|
||||
|
||||
ioportmask_t getHwPin(brain_pin_e brainPin);
|
||||
|
|
|
@ -26,7 +26,10 @@ extern "C"
|
|||
#include "efitime.h"
|
||||
#include "rusefi_enums.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include "datalogging.h"
|
||||
#endif
|
||||
|
||||
#include "chprintf.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -256,7 +256,7 @@ void firmwareError(const char *fmt, ...) {
|
|||
}
|
||||
}
|
||||
|
||||
static char UNUSED_RAM_SIZE[4000];
|
||||
static char UNUSED_RAM_SIZE[3000];
|
||||
|
||||
static char UNUSED_CCM_SIZE[8000] CCM_OPTIONAL;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ void resetConsoleActions(void) {
|
|||
consoleActionCount = 0;
|
||||
}
|
||||
|
||||
static void doAddAction(const char *token, int type, Void callback, void *param) {
|
||||
static void doAddAction(const char *token, action_type_e type, Void callback, void *param) {
|
||||
efiAssertVoid(consoleActionCount < CONSOLE_MAX_ACTIONS, "Too many console actions");
|
||||
TokenCallback *current = &consoleActions[consoleActionCount++];
|
||||
current->token = token;
|
|
@ -1,14 +1,13 @@
|
|||
|
||||
UTIL_TEST_SRC = $(PROJECT_DIR)/util/crc.c \
|
||||
$(PROJECT_DIR)/util/data_buffer.c \
|
||||
$(PROJECT_DIR)/util/histogram.c \
|
||||
$(PROJECT_DIR)/util/cli_registry.c
|
||||
|
||||
UTILSRC = $(UTIL_TEST_SRC) \
|
||||
$(PROJECT_DIR)/console_util/datalogging.c
|
||||
$(PROJECT_DIR)/util/histogram.c
|
||||
UTILSRC = $(UTIL_TEST_SRC)
|
||||
|
||||
UTILSRC_CPP = $(PROJECT_DIR)/util/cyclic_buffer.cpp \
|
||||
$(PROJECT_DIR)/console_util/datalogging.cpp \
|
||||
$(PROJECT_DIR)/util/listener_array.cpp \
|
||||
$(PROJECT_DIR)/util/cli_registry.cpp \
|
||||
$(PROJECT_DIR)/util/efilib.cpp \
|
||||
$(PROJECT_DIR)/util/efilib2.cpp \
|
||||
$(PROJECT_DIR)/util/LocalVersionHolder.cpp
|
||||
|
|
|
@ -14,15 +14,6 @@
|
|||
#include "utlist.h"
|
||||
#include "event_queue.h"
|
||||
|
||||
static io_pin_e testLastToggledPin;
|
||||
static int testToggleCounter;
|
||||
|
||||
void setOutputPinValue(io_pin_e pin, int value) {
|
||||
// this is a test implementation of the method - we use it to see what's going on
|
||||
testLastToggledPin = pin;
|
||||
testToggleCounter++;
|
||||
}
|
||||
|
||||
EventQueue schedulingQueue;
|
||||
|
||||
void scheduleTask(const char *msg, scheduling_s *scheduling, int delayUs, schfunc_t callback, void *param) {
|
||||
|
|
Loading…
Reference in New Issue