auto-sync
This commit is contained in:
parent
dbd3d5ae28
commit
53fb1b7779
|
@ -272,6 +272,10 @@ void setDefaultConfiguration(engine_configuration_s *engineConfiguration, board_
|
|||
*/
|
||||
boardConfiguration->triggerSimulatorFrequency = 1200;
|
||||
|
||||
for (int i = 0; i < MAX31855_CS_COUNT; i++) {
|
||||
boardConfiguration->max31855_cs[i] = GPIO_NONE;
|
||||
}
|
||||
|
||||
|
||||
boardConfiguration->idleValvePin = GPIOE_2;
|
||||
boardConfiguration->idleValvePinMode = OM_DEFAULT;
|
||||
|
|
|
@ -201,7 +201,9 @@ typedef struct {
|
|||
|
||||
pin_output_mode_e mainRelayPinMode;
|
||||
|
||||
int unusedbs[100];
|
||||
brain_pin_e max31855_cs[MAX31855_CS_COUNT];
|
||||
|
||||
int unusedbs[92];
|
||||
|
||||
|
||||
} board_configuration_s;
|
||||
|
|
|
@ -10,7 +10,31 @@
|
|||
*/
|
||||
|
||||
#include "max31855.h"
|
||||
#include "pin_repository.h"
|
||||
|
||||
static Logging logger;
|
||||
|
||||
static void showEgtInfo(void) {
|
||||
for (int i = 0; i < MAX31855_CS_COUNT; i++) {
|
||||
// if (boardConfiguration->max31855_cs[i] != GPIO_NONE) {
|
||||
// scheduleMsg(&logger, "%d ETG @ %s", i, hwPortname(boardConfiguration->max31855_cs[i]));
|
||||
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void initMax31855(board_configuration_s *boardConfiguration) {
|
||||
initLogging(&logger, "EGT");
|
||||
|
||||
addConsoleAction("egtinfo", showEgtInfo);
|
||||
|
||||
for (int i = 0; i < MAX31855_CS_COUNT; i++) {
|
||||
if (boardConfiguration->max31855_cs[i] != GPIO_NONE) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ void resetConsoleActions(void) {
|
|||
consoleActionCount = 0;
|
||||
}
|
||||
|
||||
static void doAddAction(const char *token, int type, Void callback) {
|
||||
static void doAddAction(const char *token, int type, Void callback, void *param) {
|
||||
efiAssertVoid(consoleActionCount < CONSOLE_MAX_ACTIONS, "Too many console actions");
|
||||
TokenCallback *current = &consoleActions[consoleActionCount++];
|
||||
current->token = token;
|
||||
|
@ -49,45 +49,45 @@ static void doAddAction(const char *token, int type, Void callback) {
|
|||
* @brief Register console action without parameters
|
||||
*/
|
||||
void addConsoleAction(const char *token, Void callback) {
|
||||
doAddAction(token, NO_PARAMETER, callback);
|
||||
doAddAction(token, NO_PARAMETER, callback, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register a console command with one Integer parameter
|
||||
*/
|
||||
void addConsoleActionI(const char *token, VoidInt callback) {
|
||||
doAddAction(token, ONE_PARAMETER, (Void) callback);
|
||||
doAddAction(token, ONE_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Register a console command with two Integer parameters
|
||||
*/
|
||||
void addConsoleActionII(const char *token, VoidIntInt callback) {
|
||||
doAddAction(token, TWO_INTS_PARAMETER, (Void) callback);
|
||||
doAddAction(token, TWO_INTS_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
void addConsoleActionS(const char *token, VoidCharPtr callback) {
|
||||
doAddAction(token, STRING_PARAMETER, (Void) callback);
|
||||
doAddAction(token, STRING_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
void addConsoleActionSS(const char *token, VoidCharPtrCharPtr callback) {
|
||||
doAddAction(token, STRING2_PARAMETER, (Void) callback);
|
||||
doAddAction(token, STRING2_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
void addConsoleActionSSS(const char *token, VoidCharPtrCharPtrCharPtr callback) {
|
||||
doAddAction(token, STRING3_PARAMETER, (Void) callback);
|
||||
doAddAction(token, STRING3_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
void addConsoleActionSSSSS(const char *token, VoidCharPtrCharPtrCharPtrCharPtrCharPtr callback) {
|
||||
doAddAction(token, STRING5_PARAMETER, (Void) callback);
|
||||
doAddAction(token, STRING5_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
void addConsoleActionF(const char *token, VoidFloat callback) {
|
||||
doAddAction(token, FLOAT_PARAMETER, (Void) callback);
|
||||
doAddAction(token, FLOAT_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
void addConsoleActionFF(const char *token, VoidFloatFloat callback) {
|
||||
doAddAction(token, FLOAT_FLOAT_PARAMETER, (Void) callback);
|
||||
doAddAction(token, FLOAT_FLOAT_PARAMETER, (Void) callback, NULL);
|
||||
}
|
||||
|
||||
static int getParameterCount(action_type_e parameterType) {
|
||||
|
|
Loading…
Reference in New Issue