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:
parent
09663e386e
commit
030a75a89e
15 changed files with 518 additions and 52 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue