auto-sync
This commit is contained in:
parent
df8d890b2b
commit
c2d2a6ef0c
|
@ -5,9 +5,13 @@ mkdir deliver
|
|||
call clean.bat
|
||||
make
|
||||
cp build\rusefi.elf deliver\rusefi_debug.elf
|
||||
cp build\rusefi.bin deliver\rusefi_debug.bin
|
||||
cp build\rusefi.hex deliver\rusefi_debug.hex
|
||||
|
||||
call clean.bat
|
||||
make 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'
|
||||
|
||||
cp build\rusefi.elf deliver\rusefi_release.elf
|
||||
cp build\rusefi.bin deliver\rusefi_release.bin
|
||||
cp build\rusefi.hex deliver\rusefi_release.hex
|
||||
|
||||
|
|
|
@ -10,8 +10,11 @@
|
|||
|
||||
#include "sachs.h"
|
||||
#include "allsensors.h"
|
||||
#include "engine_math.h"
|
||||
|
||||
void setSachs(engine_configuration_s *engineConfiguration) {
|
||||
EXTERN_ENGINE;
|
||||
|
||||
void setSachs(DECLARE_ENGINE_PARAMETER_F) {
|
||||
board_configuration_s * boardConfiguration = &engineConfiguration->bc;
|
||||
engineConfiguration->specs.displacement = 0.1; // 100cc
|
||||
engineConfiguration->specs.cylindersCount = 1;
|
||||
|
@ -82,5 +85,10 @@ void setSachs(engine_configuration_s *engineConfiguration) {
|
|||
|
||||
boardConfiguration->fuelPumpPin = GPIOE_6;
|
||||
|
||||
// todo: extract a method? figure out something smarter
|
||||
setFuelRpmBin(800, 15000 PASS_ENGINE_PARAMETER);
|
||||
setTimingRpmBin(800, 15000 PASS_ENGINE_PARAMETER);
|
||||
setTableBin2(config->veRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
||||
setTableBin2(config->afrRpmBins, FUEL_RPM_COUNT, 15000, 7000, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
#ifndef CONFIG_ENGINES_SACHS_H_
|
||||
#define CONFIG_ENGINES_SACHS_H_
|
||||
|
||||
#include "engine_configuration.h"
|
||||
#include "engine.h"
|
||||
|
||||
void setSachs(engine_configuration_s *engineConfiguration);
|
||||
void setSachs(DECLARE_ENGINE_PARAMETER_F);
|
||||
|
||||
#endif /* CONFIG_ENGINES_SACHS_H_ */
|
||||
|
|
|
@ -695,7 +695,7 @@ void resetConfigurationExt(Logging * logger, engine_type_e engineType DECLARE_EN
|
|||
setTestEngineConfiguration(PASS_ENGINE_PARAMETER_F);
|
||||
break;
|
||||
case SACHS:
|
||||
setSachs(engineConfiguration);
|
||||
setSachs(PASS_ENGINE_PARAMETER_F);
|
||||
break;
|
||||
default:
|
||||
firmwareError("Unexpected engine type: %d", engineType);
|
||||
|
|
|
@ -32,7 +32,7 @@ import static com.rusefi.ui.storage.PersistentConfiguration.getConfig;
|
|||
* @see com.rusefi.StartupFrame
|
||||
*/
|
||||
public class Launcher {
|
||||
public static final int CONSOLE_VERSION = 20150406;
|
||||
public static final int CONSOLE_VERSION = 20150407;
|
||||
public static final boolean SHOW_STIMULATOR = false;
|
||||
private static final String TAB_INDEX = "main_tab";
|
||||
protected static final String PORT_KEY = "port";
|
||||
|
|
|
@ -94,7 +94,9 @@ public class StartupFrame {
|
|||
|
||||
if (ProcessStatusWindow.isWindows()) {
|
||||
leftPanel.add(new HorizontalLine());
|
||||
leftPanel.add(new FirmwareFlasher().getButton());
|
||||
leftPanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_DEBUG_FILE, "Program Firmware/Debug").getButton());
|
||||
leftPanel.add(new HorizontalLine());
|
||||
leftPanel.add(new FirmwareFlasher(FirmwareFlasher.IMAGE_RELEASE_FILE, "Program Firmware/Release").getButton());
|
||||
leftPanel.add(new HorizontalLine());
|
||||
leftPanel.add(new EraseChip().getButton());
|
||||
}
|
||||
|
|
|
@ -10,17 +10,18 @@ import java.io.*;
|
|||
* 2/4/15
|
||||
*/
|
||||
public class FirmwareFlasher extends ProcessStatusWindow {
|
||||
private static final String IMAGE_FILE = "rusefi.bin";
|
||||
public static final String IMAGE_DEBUG_FILE = "rusefi_debug.bin";
|
||||
public static final String IMAGE_RELEASE_FILE = "rusefi_release.bin";
|
||||
static final String OPENOCD_BIN = "openocd/bin/openocd-0.8.0.exe";
|
||||
private static final String OPEN_OCD_COMMAND = OPENOCD_BIN + " -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c \"program " +
|
||||
IMAGE_FILE +
|
||||
" verify reset exit 0x08000000\"";
|
||||
private static final String SUCCESS_MESSAGE_TAG = "shutdown command invoked";
|
||||
private static final String FAILED_MESSAGE_TAG = "failed";
|
||||
|
||||
private final JButton button = new JButton("Program Firmware");
|
||||
private final JButton button;
|
||||
private String fileName;
|
||||
|
||||
public FirmwareFlasher() {
|
||||
public FirmwareFlasher(String fileName, String buttonTest) {
|
||||
this.fileName = fileName;
|
||||
button = new JButton(buttonTest);
|
||||
button.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent event) {
|
||||
|
@ -44,11 +45,13 @@ public class FirmwareFlasher extends ProcessStatusWindow {
|
|||
}
|
||||
|
||||
private void doFlashFirmware() {
|
||||
if (!new File(IMAGE_FILE).exists()) {
|
||||
wnd.appendMsg(IMAGE_FILE + " not found, cannot proceed !!!");
|
||||
if (!new File(fileName).exists()) {
|
||||
wnd.appendMsg(fileName + " not found, cannot proceed !!!");
|
||||
return;
|
||||
}
|
||||
StringBuffer error = executeCommand(OPEN_OCD_COMMAND);
|
||||
StringBuffer error = executeCommand(OPENOCD_BIN + " -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c \"program " +
|
||||
fileName +
|
||||
" verify reset exit 0x08000000\"");
|
||||
if (error.toString().contains(SUCCESS_MESSAGE_TAG) && !error.toString().contains(FAILED_MESSAGE_TAG)) {
|
||||
wnd.appendMsg("!!! Looks good!!!");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue