From 90b9c8882de3384963f200acbe0ef787273a4e59 Mon Sep 17 00:00:00 2001 From: rusEfi Date: Mon, 21 Sep 2015 23:01:35 -0400 Subject: [PATCH] auto-sync --- firmware/controllers/trigger/trigger_structure.h | 13 +++++-------- java_console/ui/src/com/rusefi/Launcher.java | 2 +- .../com/rusefi/ui/engine/EngineSnifferPanel.java | 10 ++++++++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/firmware/controllers/trigger/trigger_structure.h b/firmware/controllers/trigger/trigger_structure.h index 657597157f..6dacff0447 100644 --- a/firmware/controllers/trigger/trigger_structure.h +++ b/firmware/controllers/trigger/trigger_structure.h @@ -39,9 +39,6 @@ public: bool_t isSynchronizationNeeded; bool_t needSecondTriggerInput; -// int totalToothCount; -// int skippedToothCount; - /** * duty cycle for each individual trigger channel */ @@ -74,16 +71,16 @@ public: */ angle_t tdcPosition; - /** - * Should we use falls or rises for gap ratio detection? - */ - bool_t useRiseEdge; - /** * In case of a multi-channel trigger, do we want to sync based on primary channel only? * See also gapBothDirections */ bool_t useOnlyPrimaryForSync; + /** + * Should we use falls or rises for gap ratio detection? + * todo: combine this flag with gapBothDirections? + */ + bool_t useRiseEdge; /** * This is about selecting signal edges within partictular trigger channels. * Should we measure gaps with both fall and rise signal edges? diff --git a/java_console/ui/src/com/rusefi/Launcher.java b/java_console/ui/src/com/rusefi/Launcher.java index 51730e7c0e..79c8abe6f2 100644 --- a/java_console/ui/src/com/rusefi/Launcher.java +++ b/java_console/ui/src/com/rusefi/Launcher.java @@ -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 = 20150920; + public static final int CONSOLE_VERSION = 20150921; public static final boolean SHOW_STIMULATOR = false; private static final String TAB_INDEX = "main_tab"; protected static final String PORT_KEY = "port"; diff --git a/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java b/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java index 9b455d2100..d6eb75cb6c 100644 --- a/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java +++ b/java_console/ui/src/com/rusefi/ui/engine/EngineSnifferPanel.java @@ -58,8 +58,11 @@ public class EngineSnifferPanel { @Override public Dimension getPreferredSize() { Dimension d = chartPanel.getSize(); + System.out.println("chartPanel size " + d); Dimension s = super.getPreferredSize(); - return new Dimension((int) (d.width * zoomControl.getZoomProvider().getZoomValue()), s.height); + Dimension dimension = new Dimension((int) (d.width * zoomControl.getZoomProvider().getZoomValue()), s.height); + System.out.println("imagePanel getPreferredSize" + dimension); + return dimension; } }; @@ -156,7 +159,10 @@ public class EngineSnifferPanel { @Override public void onZoomChange() { System.out.println("onZoomChange"); - UiUtils.trueRepaint(imagePanel); + /** + * We have scroll pane size which depends on zoom, that's a long chain of dependencies + */ + UiUtils.trueLayout(imagePanel.getParent()); } };