2015-01-03 00:57:56 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var BOARD_DEFINITIONS = [
|
|
|
|
{
|
|
|
|
name: "CC3D",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "CC3D",
|
|
|
|
vcp: true
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "ChebuzzF3",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "CHF3",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "CJMCU",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "CJM1",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "EUSTM32F103RB",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "EUF1",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "Naze/Flip32+",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "AFNA",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "Naze32Pro",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "AFF3",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "Olimexino",
|
2015-02-04 22:59:25 +00:00
|
|
|
identifier: "OLI1"
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "Port103R",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "103R",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "Sparky",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "SPKY",
|
|
|
|
vcp: true
|
2015-01-03 00:57:56 +00:00
|
|
|
}, {
|
|
|
|
name: "STM32F3Discovery",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "SDF3",
|
|
|
|
vcp: true
|
|
|
|
}, {
|
|
|
|
name: "Colibri Race",
|
|
|
|
identifier: "CLBR",
|
|
|
|
vcp: true
|
2015-02-04 23:12:09 +00:00
|
|
|
}, {
|
|
|
|
name: "SP Racing F3",
|
2015-09-14 12:21:09 +00:00
|
|
|
identifier: "SRF3",
|
|
|
|
vcp: false
|
2015-10-31 23:10:01 +00:00
|
|
|
}, {
|
|
|
|
name: "MotoLab",
|
|
|
|
identifier: "MOTO",
|
|
|
|
vcp: true
|
2015-01-03 00:57:56 +00:00
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
var DEFAULT_BOARD_DEFINITION = {
|
|
|
|
name: "Unknown",
|
2015-11-09 21:29:02 +00:00
|
|
|
identifier: "????",
|
|
|
|
vcp: false
|
2015-01-03 00:57:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
var BOARD = {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
BOARD.find_board_definition = function (identifier) {
|
|
|
|
for (var i = 0; i < BOARD_DEFINITIONS.length; i++) {
|
|
|
|
var candidate = BOARD_DEFINITIONS[i];
|
|
|
|
|
|
|
|
if (candidate.identifier == identifier) {
|
|
|
|
return candidate;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return DEFAULT_BOARD_DEFINITION;
|
|
|
|
};
|