Exemple #1
0
/**
 * 'Burn' command is a command to commit the changes
 */
void handleBurnCommand(ts_response_format_e mode, uint16_t page) {
	efitimems_t nowMs = currentTimeMillis();
	tsState.burnCommandCounter++;

	tunerStudioDebug("got B (Burn)");

	tsState.currentPageId = page;

#if EFI_TUNER_STUDIO_VERBOSE
	// pointless since we only have one page now
//	scheduleMsg(&logger, "Page number %d", tsState.currentPageId);
#endif

// todo: how about some multi-threading?
	memcpy(&persistentState.persistentConfiguration, &configWorkingCopy, sizeof(persistent_config_s));

#if EFI_INTERNAL_FLASH
	setNeedToWriteConfiguration();
#endif
	incrementGlobalConfigurationVersion();
	tunerStudioWriteCrcPacket(TS_RESPONSE_BURN_OK, NULL, 0);
	scheduleMsg(&logger, "burned in (ms): %d", currentTimeMillis() - nowMs);
}
Exemple #2
0
void requestBurn(void) {
#if EFI_INTERNAL_FLASH
	setNeedToWriteConfiguration();
#endif
	incrementGlobalConfigurationVersion();
}