Skip to content

Commit 1b362a3

Browse files
howeajhellcp
authored andcommitted
Add Compass capability
1 parent 1a8301b commit 1b362a3

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ Below is the full list of capabilities
668668
| PLATFORM_GABBRO | Running on Core Time Round 2 |
669669
| BW | Running on hardware that supports only black and white. |
670670
| COLOR | Running on hardware that supports 64 colors. |
671+
| COMPASS | Running on hardware that includes a compass. |
671672
| MICROPHONE | Running on hardware that includes a microphone. |
672673
| SMARTSTRAP | Running on hardware that includes a smartstrap connector. |
673674
| SMARTSTRAP_POWER | Running on hardware that includes a powered smartstrap connector. |

src/scripts/lib/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ module.exports.capabilityMap = {
6464
minFwMajor: 0,
6565
minFwMinor: 0
6666
},
67+
COMPASS: {
68+
platforms: ['aplite', 'basalt', 'chalk', 'emery', 'flint', 'gabbro'],
69+
minFwMajor: 0,
70+
minFwMinor: 0
71+
},
6772
MICROPHONE: {
6873
platforms: ['basalt', 'chalk', 'diorite', 'emery', 'flint', 'gabbro'],
6974
minFwMajor: 0,

test/spec/lib/clay-config.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ describe('ClayConfig', function() {
7878
describe('capability filtering', function() {
7979
testCapabilities('aplite', 2, 9, ['BW'], 1);
8080
testCapabilities('aplite', 2, 9, ['COLOR'], 0);
81+
testCapabilities('aplite', 2, 9, ['COMPASS'], 1);
8182
testCapabilities('aplite', 2, 9, ['MICROPHONE'], 0);
8283
testCapabilities('aplite', 2, 9, ['SMARTSTRAP'], 0);
8384
testCapabilities('aplite', 2, 9, ['SMARTSTRAP_POWER'], 0);
@@ -98,6 +99,7 @@ describe('ClayConfig', function() {
9899

99100
testCapabilities('aplite', 3, 10, ['BW'], 1);
100101
testCapabilities('aplite', 3, 10, ['COLOR'], 0);
102+
testCapabilities('aplite', 3, 10, ['COMPASS'], 1);
101103
testCapabilities('aplite', 3, 10, ['MICROPHONE'], 0);
102104
testCapabilities('aplite', 3, 10, ['SMARTSTRAP'], 0);
103105
testCapabilities('aplite', 3, 4, ['SMARTSTRAP'], 0);
@@ -121,6 +123,7 @@ describe('ClayConfig', function() {
121123

122124
testCapabilities('basalt', 3, 10, ['BW'], 0);
123125
testCapabilities('basalt', 3, 10, ['COLOR'], 1);
126+
testCapabilities('basalt', 3, 10, ['COMPASS'], 1);
124127
testCapabilities('basalt', 3, 10, ['MICROPHONE'], 1);
125128
testCapabilities('basalt', 3, 10, ['SMARTSTRAP'], 1);
126129
testCapabilities('basalt', 3, 4, ['SMARTSTRAP'], 1);
@@ -146,6 +149,7 @@ describe('ClayConfig', function() {
146149

147150
testCapabilities('chalk', 3, 10, ['BW'], 0);
148151
testCapabilities('chalk', 3, 10, ['COLOR'], 1);
152+
testCapabilities('chalk', 3, 10, ['COMPASS'], 1);
149153
testCapabilities('chalk', 3, 10, ['MICROPHONE'], 1);
150154
testCapabilities('chalk', 3, 10, ['SMARTSTRAP'], 1);
151155
testCapabilities('chalk', 3, 4, ['SMARTSTRAP'], 1);
@@ -171,6 +175,7 @@ describe('ClayConfig', function() {
171175

172176
testCapabilities('diorite', 3, 10, ['BW'], 1);
173177
testCapabilities('diorite', 3, 10, ['COLOR'], 0);
178+
testCapabilities('diorite', 3, 10, ['COMPASS'], 0);
174179
testCapabilities('diorite', 3, 10, ['MICROPHONE'], 1);
175180
testCapabilities('diorite', 3, 10, ['SMARTSTRAP'], 1);
176181
testCapabilities('diorite', 3, 4, ['SMARTSTRAP'], 1);
@@ -196,6 +201,7 @@ describe('ClayConfig', function() {
196201

197202
testCapabilities('emery', 3, 10, ['BW'], 0);
198203
testCapabilities('emery', 3, 10, ['COLOR'], 1);
204+
testCapabilities('emery', 3, 10, ['COMPASS'], 1);
199205
testCapabilities('emery', 3, 10, ['MICROPHONE'], 1);
200206
testCapabilities('emery', 3, 10, ['SMARTSTRAP'], 1);
201207
testCapabilities('emery', 3, 4, ['SMARTSTRAP'], 1);
@@ -221,6 +227,7 @@ describe('ClayConfig', function() {
221227

222228
testCapabilities('flint', 3, 10, ['BW'], 1);
223229
testCapabilities('flint', 3, 10, ['COLOR'], 0);
230+
testCapabilities('flint', 3, 10, ['COMPASS'], 1);
224231
testCapabilities('flint', 3, 10, ['MICROPHONE'], 1);
225232
testCapabilities('flint', 3, 10, ['SMARTSTRAP'], 0);
226233
testCapabilities('flint', 3, 4, ['SMARTSTRAP'], 0);
@@ -246,6 +253,7 @@ describe('ClayConfig', function() {
246253

247254
testCapabilities('gabbro', 3, 10, ['BW'], 0);
248255
testCapabilities('gabbro', 3, 10, ['COLOR'], 1);
256+
testCapabilities('gabbro', 3, 10, ['COMPASS'], 1);
249257
testCapabilities('gabbro', 3, 10, ['MICROPHONE'], 1);
250258
testCapabilities('gabbro', 3, 10, ['SMARTSTRAP'], 0);
251259
testCapabilities('gabbro', 3, 10, ['SMARTSTRAP_POWER'], 0);

0 commit comments

Comments
 (0)