1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-17 21:35:33 +03:00

* Add Colibri Race Support

This commit is contained in:
Larry (TBS) 2015-08-06 12:19:15 +08:00
parent 8d39b3f8cc
commit d22f3faf1d
3 changed files with 41 additions and 0 deletions

View file

@ -31,6 +31,9 @@ var BOARD_DEFINITIONS = [
}, {
name: "STM32F3Discovery",
identifier: "SDF3"
}, {
name: "Colibri Race",
identifier: "CLBR"
}, {
name: "SP Racing F3",
identifier: "SRF3"

19
tabs/configuration.js Normal file → Executable file
View file

@ -45,6 +45,16 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
MSP.send_message(MSP_codes.MSP_IDENT, false, false, load_config);
function waitSeconds(iMilliSeconds) {
var counter= 0
, start = new Date().getTime()
, end = 0;
while (counter < iMilliSeconds) {
end = new Date().getTime();
counter = end - start;
}
}
function process_html() {
// translate to user-selected language
localize();
@ -400,6 +410,15 @@ TABS.configuration.initialize = function (callback, scrollPosition) {
}
MSP.send_message(MSP_codes.MSP_SET_BF_CONFIG, MSP.crunch(MSP_codes.MSP_SET_BF_CONFIG), false, save_serial_config);
if(CONFIG.boardIdentifier == "CLBR") {
waitSeconds(200);
$('a.connect').click();
waitSeconds(500);
$('a.connect').click();
}
});
// status data pulled via separate timer with static speed

19
tabs/ports.js Normal file → Executable file
View file

@ -211,6 +211,16 @@ TABS.ports.initialize = function (callback, scrollPosition) {
if (callback) callback();
}
function waitSeconds(iMilliSeconds) {
var counter= 0
, start = new Date().getTime()
, end = 0;
while (counter < iMilliSeconds) {
end = new Date().getTime();
counter = end - start;
}
}
function on_save_handler() {
// update configuration based on current ui state
@ -271,6 +281,15 @@ TABS.ports.initialize = function (callback, scrollPosition) {
});
}, rebootTimeoutDelay);
}
if(CONFIG.boardIdentifier == "CLBR") {
waitSeconds(200);
$('a.connect').click();
waitSeconds(500);
$('a.connect').click();
}
}
};