auto-sync

This commit is contained in:
rusEfi 2014-09-17 19:02:53 -05:00
parent 5ce3efa21c
commit b7bd30ff7b
3 changed files with 16 additions and 9 deletions

View File

@ -129,8 +129,8 @@ static void printStats(void) {
// int fuelMapOffset = (int) (&engineConfiguration->fuelTable) - (int) engineConfiguration;
// scheduleMsg(&logger, "fuelTable %d", fuelMapOffset);
//
// int offset = (int) (&boardConfiguration->o2heaterPin) - (int) engineConfiguration;
// scheduleMsg(&logger, "o2heaterPin %d", offset);
int offset = (int) (&boardConfiguration->max31855spiDevice) - (int) engineConfiguration;
scheduleMsg(&logger, "max31855_SpiDevice %d", offset);
//
// offset = (int) (&boardConfiguration->idleSolenoidFrequency) - (int) engineConfiguration;
// scheduleMsg(&logger, "idleSolenoidFrequency %d", offset);

View File

@ -207,8 +207,9 @@ void initHardware(Logging *logger, Engine *engine) {
initHip9011();
#endif /* EFI_HIP_9011 */
#if EFI_MAX_31855
initMax31855(boardConfiguration);
#endif /* EFI_MAX_31855 */
#if EFI_CAN_SUPPORT
initCan();

View File

@ -5,6 +5,9 @@
*
* http://datasheets.maximintegrated.com/en/ds/MAX31855.pdf
*
*
* Read-only communication over 5MHz SPI
*
* @date Sep 17, 2014
* @author Andrey Belomutskiy, (c) 2012-2014
*/
@ -12,15 +15,16 @@
#include "max31855.h"
#include "pin_repository.h"
#if EFI_MAX_31855
static Logging logger;
static void showEgtInfo(void) {
static void showEgtInfo(board_configuration_s *boardConfiguration) {
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]));
if (boardConfiguration->max31855_cs[i] != GPIO_NONE) {
scheduleMsg(&logger, "%d ETG @ %s", i, hwPortname(boardConfiguration->max31855_cs[i]));
// }
}
}
}
@ -28,7 +32,7 @@ static void showEgtInfo(void) {
void initMax31855(board_configuration_s *boardConfiguration) {
initLogging(&logger, "EGT");
addConsoleAction("egtinfo", showEgtInfo);
addConsoleActionP("egtinfo", (VoidPtr) showEgtInfo, boardConfiguration);
for (int i = 0; i < MAX31855_CS_COUNT; i++) {
if (boardConfiguration->max31855_cs[i] != GPIO_NONE) {
@ -38,3 +42,5 @@ void initMax31855(board_configuration_s *boardConfiguration) {
}
}
#endif /* EFI_MAX_31855 */