From 11e907de037228f3bb5d800798ba97bef01f2446 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sat, 11 Jun 2016 13:10:09 +0200 Subject: [PATCH] Configtool: also deal with PS_INVERT_ON. This partially solves issue #165. --- config/board.3drag.h | 1 + config/board.cnc-shield-v3.h | 1 + config/board.gen3.h | 1 + config/board.gen6.h | 1 + config/board.gen7-arm.h | 1 + config/board.gen7-v1.1-v1.3.h | 1 + config/board.gen7-v1.4.h | 1 + config/board.melzi.h | 1 + config/board.nanoheart-v1.0.h | 1 + config/board.ramps-v1.2.h | 1 + config/board.ramps-v1.3.h | 1 + config/board.rumba.h | 1 + config/board.sanguinololu-v1.1.h | 1 + config/board.sanguinololu-v1.2.h | 1 + config/board.sanguish.h | 1 + config/board.sinaptec-at328-02.h | 1 + config/board.teensy++-v2.0.h | 1 + config/board.teensy-v2.0.h | 1 + config/board.tronxy.h | 1 + configtool/board.generic.h | 1 + configtool/pinoutspage.py | 7 ++++++- testcases/config.h.Profiling | 1 + 22 files changed, 27 insertions(+), 1 deletion(-) diff --git a/config/board.3drag.h b/config/board.3drag.h index 5a49b08..46f3c45 100644 --- a/config/board.3drag.h +++ b/config/board.3drag.h @@ -82,6 +82,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.cnc-shield-v3.h b/config/board.cnc-shield-v3.h index 960123b..38eb6e7 100644 --- a/config/board.cnc-shield-v3.h +++ b/config/board.cnc-shield-v3.h @@ -85,6 +85,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN DIO14 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN DIO8 #define STEPPER_INVERT_ENABLE diff --git a/config/board.gen3.h b/config/board.gen3.h index ff34351..4dfb42c 100644 --- a/config/board.gen3.h +++ b/config/board.gen3.h @@ -82,6 +82,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO14 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN DIO25 //#define STEPPER_INVERT_ENABLE diff --git a/config/board.gen6.h b/config/board.gen6.h index 61f9335..1330ac9 100644 --- a/config/board.gen6.h +++ b/config/board.gen6.h @@ -82,6 +82,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.gen7-arm.h b/config/board.gen7-arm.h index 184d8a8..ca87925 100644 --- a/config/board.gen7-arm.h +++ b/config/board.gen7-arm.h @@ -82,6 +82,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN PIO0_4 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN PIO0_4 #define STEPPER_INVERT_ENABLE diff --git a/config/board.gen7-v1.1-v1.3.h b/config/board.gen7-v1.1-v1.3.h index 4d68a8d..58d6b90 100644 --- a/config/board.gen7-v1.1-v1.3.h +++ b/config/board.gen7-v1.1-v1.3.h @@ -86,6 +86,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO15 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN DIO24 #define STEPPER_INVERT_ENABLE diff --git a/config/board.gen7-v1.4.h b/config/board.gen7-v1.4.h index 4fe129a..e1d85bd 100644 --- a/config/board.gen7-v1.4.h +++ b/config/board.gen7-v1.4.h @@ -86,6 +86,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO15 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN DIO25 #define STEPPER_INVERT_ENABLE diff --git a/config/board.melzi.h b/config/board.melzi.h index e308f4e..37aaf30 100644 --- a/config/board.melzi.h +++ b/config/board.melzi.h @@ -85,6 +85,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.nanoheart-v1.0.h b/config/board.nanoheart-v1.0.h index 4524fd1..788836b 100644 --- a/config/board.nanoheart-v1.0.h +++ b/config/board.nanoheart-v1.0.h @@ -85,6 +85,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.ramps-v1.2.h b/config/board.ramps-v1.2.h index 3c0629c..f1cdfa7 100644 --- a/config/board.ramps-v1.2.h +++ b/config/board.ramps-v1.2.h @@ -83,6 +83,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.ramps-v1.3.h b/config/board.ramps-v1.3.h index da71bdb..7bb57ce 100644 --- a/config/board.ramps-v1.3.h +++ b/config/board.ramps-v1.3.h @@ -83,6 +83,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.rumba.h b/config/board.rumba.h index 94b2d45..c3f1490 100644 --- a/config/board.rumba.h +++ b/config/board.rumba.h @@ -82,6 +82,7 @@ #define E_INVERT_ENABLE #define PS_ON_PIN DIO45 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.sanguinololu-v1.1.h b/config/board.sanguinololu-v1.1.h index 28f37fb..e0a9889 100644 --- a/config/board.sanguinololu-v1.1.h +++ b/config/board.sanguinololu-v1.1.h @@ -85,6 +85,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO9 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN DIO4 //#define STEPPER_INVERT_ENABLE diff --git a/config/board.sanguinololu-v1.2.h b/config/board.sanguinololu-v1.2.h index 182712b..9a2e6e3 100644 --- a/config/board.sanguinololu-v1.2.h +++ b/config/board.sanguinololu-v1.2.h @@ -85,6 +85,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO9 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.sanguish.h b/config/board.sanguish.h index a7410df..0578fca 100644 --- a/config/board.sanguish.h +++ b/config/board.sanguish.h @@ -85,6 +85,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO0 +//#define PS_INVERT_ON #define PS_MOSFET_PIN DIO25 //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.sinaptec-at328-02.h b/config/board.sinaptec-at328-02.h index 24aee9f..6149b6f 100644 --- a/config/board.sinaptec-at328-02.h +++ b/config/board.sinaptec-at328-02.h @@ -85,6 +85,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/config/board.teensy++-v2.0.h b/config/board.teensy++-v2.0.h index 86c86ff..0d6d4ea 100644 --- a/config/board.teensy++-v2.0.h +++ b/config/board.teensy++-v2.0.h @@ -82,6 +82,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO27 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN DIO25 #define STEPPER_ENABLE_PIN DIO26 #define STEPPER_INVERT_ENABLE diff --git a/config/board.teensy-v2.0.h b/config/board.teensy-v2.0.h index 74c9ebb..f910a78 100644 --- a/config/board.teensy-v2.0.h +++ b/config/board.teensy-v2.0.h @@ -82,6 +82,7 @@ //#define E_INVERT_ENABLE //#define PS_ON_PIN DIO0 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN DIO25 #define STEPPER_ENABLE_PIN DIO19 #define STEPPER_INVERT_ENABLE diff --git a/config/board.tronxy.h b/config/board.tronxy.h index 990c84d..2c782be 100644 --- a/config/board.tronxy.h +++ b/config/board.tronxy.h @@ -83,6 +83,7 @@ #define E_INVERT_ENABLE //#define PS_ON_PIN xxxx +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx //#define STEPPER_ENABLE_PIN xxxx //#define STEPPER_INVERT_ENABLE diff --git a/configtool/board.generic.h b/configtool/board.generic.h index 6d24b17..3e1550d 100644 --- a/configtool/board.generic.h +++ b/configtool/board.generic.h @@ -83,6 +83,7 @@ #define E_INVERT_ENABLE #define PS_ON_PIN xxxx +#define PS_INVERT_ON #define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN xxxx #define STEPPER_INVERT_ENABLE diff --git a/configtool/pinoutspage.py b/configtool/pinoutspage.py index 866df57..df56bc0 100644 --- a/configtool/pinoutspage.py +++ b/configtool/pinoutspage.py @@ -56,6 +56,7 @@ class PinoutsPage(wx.Panel, Page): 'E_INVERT_ENABLE': "Invert Enable", 'PS_ON_PIN': "PSU On Pin:", + 'PS_INVERT_ON': "Invert PSU On Pin", 'PS_MOSFET_PIN': "PSU MOSFET Pin:", 'STEPPER_ENABLE_PIN': "Stepper Enable Pin:", @@ -159,9 +160,13 @@ class PinoutsPage(wx.Panel, Page): tc = self.addPinChoice(k, "", pinNames, True, labelWidth) sz.Add(tc, pos = (3, 3)) + k = "PS_INVERT_ON" + cb = self.addCheckBox(k, self.onCheckBox) + sz.Add(cb, pos = (5, 3), flag = wx.ALIGN_CENTER_HORIZONTAL) + k = "PS_MOSFET_PIN" tc = self.addPinChoice(k, "", pinNames, True, labelWidth) - sz.Add(tc, pos = (5, 3)) + sz.Add(tc, pos = (7, 3)) k = "SD_CARD_SELECT_PIN" tc = self.addPinChoice(k, "", pinNames, True, labelWidth) diff --git a/testcases/config.h.Profiling b/testcases/config.h.Profiling index 68f3bbe..1e1d78e 100644 --- a/testcases/config.h.Profiling +++ b/testcases/config.h.Profiling @@ -338,6 +338,7 @@ //#define E_INVERT_ENABLE #define PS_ON_PIN DIO15 +//#define PS_INVERT_ON //#define PS_MOSFET_PIN xxxx #define STEPPER_ENABLE_PIN DIO25 #define STEPPER_INVERT_ENABLE