From e7634d50faed1942298fec6631a3bfc542fef5b3 Mon Sep 17 00:00:00 2001
From: Kevin Andersen <k.andersen@lego.com>
Date: Fri, 26 Jul 2019 14:12:05 -0400
Subject: [PATCH] Add port mappings to support older firmware version
 2.0.00.0016 and later as well as newer firmware version 2.0.00.0017 or newer

---
 src/extensions/scratch3_boost/index.js | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/src/extensions/scratch3_boost/index.js b/src/extensions/scratch3_boost/index.js
index 62b0b006f..6c14fd258 100644
--- a/src/extensions/scratch3_boost/index.js
+++ b/src/extensions/scratch3_boost/index.js
@@ -93,13 +93,24 @@ const BoostPortFeedback = {
  * @readonly
  * @enum {number}
  */
-const BoostPort = {
+
+const BoostPort20000016OrOlder = {
+    A: 55,
+    B: 56,
+    C: 0,
+    D: 1
+};
+
+const BoostPort20000017OrNewer = {
     A: 0,
     B: 1,
     C: 2,
     D: 3
 };
 
+// Set default port mapping to support the newer firmware
+let BoostPort = BoostPort20000017OrNewer;
+
 /**
  * Ids for each color sensor value used by the extension.
  * @readonly