mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 06:52:40 -05:00
Adjusted portmapping variables to match firmware versions correctly
This commit is contained in:
parent
fcbac7516e
commit
842a8e9778
1 changed files with 5 additions and 5 deletions
|
@ -94,14 +94,14 @@ const BoostPortFeedback = {
|
||||||
* @enum {number}
|
* @enum {number}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const BoostPort20000016OrOlder = {
|
const BoostPort10000223OrOlder = {
|
||||||
A: 55,
|
A: 55,
|
||||||
B: 56,
|
B: 56,
|
||||||
C: 0,
|
C: 0,
|
||||||
D: 1
|
D: 1
|
||||||
};
|
};
|
||||||
|
|
||||||
const BoostPort20000017OrNewer = {
|
const BoostPort10000224OrNewer = {
|
||||||
A: 0,
|
A: 0,
|
||||||
B: 1,
|
B: 1,
|
||||||
C: 2,
|
C: 2,
|
||||||
|
@ -109,7 +109,7 @@ const BoostPort20000017OrNewer = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Set default port mapping to support the newer firmware
|
// Set default port mapping to support the newer firmware
|
||||||
let BoostPort = BoostPort20000017OrNewer;
|
let BoostPort = BoostPort10000224OrNewer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ids for each color sensor value used by the extension.
|
* Ids for each color sensor value used by the extension.
|
||||||
|
@ -1040,10 +1040,10 @@ class Boost {
|
||||||
const fwVersion10000224 = int32ArrayToNumber([0x24, 0x02, 0x00, 0x10]);
|
const fwVersion10000224 = int32ArrayToNumber([0x24, 0x02, 0x00, 0x10]);
|
||||||
const fwHub = int32ArrayToNumber(data.slice(5, data.length));
|
const fwHub = int32ArrayToNumber(data.slice(5, data.length));
|
||||||
if (fwHub < fwVersion10000224) {
|
if (fwHub < fwVersion10000224) {
|
||||||
BoostPort = BoostPort20000016OrOlder;
|
BoostPort = BoostPort10000223OrOlder;
|
||||||
log.info('Move Hub firmware older than version 1.0.00.0224 detected. Using old port mapping.');
|
log.info('Move Hub firmware older than version 1.0.00.0224 detected. Using old port mapping.');
|
||||||
} else {
|
} else {
|
||||||
BoostPort = BoostPort20000017OrNewer;
|
BoostPort = BoostPort10000224OrNewer;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue