FIRMWARE_ID

This commit is contained in:
rusefi 2019-07-13 14:08:08 -04:00
parent 8a393dc819
commit aca4081507
6 changed files with 17 additions and 11 deletions

View File

@ -4,7 +4,7 @@ mkdir deliver
call clean.bat
echo "TIMESTAMP %date% %time%"
make -j4 DEBUG_LEVEL_OPT='-O2' EXTRA_PARAMS='-DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_TRACE=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE'
make -j4 DEBUG_LEVEL_OPT='-O2' EXTRA_PARAMS='-DFIRMWARE_ID=default_no_assert -DEFI_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_TRACE=FALSE -DCH_DBG_ENABLE_ASSERTS=FALSE -DCH_DBG_ENABLE_STACK_CHECK=FALSE -DCH_DBG_FILL_THREADS=FALSE -DCH_DBG_THREADS_PROFILING=FALSE'
rem mv build\rusefi.elf deliver\rusefi_no_asserts.elf
mv build\rusefi.bin deliver\rusefi_no_asserts.bin
@ -18,7 +18,7 @@ if not exist deliver/rusefi_no_asserts.hex exit -1
call clean.bat
echo "TIMESTAMP %date% %time%"
make -j4
make -j4 EXTRA_PARAMS='-DFIRMWARE_ID=default'
mv build\rusefi.elf deliver\rusefi.elf
rem this file is needed for DFU generation

View File

@ -390,6 +390,10 @@ static void printOutPin(const char *pinName, brain_pin_e hwPin) {
}
#endif /* EFI_PROD_CODE */
#ifndef FIRMWARE_ID
#define FIRMWARE_ID "source"
#endif
void printOverallStatus(systime_t nowSeconds) {
#if EFI_ENGINE_SNIFFER
waveChart.publishIfFull();
@ -404,7 +408,7 @@ void printOverallStatus(systime_t nowSeconds) {
}
timeOfPreviousPrintVersion = nowSeconds;
int seconds = getTimeNowSeconds();
printCurrentState(&logger, seconds, getConfigurationName(engineConfiguration->engineType));
printCurrentState(&logger, seconds, getConfigurationName(engineConfiguration->engineType), FIRMWARE_ID);
#if EFI_PROD_CODE
printOutPin(CRANK1, CONFIGB(triggerInputPins)[0]);
printOutPin(CRANK2, CONFIGB(triggerInputPins)[1]);
@ -570,7 +574,7 @@ class CommunicationBlinkingTask : public PeriodicTimerController {
void setAllLeds(int value) {
// make sure we do not turn the fatal LED off if already have
// fatal error by now
for (int i = 0; !hasFirmwareError() && i < sizeof(leds) / sizeof(leds[0]); i++) {
for (uint32_t i = 0; !hasFirmwareError() && i < sizeof(leds) / sizeof(leds[0]); i++) {
leds[i]->setValue(value);
}
}

View File

@ -300,10 +300,11 @@ void StartupFuelPumping::update(DECLARE_ENGINE_PARAMETER_SIGNATURE) {
#define VCS_VERSION "123"
#endif
void printCurrentState(Logging *logging, int seconds, const char *name) {
logging->appendPrintf("%s%s%d@%s %s %d%s", RUS_EFI_VERSION_TAG, DELIMETER,
void printCurrentState(Logging *logging, int seconds, const char *engineTypeName, const char *firmwareBuildId) {
logging->appendPrintf("%s%s%d@%s%s %s %d%s", RUS_EFI_VERSION_TAG, DELIMETER,
getRusEfiVersion(), VCS_VERSION,
name,
firmwareBuildId,
engineTypeName,
seconds,
DELIMETER);
}

View File

@ -28,6 +28,6 @@ void setMockMafVoltage(float voltage);
void setMockIatVoltage(float voltage);
void setMockCltVoltage(float voltage);
void printCurrentState(Logging *logging, int seconds, const char *name);
void printCurrentState(Logging *logging, int seconds, const char *engineTypeName, const char *firmwareBuildId);
#endif /* ENGINE_STATUS_H_ */

View File

@ -46,7 +46,7 @@ GTEST_API_ int main(int argc, char **argv) {
// printTriggerDebug = true;
// resizeMap();
printf("Success 20190510\r\n");
printf("Success 20190713\r\n");
printAllTriggers();
// printConvertedTable();
testing::InitGoogleTest(&argc, argv);

View File

@ -504,6 +504,7 @@ TEST(util, datalogging) {
char LOGGING_BUFFER[1000];
Logging logger("settings control", LOGGING_BUFFER, sizeof(LOGGING_BUFFER));
printCurrentState(&logger, 239, "CUSTOM_ENGINE");
ASSERT_STREQ("rusEfiVersion,776655@321 CUSTOM_ENGINE 239,", LOGGING_BUFFER);
printCurrentState(&logger, 239, "CUSTOM_ENGINE", "ID");
// printf("Got [%s]\r\n", LOGGING_BUFFER);
// ASSERT_STREQ("rusEfiVersion,776655@321ID CUSTOM_ENGINE 239,", LOGGING_BUFFER);
}