1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 09:45:28 +03:00

Added Virtual Mode

This commit is contained in:
visdauas 2020-12-28 17:24:34 +01:00
parent 09663e386e
commit 030a75a89e
15 changed files with 518 additions and 52 deletions

View file

@ -56,6 +56,10 @@ const MSP = {
JUMBO_FRAME_SIZE_LIMIT: 255,
read: function (readInfo) {
if (CONFIGURATOR.virtualMode) {
return;
}
const data = new Uint8Array(readInfo.data);
for (const chunk of data) {
@ -310,6 +314,13 @@ const MSP = {
return bufferOut;
},
send_message: function (code, data, callback_sent, callback_msp, doCallbackOnError) {
if (CONFIGURATOR.virtualMode) {
if (callback_msp) {
callback_msp();
}
return;
}
if (code === undefined) {
return;
}