






Started logging.

>>>
Content-Length: 3238

{"jsonrpc":"2.0","id":"1","method":"initialize","params":{"processId":10952,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"C:\\Users\\Administrator\\AppData\\Local\\Temp\\arduino-language-server633528422\\sketch","rootUri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch","initializationOptions":{},"capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"workspaceFolders":true,"configuration":true},"textDocument":{"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"colorProvider":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"publishDiagnostics":{"relatedInformation":true,"tagSupport":{"valueSet":[1,2]}},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"trace":"off","workspaceFolders":[{"uri":"file:///e%3A/5-%E6%95%99%E7%A8%8B/1.tutorial/ZYC0088%E8%B6%8A%E9%87%8E%E7%BA%A2%E5%A4%96%E7%89%88%E5%85%94%E5%AD%90%E8%BD%A6/ZYC0088-EN/4_Arduino_Code/rabbit_car_bluetooth","name":"rabbit_car_bluetooth"}]}}
<<<
Content-Length: 1905

{"id":"1","jsonrpc":"2.0","result":{"capabilities":{"astProvider":true,"callHierarchyProvider":true,"clangdInlayHintsProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"compilationDatabase":{"automaticReload":true},"completionProvider":{"allCommitCharacters":[" ","\t","(",")","[","]","{","}","<",">",":",";",",","+","-","/","*","%","^","&","#","?",".","=","\"","'","|"],"resolveProvider":false,"triggerCharacters":[".","<",">",":","\"","/","*"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"implementationProvider":true,"memoryUsageProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticTokensProvider":{"full":{"delta":true},"legend":{"tokenModifiers":["declaration","deprecated","deduced","readonly","static","abstract","virtual","dependentName","defaultLibrary","usedAsMutableReference","functionScope","classScope","fileScope","globalScope"],"tokenTypes":["variable","variable","parameter","function","method","function","property","variable","class","interface","enum","enumMember","type","type","unknown","namespace","typeParameter","concept","type","macro","comment"]},"range":false},"signatureHelpProvider":{"triggerCharacters":["(",")","{","}","<",">",","]},"textDocumentSync":{"change":2,"openClose":true,"save":true},"typeDefinitionProvider":true,"typeHierarchyProvider":true,"workspaceSymbolProvider":true},"serverInfo":{"name":"clangd","version":"clangd version 14.0.0 windows x86_64-pc-windows-msvc"}}}
>>>
Content-Length: 52

{"jsonrpc":"2.0","method":"initialized","params":{}}Content-Length: 16495

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp","languageId":"cpp","version":1,"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\n#include \u003cAdafruit_NeoPixel.h\u003e\n\nstatic const uint8_t LFA = 8;\nstatic const uint8_t LFB = 9;\nstatic const uint8_t LBA = 10;\nstatic const uint8_t LBB = 11;\nstatic const uint8_t RFA = 12;\nstatic const uint8_t RFB = 13;\nstatic const uint8_t RBA = 14;\nstatic const uint8_t RBB = 15;\n\nstatic const uint8_t BUZZER = 16;\n\nstatic const uint8_t led = 25;\n\nstatic const uint8_t Track0 = 26;   //ADC0\nstatic const uint8_t Track1 = 27;   //ADC1\nstatic const uint8_t Track2 = 28;   //ADC2\n\nstatic const uint8_t TRIG = 6;\nstatic const uint8_t ECHO = 7;\n\n#define NUM_LEDS 15             // LED灯珠数量\n#define LED_DT 17               // Arduino输出控制信号引脚\n#define LED_TYPE WS2812         // LED灯带型号\n#define COLOR_ORDER GRB         // RGB灯珠中红色、绿色、蓝色LED的排列顺序\nuint8_t max_bright = 200;       // LED亮度控制变量，可使用数值为 0 ～ 255， 数值越大则光带亮度越高\n\nbyte RX_package[7] = {0};\n\nuint32_t rx_timeout = 0;\nbyte rabbit_model = 0;\nint Black_Line = 200;\nint cha_speed = 50;\nuint64_t delaytime;\n\nAdafruit_NeoPixel strip(NUM_LEDS, LED_DT, NEO_GRB + NEO_KHZ800);\n\nenum em_dir\n{\n    stop = 0,\n    forward,\n    backward,\n    turnleft,\n    turnright,\n    l_up,\n    l_down,\n    r_up,\n    r_down,\n    Contrarotate,   // 逆时针转\n    Clockwise       // 顺时针转\n};\n\nstruct st_control\n{\n    uint8_t key1;\n    signed char X;\n    signed char Y;\n    signed char speed;\n} control;\n\n#line 62 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid setup();\n#line 100 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid loop();\n#line 130 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid tracking_model();\n#line 167 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid follow_model();\n#line 191 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid obstacle_avoidance_model();\n#line 224 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nbool delay100ms(uint32_t ms);\n#line 238 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid free_model();\n#line 316 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid buzzer_sound(unsigned int time_ms);\n#line 328 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nfloat SR04(int Trig, int Echo);\n#line 340 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid RX_information();\n#line 390 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid car_movement(em_dir direction, byte speed);\n#line 62 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid setup()\n{\n    Serial1.begin(9600);\n    Serial1.setTimeout(60);\n\n    pinMode(LFA, OUTPUT);\n    pinMode(LFB, OUTPUT);\n    pinMode(LBA, OUTPUT);\n    pinMode(LBB, OUTPUT);\n    pinMode(RFA, OUTPUT);\n    pinMode(RFB, OUTPUT);\n    pinMode(RBA, OUTPUT);\n    pinMode(RBB, OUTPUT);\n\n    pinMode(BUZZER, OUTPUT);\n\n    pinMode(led, OUTPUT);\n\n    pinMode(TRIG, OUTPUT);\n    pinMode(ECHO, INPUT);\n\n    strip.begin();\n    strip.setBrightness(max_bright);\n    for (size_t i = 0; i \u003c 15; i++)\n    {\n        strip.setPixelColor(i, 255, 0, 0);\n        strip.show();\n        delay(200);\n        strip.clear();\n        strip.show();\n    }\n\n    delaytime = millis();\n}\n\nint T0;\nint T1;\nint T2;\nvoid loop()\n{\n    RX_information();\n    switch (rabbit_model)\n    {\n    case 1:\n        obstacle_avoidance_model();\n        break;\n    case 2:\n        follow_model();\n        break;\n    case 3:\n        tracking_model();\n        break;\n    default:\n        free_model();\n        break;\n    }\n    // T0 = analogRead(Track0);\n    // T1 = analogRead(Track1);\n    // T2 = analogRead(Track2);\n    // Serial.print(\"T0:\");\n    // Serial.print(T0);\n    // Serial.print(\"--T1:\");\n    // Serial.print(T1);\n    // Serial.print(\"--T2:\");\n    // Serial.println(T2);\n    Serial1.print(\"-T2:\");\n}\n\nvoid tracking_model()   // 循迹\n{\n    int T0 = analogRead(Track0);\n    int T1 = analogRead(Track1);\n    int T2 = analogRead(Track2);\n    strip.fill(0x00ffff, 0, 15);\n    strip.show();\n    if (T0 \u003e Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003e Black_Line)//\n    {\n        car_movement(forward, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003e Black_Line)//Contrarotate\n    {\n        car_movement(Contrarotate, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003e Black_Line)//Contrarotate\n    {\n        car_movement(Contrarotate, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003c= Black_Line)//Clockwise\n    {\n        car_movement(Clockwise, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003c= Black_Line)//Clockwise\n    {\n        car_movement(Clockwise, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003e Black_Line)\n    {\n        car_movement(forward, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003c= Black_Line)\n    {\n        car_movement(stop, 0);\n    }\n}\n\nvoid follow_model() // 跟随\n{\n    int Avoidance_distance = SR04(TRIG, ECHO);\n    strip.fill(0x8B00FF, 0, 15);\n    strip.show();\n    if (Avoidance_distance \u003c= 15)\n    {\n        buzzer_sound(100);\n        car_movement(backward, control.speed);\n    }\n    else if (15 \u003c= Avoidance_distance \u0026\u0026 Avoidance_distance \u003c= 20)\n    {\n        car_movement(stop, 0);  // stop\n    } \n    else if (20 \u003c= Avoidance_distance \u0026\u0026 Avoidance_distance \u003c= 35)\n    { \n        car_movement(forward, control.speed);\n    } \n    else \n    {\n        car_movement(stop, 0);  // stop\n    }\n}\n\nvoid obstacle_avoidance_model() // 避障模式\n{\n    int Avoidance_distance = SR04(TRIG, ECHO);\n    strip.fill(0x0000ff, 0, 15);\n    strip.show();\n    if (Avoidance_distance \u003c= 25) \n    {\n        buzzer_sound(100);\n        if (Avoidance_distance \u003c= 15) \n        {\n            car_movement(stop, 0);  // stop\n            if(true == delay100ms(3))\n              return;\n        }\n        else\n        {\n            car_movement(stop, 0);  // stop\n            if(true == delay100ms(3))\n              return;\n            car_movement(backward, control.speed);\n            if(true == delay100ms(2))\n              return;\n            car_movement(Contrarotate, control.speed);\n            if(true == delay100ms(3))\n              return;\n        }\n    }\n    else\n    {\n        car_movement(forward, control.speed);\n    }\n}\n\nbool delay100ms(uint32_t ms)\n{\n  for(uint32_t i=ms; i\u003e0; i--)\n  {\n    RX_information();\n    delay(100);\n    if(control.key1 == 0x10 || control.key1 == 0x40 || control.key1 == 0x80)\n    {\n      return true;\n    }\n  }\n  return false;\n}\n\nvoid free_model()       // 自由遥控模式\n{\n    if (control.key1 == 0x01)   // clockwise\n    {\n        car_movement(Clockwise, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.key1 == 0x02)  // counterclockwise\n    {\n        car_movement(Contrarotate, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.key1 == 0x04)  // buzzer\n    {\n        buzzer_sound(1);\n    }\n    else if (control.X \u003c= 60 \u0026\u0026 control.X \u003e= -60 \u0026\u0026 control.Y \u003e= 60)  // forward\n    {\n        car_movement(forward, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.X \u003c= 60 \u0026\u0026 control.X \u003e= -60 \u0026\u0026 control.Y \u003c= -60)  // backward\n    {\n        car_movement(backward, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= 60 \u0026\u0026 control.Y \u003e= -60 \u0026\u0026 control.X \u003c= -60)  // Shift to the left\n    {\n        car_movement(turnleft, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= 60 \u0026\u0026 control.Y \u003e= -60 \u0026\u0026 control.X \u003e= 60)  // Shift to the right\n    {\n        car_movement(turnright, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003e= 60 \u0026\u0026 control.X \u003c= -60)  // upper left\n    {\n        car_movement(l_up, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= -60 \u0026\u0026 control.X \u003c= -60)  // lower left\n    {\n        car_movement(l_down, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003e= 60 \u0026\u0026 control.X \u003e= 60)  // upper right\n    {\n        car_movement(r_up, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= -60 \u0026\u0026 control.X \u003e= 60)  // lower right\n    {\n        car_movement(r_down, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else\n    {\n        car_movement(stop, 0);  // stop\n        if ((millis() - delaytime) \u003e 1000)\n        {\n            delaytime = millis();\n            strip.fill(random(1,16777215), 0, 15);\n            strip.show();\n        }\n    }\n}\n\nvoid buzzer_sound(unsigned int time_ms)\n{\n    while (time_ms)\n    {\n        time_ms--;\n        digitalWrite(BUZZER, 1);\n        delayMicroseconds(600);\n        digitalWrite(BUZZER, 0);\n        delayMicroseconds(400);\n    } \n}\n\nfloat SR04(int Trig, int Echo)\n{\n    digitalWrite(Trig, LOW);\n    delayMicroseconds(2);\n    digitalWrite(Trig, HIGH);\n    delayMicroseconds(10);\n    digitalWrite(Trig, LOW);\n    float distance = pulseIn(Echo, HIGH) / 58.00;\n    delay(10);\n    return distance;\n}\n\nvoid RX_information()\n{\n    if (Serial1.available())\n    {\n        Serial1.readBytes(RX_package, 7);\n        if (RX_package[0] == 0xA5 \u0026\u0026 RX_package[6] == 0x5A)\n        {\n            control.key1 = RX_package[1];\n            control.X = RX_package[2];\n            control.Y = RX_package[3];\n            control.speed = RX_package[4];\n            switch (control.key1)\n            {\n            case 0x10:\n                rabbit_model = 0;   // Free remote control mode\n            break;\n            case 0x20:\n                rabbit_model = 1;   // OA\n                break;\n            case 0x40:\n                rabbit_model = 2;   // Follow\n                break;\n            case 0x80:\n                rabbit_model = 3;   // tracking\n                break;\n            } \n        }\n        else\n        {\n            digitalWrite(led, !digitalRead(led));\n            control.X = 0;\n            control.Y = 0;\n            Serial1.flush();\n        }\n    }\n    else        // 超时600ms没有数据接收清空 Timeout 600ms No data receive clearing\n    {\n        delay(1);   \n        rx_timeout++;\n        if (rx_timeout \u003e 600)\n        {\n            rx_timeout = 0;\n            digitalWrite(led, !digitalRead(led));\n            control.X = 0;\n            control.Y = 0;\n            Serial1.flush();\n        }\n    }\n}\n\nvoid car_movement(em_dir direction, byte speed)\n{\n    speed = speed + 128;\n    switch (direction)\n    {\n    case forward:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    case backward:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case turnleft:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed-cha_speed);\n        analogWrite(RBA, speed-cha_speed);\n        analogWrite(RBB, 0);\n        break;\n    case turnright:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed-cha_speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed-cha_speed);\n        break;\n    case l_up:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, 0);\n        break;\n    case l_down:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case r_up:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    case r_down:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, 0);\n        break;\n    case Clockwise:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case Contrarotate:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    default:\n        analogWrite(LFA, 255);\n        analogWrite(LFB, 255);\n        analogWrite(LBA, 255);\n        analogWrite(LBB, 255);\n        analogWrite(RFA, 255);\n        analogWrite(RFB, 255);\n        analogWrite(RBA, 255);\n        analogWrite(RBB, 255);\n        break;\n    }\n}\n\n"}}}Content-Length: 321

{"jsonrpc":"2.0","id":"2","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":4,"character":29},"end":{"line":4,"character":29}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 187

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/.clangd"}}Content-Length: 111

{"id":0,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":0,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/31","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/31","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/31","percentage":0}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/31","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/31","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/31","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/31","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"1/31","percentage":3}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/31","percentage":6}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"2/31","percentage":6}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/31","percentage":9}}}Content-Length: 142

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"3/31","percentage":9}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/31","percentage":12}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"4/31","percentage":12}}}Content-Length: 808

{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[{"code":"pp_hash_error","message":"In included file: \"Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)\"","range":{"end":{"character":10,"line":0},"start":{"character":9,"line":0}},"relatedInformation":[{"location":{"range":{"end":{"character":10,"line":89},"start":{"character":5,"line":89}},"uri":"file:///C:/Users/Administrator/AppData/Local/Arduino15/packages/arduino/hardware/mbed_rp2040/3.4.1/cores/arduino/mbed/cmsis/CMSIS_5/CMSIS/TARGET_CORTEX_M/Include/core_cm0plus.h"},"message":"Error occurred here"}],"severity":1,"source":"clang"}],"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp","version":1}}Content-Length: 38

{"id":"2","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 220

{"jsonrpc":"2.0","id":"3","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"}}}
<<<
Content-Length: 14205

{"id":"3","jsonrpc":"2.0","result":[{"detail":"const uint8_t","kind":13,"name":"LFA","range":{"end":{"character":28,"line":4},"start":{"character":0,"line":4}},"selectionRange":{"end":{"character":24,"line":4},"start":{"character":21,"line":4}}},{"detail":"const uint8_t","kind":13,"name":"LFB","range":{"end":{"character":28,"line":5},"start":{"character":0,"line":5}},"selectionRange":{"end":{"character":24,"line":5},"start":{"character":21,"line":5}}},{"detail":"const uint8_t","kind":13,"name":"LBA","range":{"end":{"character":29,"line":6},"start":{"character":0,"line":6}},"selectionRange":{"end":{"character":24,"line":6},"start":{"character":21,"line":6}}},{"detail":"const uint8_t","kind":13,"name":"LBB","range":{"end":{"character":29,"line":7},"start":{"character":0,"line":7}},"selectionRange":{"end":{"character":24,"line":7},"start":{"character":21,"line":7}}},{"detail":"const uint8_t","kind":13,"name":"RFA","range":{"end":{"character":29,"line":8},"start":{"character":0,"line":8}},"selectionRange":{"end":{"character":24,"line":8},"start":{"character":21,"line":8}}},{"detail":"const uint8_t","kind":13,"name":"RFB","range":{"end":{"character":29,"line":9},"start":{"character":0,"line":9}},"selectionRange":{"end":{"character":24,"line":9},"start":{"character":21,"line":9}}},{"detail":"const uint8_t","kind":13,"name":"RBA","range":{"end":{"character":29,"line":10},"start":{"character":0,"line":10}},"selectionRange":{"end":{"character":24,"line":10},"start":{"character":21,"line":10}}},{"detail":"const uint8_t","kind":13,"name":"RBB","range":{"end":{"character":29,"line":11},"start":{"character":0,"line":11}},"selectionRange":{"end":{"character":24,"line":11},"start":{"character":21,"line":11}}},{"detail":"const uint8_t","kind":13,"name":"BUZZER","range":{"end":{"character":32,"line":13},"start":{"character":0,"line":13}},"selectionRange":{"end":{"character":27,"line":13},"start":{"character":21,"line":13}}},{"detail":"const uint8_t","kind":13,"name":"led","range":{"end":{"character":29,"line":15},"start":{"character":0,"line":15}},"selectionRange":{"end":{"character":24,"line":15},"start":{"character":21,"line":15}}},{"detail":"const uint8_t","kind":13,"name":"Track0","range":{"end":{"character":32,"line":17},"start":{"character":0,"line":17}},"selectionRange":{"end":{"character":27,"line":17},"start":{"character":21,"line":17}}},{"detail":"const uint8_t","kind":13,"name":"Track1","range":{"end":{"character":32,"line":18},"start":{"character":0,"line":18}},"selectionRange":{"end":{"character":27,"line":18},"start":{"character":21,"line":18}}},{"detail":"const uint8_t","kind":13,"name":"Track2","range":{"end":{"character":32,"line":19},"start":{"character":0,"line":19}},"selectionRange":{"end":{"character":27,"line":19},"start":{"character":21,"line":19}}},{"detail":"const uint8_t","kind":13,"name":"TRIG","range":{"end":{"character":29,"line":21},"start":{"character":0,"line":21}},"selectionRange":{"end":{"character":25,"line":21},"start":{"character":21,"line":21}}},{"detail":"const uint8_t","kind":13,"name":"ECHO","range":{"end":{"character":29,"line":22},"start":{"character":0,"line":22}},"selectionRange":{"end":{"character":25,"line":22},"start":{"character":21,"line":22}}},{"detail":"uint8_t","kind":13,"name":"max_bright","range":{"end":{"character":24,"line":28},"start":{"character":0,"line":28}},"selectionRange":{"end":{"character":18,"line":28},"start":{"character":8,"line":28}}},{"detail":"byte[7]","kind":13,"name":"RX_package","range":{"end":{"character":24,"line":30},"start":{"character":0,"line":30}},"selectionRange":{"end":{"character":15,"line":30},"start":{"character":5,"line":30}}},{"detail":"uint32_t","kind":13,"name":"rx_timeout","range":{"end":{"character":23,"line":32},"start":{"character":0,"line":32}},"selectionRange":{"end":{"character":19,"line":32},"start":{"character":9,"line":32}}},{"detail":"byte","kind":13,"name":"rabbit_model","range":{"end":{"character":21,"line":33},"start":{"character":0,"line":33}},"selectionRange":{"end":{"character":17,"line":33},"start":{"character":5,"line":33}}},{"detail":"int","kind":13,"name":"Black_Line","range":{"end":{"character":20,"line":34},"start":{"character":0,"line":34}},"selectionRange":{"end":{"character":14,"line":34},"start":{"character":4,"line":34}}},{"detail":"int","kind":13,"name":"cha_speed","range":{"end":{"character":18,"line":35},"start":{"character":0,"line":35}},"selectionRange":{"end":{"character":13,"line":35},"start":{"character":4,"line":35}}},{"detail":"uint64_t","kind":13,"name":"delaytime","range":{"end":{"character":18,"line":36},"start":{"character":0,"line":36}},"selectionRange":{"end":{"character":18,"line":36},"start":{"character":9,"line":36}}},{"detail":"Adafruit_NeoPixel","kind":13,"name":"strip","range":{"end":{"character":63,"line":38},"start":{"character":0,"line":38}},"selectionRange":{"end":{"character":23,"line":38},"start":{"character":18,"line":38}}},{"children":[{"detail":"em_dir","kind":22,"name":"stop","range":{"end":{"character":12,"line":42},"start":{"character":4,"line":42}},"selectionRange":{"end":{"character":8,"line":42},"start":{"character":4,"line":42}}},{"detail":"em_dir","kind":22,"name":"forward","range":{"end":{"character":11,"line":43},"start":{"character":4,"line":43}},"selectionRange":{"end":{"character":11,"line":43},"start":{"character":4,"line":43}}},{"detail":"em_dir","kind":22,"name":"backward","range":{"end":{"character":12,"line":44},"start":{"character":4,"line":44}},"selectionRange":{"end":{"character":12,"line":44},"start":{"character":4,"line":44}}},{"detail":"em_dir","kind":22,"name":"turnleft","range":{"end":{"character":12,"line":45},"start":{"character":4,"line":45}},"selectionRange":{"end":{"character":12,"line":45},"start":{"character":4,"line":45}}},{"detail":"em_dir","kind":22,"name":"turnright","range":{"end":{"character":13,"line":46},"start":{"character":4,"line":46}},"selectionRange":{"end":{"character":13,"line":46},"start":{"character":4,"line":46}}},{"detail":"em_dir","kind":22,"name":"l_up","range":{"end":{"character":8,"line":47},"start":{"character":4,"line":47}},"selectionRange":{"end":{"character":8,"line":47},"start":{"character":4,"line":47}}},{"detail":"em_dir","kind":22,"name":"l_down","range":{"end":{"character":10,"line":48},"start":{"character":4,"line":48}},"selectionRange":{"end":{"character":10,"line":48},"start":{"character":4,"line":48}}},{"detail":"em_dir","kind":22,"name":"r_up","range":{"end":{"character":8,"line":49},"start":{"character":4,"line":49}},"selectionRange":{"end":{"character":8,"line":49},"start":{"character":4,"line":49}}},{"detail":"em_dir","kind":22,"name":"r_down","range":{"end":{"character":10,"line":50},"start":{"character":4,"line":50}},"selectionRange":{"end":{"character":10,"line":50},"start":{"character":4,"line":50}}},{"detail":"em_dir","kind":22,"name":"Contrarotate","range":{"end":{"character":16,"line":51},"start":{"character":4,"line":51}},"selectionRange":{"end":{"character":16,"line":51},"start":{"character":4,"line":51}}},{"detail":"em_dir","kind":22,"name":"Clockwise","range":{"end":{"character":13,"line":52},"start":{"character":4,"line":52}},"selectionRange":{"end":{"character":13,"line":52},"start":{"character":4,"line":52}}}],"detail":"enum","kind":10,"name":"em_dir","range":{"end":{"character":1,"line":53},"start":{"character":0,"line":40}},"selectionRange":{"end":{"character":11,"line":40},"start":{"character":5,"line":40}}},{"children":[{"detail":"uint8_t","kind":8,"name":"key1","range":{"end":{"character":16,"line":57},"start":{"character":4,"line":57}},"selectionRange":{"end":{"character":16,"line":57},"start":{"character":12,"line":57}}},{"detail":"signed char","kind":8,"name":"X","range":{"end":{"character":17,"line":58},"start":{"character":4,"line":58}},"selectionRange":{"end":{"character":17,"line":58},"start":{"character":16,"line":58}}},{"detail":"signed char","kind":8,"name":"Y","range":{"end":{"character":17,"line":59},"start":{"character":4,"line":59}},"selectionRange":{"end":{"character":17,"line":59},"start":{"character":16,"line":59}}},{"detail":"signed char","kind":8,"name":"speed","range":{"end":{"character":21,"line":60},"start":{"character":4,"line":60}},"selectionRange":{"end":{"character":21,"line":60},"start":{"character":16,"line":60}}}],"detail":"struct","kind":23,"name":"st_control","range":{"end":{"character":1,"line":61},"start":{"character":0,"line":55}},"selectionRange":{"end":{"character":17,"line":55},"start":{"character":7,"line":55}}},{"detail":"struct st_control","kind":13,"name":"control","range":{"end":{"character":9,"line":61},"start":{"character":0,"line":55}},"selectionRange":{"end":{"character":9,"line":61},"start":{"character":2,"line":61}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":12,"line":64},"start":{"character":0,"line":64}},"selectionRange":{"end":{"character":10,"line":64},"start":{"character":5,"line":64}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":11,"line":66},"start":{"character":0,"line":66}},"selectionRange":{"end":{"character":9,"line":66},"start":{"character":5,"line":66}}},{"detail":"void ()","kind":12,"name":"tracking_model","range":{"end":{"character":21,"line":68},"start":{"character":0,"line":68}},"selectionRange":{"end":{"character":19,"line":68},"start":{"character":5,"line":68}}},{"detail":"void ()","kind":12,"name":"follow_model","range":{"end":{"character":19,"line":70},"start":{"character":0,"line":70}},"selectionRange":{"end":{"character":17,"line":70},"start":{"character":5,"line":70}}},{"detail":"void ()","kind":12,"name":"obstacle_avoidance_model","range":{"end":{"character":31,"line":72},"start":{"character":0,"line":72}},"selectionRange":{"end":{"character":29,"line":72},"start":{"character":5,"line":72}}},{"detail":"bool (uint32_t)","kind":12,"name":"delay100ms","range":{"end":{"character":28,"line":74},"start":{"character":0,"line":74}},"selectionRange":{"end":{"character":15,"line":74},"start":{"character":5,"line":74}}},{"detail":"void ()","kind":12,"name":"free_model","range":{"end":{"character":17,"line":76},"start":{"character":0,"line":76}},"selectionRange":{"end":{"character":15,"line":76},"start":{"character":5,"line":76}}},{"detail":"void (unsigned int)","kind":12,"name":"buzzer_sound","range":{"end":{"character":39,"line":78},"start":{"character":0,"line":78}},"selectionRange":{"end":{"character":17,"line":78},"start":{"character":5,"line":78}}},{"detail":"float (int, int)","kind":12,"name":"SR04","range":{"end":{"character":30,"line":80},"start":{"character":0,"line":80}},"selectionRange":{"end":{"character":10,"line":80},"start":{"character":6,"line":80}}},{"detail":"void ()","kind":12,"name":"RX_information","range":{"end":{"character":21,"line":82},"start":{"character":0,"line":82}},"selectionRange":{"end":{"character":19,"line":82},"start":{"character":5,"line":82}}},{"detail":"void (em_dir, byte)","kind":12,"name":"car_movement","range":{"end":{"character":47,"line":84},"start":{"character":0,"line":84}},"selectionRange":{"end":{"character":17,"line":84},"start":{"character":5,"line":84}}},{"detail":"void ()","kind":12,"name":"setup","range":{"end":{"character":1,"line":119},"start":{"character":0,"line":86}},"selectionRange":{"end":{"character":10,"line":86},"start":{"character":5,"line":86}}},{"detail":"int","kind":13,"name":"T0","range":{"end":{"character":6,"line":121},"start":{"character":0,"line":121}},"selectionRange":{"end":{"character":6,"line":121},"start":{"character":4,"line":121}}},{"detail":"int","kind":13,"name":"T1","range":{"end":{"character":6,"line":122},"start":{"character":0,"line":122}},"selectionRange":{"end":{"character":6,"line":122},"start":{"character":4,"line":122}}},{"detail":"int","kind":13,"name":"T2","range":{"end":{"character":6,"line":123},"start":{"character":0,"line":123}},"selectionRange":{"end":{"character":6,"line":123},"start":{"character":4,"line":123}}},{"detail":"void ()","kind":12,"name":"loop","range":{"end":{"character":1,"line":152},"start":{"character":0,"line":124}},"selectionRange":{"end":{"character":9,"line":124},"start":{"character":5,"line":124}}},{"detail":"void ()","kind":12,"name":"tracking_model","range":{"end":{"character":1,"line":189},"start":{"character":0,"line":154}},"selectionRange":{"end":{"character":19,"line":154},"start":{"character":5,"line":154}}},{"detail":"void ()","kind":12,"name":"follow_model","range":{"end":{"character":1,"line":213},"start":{"character":0,"line":191}},"selectionRange":{"end":{"character":17,"line":191},"start":{"character":5,"line":191}}},{"detail":"void ()","kind":12,"name":"obstacle_avoidance_model","range":{"end":{"character":1,"line":246},"start":{"character":0,"line":215}},"selectionRange":{"end":{"character":29,"line":215},"start":{"character":5,"line":215}}},{"detail":"bool (uint32_t)","kind":12,"name":"delay100ms","range":{"end":{"character":1,"line":260},"start":{"character":0,"line":248}},"selectionRange":{"end":{"character":15,"line":248},"start":{"character":5,"line":248}}},{"detail":"void ()","kind":12,"name":"free_model","range":{"end":{"character":1,"line":338},"start":{"character":0,"line":262}},"selectionRange":{"end":{"character":15,"line":262},"start":{"character":5,"line":262}}},{"detail":"void (unsigned int)","kind":12,"name":"buzzer_sound","range":{"end":{"character":1,"line":350},"start":{"character":0,"line":340}},"selectionRange":{"end":{"character":17,"line":340},"start":{"character":5,"line":340}}},{"detail":"float (int, int)","kind":12,"name":"SR04","range":{"end":{"character":1,"line":362},"start":{"character":0,"line":352}},"selectionRange":{"end":{"character":10,"line":352},"start":{"character":6,"line":352}}},{"detail":"void ()","kind":12,"name":"RX_information","range":{"end":{"character":1,"line":412},"start":{"character":0,"line":364}},"selectionRange":{"end":{"character":19,"line":364},"start":{"character":5,"line":364}}},{"detail":"void (em_dir, byte)","kind":12,"name":"car_movement","range":{"end":{"character":1,"line":530},"start":{"character":0,"line":414}},"selectionRange":{"end":{"character":17,"line":414},"start":{"character":5,"line":414}}}]}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/31","percentage":16}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"5/31","percentage":16}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/31","percentage":19}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"6/31","percentage":19}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/31","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"7/31","percentage":22}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/31","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"8/31","percentage":25}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/31","percentage":29}}}Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"9/31","percentage":29}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/31","percentage":32}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"10/31","percentage":32}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/31","percentage":35}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"11/31","percentage":35}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/31","percentage":38}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"12/31","percentage":38}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/31","percentage":41}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"13/31","percentage":41}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/31","percentage":45}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"14/31","percentage":45}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/31","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"15/31","percentage":48}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/31","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"16/31","percentage":51}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/31","percentage":54}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/31","percentage":54}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/31","percentage":58}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"18/31","percentage":58}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/31","percentage":61}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"19/31","percentage":61}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/31","percentage":64}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"20/31","percentage":64}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/31","percentage":67}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"21/31","percentage":67}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/31","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"22/31","percentage":70}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/31","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"23/31","percentage":74}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/31","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"24/31","percentage":77}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/31","percentage":80}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"25/31","percentage":80}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"26/31","percentage":83}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"27/31","percentage":87}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"28/31","percentage":90}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"29/31","percentage":93}}}Content-Length: 144

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"30/31","percentage":96}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"4","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":11,"character":29}}}
<<<
Content-Length: 40

{"id":"4","jsonrpc":"2.0","result":null}
>>>
Content-Length: 248

{"jsonrpc":"2.0","id":"5","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":4,"character":15}}}
<<<
Content-Length: 256

{"id":"5","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### type-alias `uint8_t`  \n\n---\nType: `__uint8_t`  \n\n---\n```cpp\ntypedef __uint8_t uint8_t\n```"},"range":{"end":{"character":20,"line":4},"start":{"character":13,"line":4}}}}
>>>
Content-Length: 321

{"jsonrpc":"2.0","id":"6","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":5,"character":29},"end":{"line":5,"character":29}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"6","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 323

{"jsonrpc":"2.0","id":"7","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":11,"character":30},"end":{"line":11,"character":30}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 38

{"id":"7","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"8","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":21,"character":21}}}
<<<
Content-Length: 276

{"id":"8","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `TRIG`  \n\n---\nType: `const uint8_t`  \nValue = `6`  \n\n---\n```cpp\nstatic const uint8_t TRIG = 6\n```"},"range":{"end":{"character":25,"line":21},"start":{"character":21,"line":21}}}}
>>>
Content-Length: 249

{"jsonrpc":"2.0","id":"9","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":19,"character":18}}}
<<<
Content-Length: 258

{"id":"9","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### type-alias `uint8_t`  \n\n---\nType: `__uint8_t`  \n\n---\n```cpp\ntypedef __uint8_t uint8_t\n```"},"range":{"end":{"character":20,"line":19},"start":{"character":13,"line":19}}}}
>>>
Content-Length: 204

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"}}}Content-Length: 16499

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp","version":2},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\n#include \u003cAdafruit_NeoPixel.h\u003e\n\nstatic const uint8_t LFA = 8;\nstatic const uint8_t LFB = 9;\nstatic const uint8_t LBA = 10;\nstatic const uint8_t LBB = 11;\nstatic const uint8_t RFA = 12;\nstatic const uint8_t RFB = 13;\nstatic const uint8_t RBA = 14;\nstatic const uint8_t RBB = 15;\n\nstatic const uint8_t BUZZER = 16;\n\nstatic const uint8_t led = 25;\n\nstatic const uint8_t Track0 = 26;   //ADC0\nstatic const uint8_t Track1 = 27;   //ADC1\nstatic const uint8_t Track2 = 28;   //ADC2\n\nstatic const uint8_t TRIG = 6;\nstatic const uint8_t ECHO = 7;\n\n#define NUM_LEDS 15             // LED灯珠数量\n#define LED_DT 17               // Arduino输出控制信号引脚\n#define LED_TYPE WS2812         // LED灯带型号\n#define COLOR_ORDER GRB         // RGB灯珠中红色、绿色、蓝色LED的排列顺序\nuint8_t max_bright = 200;       // LED亮度控制变量，可使用数值为 0 ～ 255， 数值越大则光带亮度越高\n\nbyte RX_package[7] = {0};\n\nuint32_t rx_timeout = 0;\nbyte rabbit_model = 0;\nint Black_Line = 200;\nint cha_speed = 50;\nuint64_t delaytime;\n\nAdafruit_NeoPixel strip(NUM_LEDS, LED_DT, NEO_GRB + NEO_KHZ800);\n\nenum em_dir\n{\n    stop = 0,\n    forward,\n    backward,\n    turnleft,\n    turnright,\n    l_up,\n    l_down,\n    r_up,\n    r_down,\n    Contrarotate,   // 逆时针转\n    Clockwise       // 顺时针转\n};\n\nstruct st_control\n{\n    uint8_t key1;\n    signed char X;\n    signed char Y;\n    signed char speed;\n} control;\n\n#line 62 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid setup();\n#line 100 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid loop();\n#line 130 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid tracking_model();\n#line 167 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid follow_model();\n#line 191 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid obstacle_avoidance_model();\n#line 224 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nbool delay100ms(uint32_t ms);\n#line 238 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid free_model();\n#line 316 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid buzzer_sound(unsigned int time_ms);\n#line 328 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nfloat SR04(int Trig, int Echo);\n#line 340 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid RX_information();\n#line 390 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid car_movement(em_dir direction, byte speed);\n#line 62 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid setup()\n{\n    Serial1.begin(9600);\n    Serial1.setTimeout(60);\n\n    pinMode(LFA, OUTPUT);\n    pinMode(LFB, OUTPUT);\n    pinMode(LBA, OUTPUT);\n    pinMode(LBB, OUTPUT);\n    pinMode(RFA, OUTPUT);\n    pinMode(RFB, OUTPUT);\n    pinMode(RBA, OUTPUT);\n    pinMode(RBB, OUTPUT);\n\n    pinMode(BUZZER, OUTPUT);\n\n    pinMode(led, OUTPUT);\n\n    pinMode(TRIG, OUTPUT);\n    pinMode(ECHO, INPUT);\n\n    strip.begin();\n    strip.setBrightness(max_bright);\n    for (size_t i = 0; i \u003c 15; i++)\n    {\n        strip.setPixelColor(i, 255, 0, 0);\n        strip.show();\n        delay(200);\n        strip.clear();\n        strip.show();\n    }\n\n    delaytime = millis();\n}\n\nint T0;\nint T1;\nint T2;\nvoid loop()\n{\n    RX_information();\n    switch (rabbit_model)\n    {\n    case 1:\n        obstacle_avoidance_model();\n        break;\n    case 2:\n        follow_model();\n        break;\n    case 3:\n        tracking_model();\n        break;\n    default:\n        free_model();\n        break;\n    }\n    // T0 = analogRead(Track0);\n    // T1 = analogRead(Track1);\n    // T2 = analogRead(Track2);\n    // Serial.print(\"T0:\");\n    // Serial.print(T0);\n    // Serial.print(\"--T1:\");\n    // Serial.print(T1);\n    // Serial.print(\"--T2:\");\n    // Serial.println(T2);\n    Serial1.print(\"-T2:\");\n}\n\nvoid tracking_model()   // 循迹\n{\n    int T0 = analogRead(Track0);\n    int T1 = analogRead(Track1);\n    int T2 = analogRead(Track2);\n    strip.fill(0x00ffff, 0, 15);\n    strip.show();\n    if (T0 \u003e Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003e Black_Line)//\n    {\n        car_movement(forward, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003e Black_Line)//Contrarotate\n    {\n        car_movement(Contrarotate, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003e Black_Line)//Contrarotate\n    {\n        car_movement(Contrarotate, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003c= Black_Line)//Clockwise\n    {\n        car_movement(Clockwise, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003c= Black_Line)//Clockwise\n    {\n        car_movement(Clockwise, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003e Black_Line)\n    {\n        car_movement(forward, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003c= Black_Line)\n    {\n        car_movement(stop, 0);\n    }\n}\n\nvoid follow_model() // 跟随\n{\n    int Avoidance_distance = SR04(TRIG, ECHO);\n    strip.fill(0x8B00FF, 0, 15);\n    strip.show();\n    if (Avoidance_distance \u003c= 15)\n    {\n        buzzer_sound(100);\n        car_movement(backward, control.speed);\n    }\n    else if (15 \u003c= Avoidance_distance \u0026\u0026 Avoidance_distance \u003c= 20)\n    {\n        car_movement(stop, 0);  // stop\n    } \n    else if (20 \u003c= Avoidance_distance \u0026\u0026 Avoidance_distance \u003c= 35)\n    { \n        car_movement(forward, control.speed);\n    } \n    else \n    {\n        car_movement(stop, 0);  // stop\n    }\n}\n\nvoid obstacle_avoidance_model() // 避障模式\n{\n    int Avoidance_distance = SR04(TRIG, ECHO);\n    strip.fill(0x0000ff, 0, 15);\n    strip.show();\n    if (Avoidance_distance \u003c= 25) \n    {\n        buzzer_sound(100);\n        if (Avoidance_distance \u003c= 15) \n        {\n            car_movement(stop, 0);  // stop\n            if(true == delay100ms(3))\n              return;\n        }\n        else\n        {\n            car_movement(stop, 0);  // stop\n            if(true == delay100ms(3))\n              return;\n            car_movement(backward, control.speed);\n            if(true == delay100ms(2))\n              return;\n            car_movement(Contrarotate, control.speed);\n            if(true == delay100ms(3))\n              return;\n        }\n    }\n    else\n    {\n        car_movement(forward, control.speed);\n    }\n}\n\nbool delay100ms(uint32_t ms)\n{\n  for(uint32_t i=ms; i\u003e0; i--)\n  {\n    RX_information();\n    delay(100);\n    if(control.key1 == 0x10 || control.key1 == 0x40 || control.key1 == 0x80)\n    {\n      return true;\n    }\n  }\n  return false;\n}\n\nvoid free_model()       // 自由遥控模式\n{\n    if (control.key1 == 0x01)   // clockwise\n    {\n        car_movement(Clockwise, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.key1 == 0x02)  // counterclockwise\n    {\n        car_movement(Contrarotate, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.key1 == 0x04)  // buzzer\n    {\n        buzzer_sound(1);\n    }\n    else if (control.X \u003c= 60 \u0026\u0026 control.X \u003e= -60 \u0026\u0026 control.Y \u003e= 60)  // forward\n    {\n        car_movement(forward, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.X \u003c= 60 \u0026\u0026 control.X \u003e= -60 \u0026\u0026 control.Y \u003c= -60)  // backward\n    {\n        car_movement(backward, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= 60 \u0026\u0026 control.Y \u003e= -60 \u0026\u0026 control.X \u003c= -60)  // Shift to the left\n    {\n        car_movement(turnleft, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= 60 \u0026\u0026 control.Y \u003e= -60 \u0026\u0026 control.X \u003e= 60)  // Shift to the right\n    {\n        car_movement(turnright, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003e= 60 \u0026\u0026 control.X \u003c= -60)  // upper left\n    {\n        car_movement(l_up, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= -60 \u0026\u0026 control.X \u003c= -60)  // lower left\n    {\n        car_movement(l_down, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003e= 60 \u0026\u0026 control.X \u003e= 60)  // upper right\n    {\n        car_movement(r_up, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= -60 \u0026\u0026 control.X \u003e= 60)  // lower right\n    {\n        car_movement(r_down, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else\n    {\n        car_movement(stop, 0);  // stop\n        if ((millis() - delaytime) \u003e 1000)\n        {\n            delaytime = millis();\n            strip.fill(random(1,16777215), 0, 15);\n            strip.show();\n        }\n    }\n}\n\nvoid buzzer_sound(unsigned int time_ms)\n{\n    while (time_ms)\n    {\n        time_ms--;\n        digitalWrite(BUZZER, 1);\n        delayMicroseconds(600);\n        digitalWrite(BUZZER, 0);\n        delayMicroseconds(400);\n    } \n}\n\nfloat SR04(int Trig, int Echo)\n{\n    digitalWrite(Trig, LOW);\n    delayMicroseconds(2);\n    digitalWrite(Trig, HIGH);\n    delayMicroseconds(10);\n    digitalWrite(Trig, LOW);\n    float distance = pulseIn(Echo, HIGH) / 58.00;\n    delay(10);\n    return distance;\n}\n\nvoid RX_information()\n{\n    if (Serial1.available())\n    {\n        Serial1.readBytes(RX_package, 7);\n        if (RX_package[0] == 0xA5 \u0026\u0026 RX_package[6] == 0x5A)\n        {\n            control.key1 = RX_package[1];\n            control.X = RX_package[2];\n            control.Y = RX_package[3];\n            control.speed = RX_package[4];\n            switch (control.key1)\n            {\n            case 0x10:\n                rabbit_model = 0;   // Free remote control mode\n            break;\n            case 0x20:\n                rabbit_model = 1;   // OA\n                break;\n            case 0x40:\n                rabbit_model = 2;   // Follow\n                break;\n            case 0x80:\n                rabbit_model = 3;   // tracking\n                break;\n            } \n        }\n        else\n        {\n            digitalWrite(led, !digitalRead(led));\n            control.X = 0;\n            control.Y = 0;\n            Serial1.flush();\n        }\n    }\n    else        // 超时600ms没有数据接收清空 Timeout 600ms No data receive clearing\n    {\n        delay(1);   \n        rx_timeout++;\n        if (rx_timeout \u003e 600)\n        {\n            rx_timeout = 0;\n            digitalWrite(led, !digitalRead(led));\n            control.X = 0;\n            control.Y = 0;\n            Serial1.flush();\n        }\n    }\n}\n\nvoid car_movement(em_dir direction, byte speed)\n{\n    speed = speed + 128;\n    switch (direction)\n    {\n    case forward:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    case backward:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case turnleft:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed-cha_speed);\n        analogWrite(RBA, speed-cha_speed);\n        analogWrite(RBB, 0);\n        break;\n    case turnright:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed-cha_speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed-cha_speed);\n        break;\n    case l_up:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, 0);\n        break;\n    case l_down:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case r_up:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    case r_down:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, 0);\n        break;\n    case Clockwise:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case Contrarotate:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    default:\n        analogWrite(LFA, 255);\n        analogWrite(LFB, 255);\n        analogWrite(LBA, 255);\n        analogWrite(LBB, 255);\n        analogWrite(RFA, 255);\n        analogWrite(RFB, 255);\n        analogWrite(RBA, 255);\n        analogWrite(RBB, 255);\n        break;\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":1,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":1,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 204

{"jsonrpc":"2.0","method":"textDocument/didSave","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"}}}Content-Length: 16499

{"jsonrpc":"2.0","method":"textDocument/didChange","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp","version":3},"contentChanges":[{"text":"#include \u003cArduino.h\u003e\n#line 1 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\n#include \u003cAdafruit_NeoPixel.h\u003e\n\nstatic const uint8_t LFA = 8;\nstatic const uint8_t LFB = 9;\nstatic const uint8_t LBA = 10;\nstatic const uint8_t LBB = 11;\nstatic const uint8_t RFA = 12;\nstatic const uint8_t RFB = 13;\nstatic const uint8_t RBA = 14;\nstatic const uint8_t RBB = 15;\n\nstatic const uint8_t BUZZER = 16;\n\nstatic const uint8_t led = 25;\n\nstatic const uint8_t Track0 = 26;   //ADC0\nstatic const uint8_t Track1 = 27;   //ADC1\nstatic const uint8_t Track2 = 28;   //ADC2\n\nstatic const uint8_t TRIG = 6;\nstatic const uint8_t ECHO = 7;\n\n#define NUM_LEDS 15             // LED灯珠数量\n#define LED_DT 17               // Arduino输出控制信号引脚\n#define LED_TYPE WS2812         // LED灯带型号\n#define COLOR_ORDER GRB         // RGB灯珠中红色、绿色、蓝色LED的排列顺序\nuint8_t max_bright = 200;       // LED亮度控制变量，可使用数值为 0 ～ 255， 数值越大则光带亮度越高\n\nbyte RX_package[7] = {0};\n\nuint32_t rx_timeout = 0;\nbyte rabbit_model = 0;\nint Black_Line = 200;\nint cha_speed = 50;\nuint64_t delaytime;\n\nAdafruit_NeoPixel strip(NUM_LEDS, LED_DT, NEO_GRB + NEO_KHZ800);\n\nenum em_dir\n{\n    stop = 0,\n    forward,\n    backward,\n    turnleft,\n    turnright,\n    l_up,\n    l_down,\n    r_up,\n    r_down,\n    Contrarotate,   // 逆时针转\n    Clockwise       // 顺时针转\n};\n\nstruct st_control\n{\n    uint8_t key1;\n    signed char X;\n    signed char Y;\n    signed char speed;\n} control;\n\n#line 62 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid setup();\n#line 100 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid loop();\n#line 130 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid tracking_model();\n#line 167 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid follow_model();\n#line 191 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid obstacle_avoidance_model();\n#line 224 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nbool delay100ms(uint32_t ms);\n#line 238 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid free_model();\n#line 316 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid buzzer_sound(unsigned int time_ms);\n#line 328 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nfloat SR04(int Trig, int Echo);\n#line 340 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid RX_information();\n#line 390 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid car_movement(em_dir direction, byte speed);\n#line 62 \"E:\\\\5-教程\\\\1.tutorial\\\\ZYC0088越野红外版兔子车\\\\ZYC0088-EN\\\\4_Arduino_Code\\\\rabbit_car_bluetooth\\\\rabbit_car_bluetooth.ino\"\nvoid setup()\n{\n    Serial1.begin(9600);\n    Serial1.setTimeout(60);\n\n    pinMode(LFA, OUTPUT);\n    pinMode(LFB, OUTPUT);\n    pinMode(LBA, OUTPUT);\n    pinMode(LBB, OUTPUT);\n    pinMode(RFA, OUTPUT);\n    pinMode(RFB, OUTPUT);\n    pinMode(RBA, OUTPUT);\n    pinMode(RBB, OUTPUT);\n\n    pinMode(BUZZER, OUTPUT);\n\n    pinMode(led, OUTPUT);\n\n    pinMode(TRIG, OUTPUT);\n    pinMode(ECHO, INPUT);\n\n    strip.begin();\n    strip.setBrightness(max_bright);\n    for (size_t i = 0; i \u003c 15; i++)\n    {\n        strip.setPixelColor(i, 255, 0, 0);\n        strip.show();\n        delay(200);\n        strip.clear();\n        strip.show();\n    }\n\n    delaytime = millis();\n}\n\nint T0;\nint T1;\nint T2;\nvoid loop()\n{\n    RX_information();\n    switch (rabbit_model)\n    {\n    case 1:\n        obstacle_avoidance_model();\n        break;\n    case 2:\n        follow_model();\n        break;\n    case 3:\n        tracking_model();\n        break;\n    default:\n        free_model();\n        break;\n    }\n    // T0 = analogRead(Track0);\n    // T1 = analogRead(Track1);\n    // T2 = analogRead(Track2);\n    // Serial.print(\"T0:\");\n    // Serial.print(T0);\n    // Serial.print(\"--T1:\");\n    // Serial.print(T1);\n    // Serial.print(\"--T2:\");\n    // Serial.println(T2);\n    Serial1.print(\"-T2:\");\n}\n\nvoid tracking_model()   // 循迹\n{\n    int T0 = analogRead(Track0);\n    int T1 = analogRead(Track1);\n    int T2 = analogRead(Track2);\n    strip.fill(0x00ffff, 0, 15);\n    strip.show();\n    if (T0 \u003e Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003e Black_Line)//\n    {\n        car_movement(forward, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003e Black_Line)//Contrarotate\n    {\n        car_movement(Contrarotate, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003e Black_Line)//Contrarotate\n    {\n        car_movement(Contrarotate, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003c= Black_Line)//Clockwise\n    {\n        car_movement(Clockwise, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003c= Black_Line)//Clockwise\n    {\n        car_movement(Clockwise, control.speed);\n    }\n    else if (T0 \u003e Black_Line \u0026\u0026 T1 \u003e Black_Line \u0026\u0026 T2 \u003e Black_Line)\n    {\n        car_movement(forward, control.speed);\n    }\n    else if (T0 \u003c= Black_Line \u0026\u0026 T1 \u003c= Black_Line \u0026\u0026 T2 \u003c= Black_Line)\n    {\n        car_movement(stop, 0);\n    }\n}\n\nvoid follow_model() // 跟随\n{\n    int Avoidance_distance = SR04(TRIG, ECHO);\n    strip.fill(0x8B00FF, 0, 15);\n    strip.show();\n    if (Avoidance_distance \u003c= 15)\n    {\n        buzzer_sound(100);\n        car_movement(backward, control.speed);\n    }\n    else if (15 \u003c= Avoidance_distance \u0026\u0026 Avoidance_distance \u003c= 20)\n    {\n        car_movement(stop, 0);  // stop\n    } \n    else if (20 \u003c= Avoidance_distance \u0026\u0026 Avoidance_distance \u003c= 35)\n    { \n        car_movement(forward, control.speed);\n    } \n    else \n    {\n        car_movement(stop, 0);  // stop\n    }\n}\n\nvoid obstacle_avoidance_model() // 避障模式\n{\n    int Avoidance_distance = SR04(TRIG, ECHO);\n    strip.fill(0x0000ff, 0, 15);\n    strip.show();\n    if (Avoidance_distance \u003c= 25) \n    {\n        buzzer_sound(100);\n        if (Avoidance_distance \u003c= 15) \n        {\n            car_movement(stop, 0);  // stop\n            if(true == delay100ms(3))\n              return;\n        }\n        else\n        {\n            car_movement(stop, 0);  // stop\n            if(true == delay100ms(3))\n              return;\n            car_movement(backward, control.speed);\n            if(true == delay100ms(2))\n              return;\n            car_movement(Contrarotate, control.speed);\n            if(true == delay100ms(3))\n              return;\n        }\n    }\n    else\n    {\n        car_movement(forward, control.speed);\n    }\n}\n\nbool delay100ms(uint32_t ms)\n{\n  for(uint32_t i=ms; i\u003e0; i--)\n  {\n    RX_information();\n    delay(100);\n    if(control.key1 == 0x10 || control.key1 == 0x40 || control.key1 == 0x80)\n    {\n      return true;\n    }\n  }\n  return false;\n}\n\nvoid free_model()       // 自由遥控模式\n{\n    if (control.key1 == 0x01)   // clockwise\n    {\n        car_movement(Clockwise, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.key1 == 0x02)  // counterclockwise\n    {\n        car_movement(Contrarotate, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.key1 == 0x04)  // buzzer\n    {\n        buzzer_sound(1);\n    }\n    else if (control.X \u003c= 60 \u0026\u0026 control.X \u003e= -60 \u0026\u0026 control.Y \u003e= 60)  // forward\n    {\n        car_movement(forward, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.X \u003c= 60 \u0026\u0026 control.X \u003e= -60 \u0026\u0026 control.Y \u003c= -60)  // backward\n    {\n        car_movement(backward, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= 60 \u0026\u0026 control.Y \u003e= -60 \u0026\u0026 control.X \u003c= -60)  // Shift to the left\n    {\n        car_movement(turnleft, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= 60 \u0026\u0026 control.Y \u003e= -60 \u0026\u0026 control.X \u003e= 60)  // Shift to the right\n    {\n        car_movement(turnright, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003e= 60 \u0026\u0026 control.X \u003c= -60)  // upper left\n    {\n        car_movement(l_up, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= -60 \u0026\u0026 control.X \u003c= -60)  // lower left\n    {\n        car_movement(l_down, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003e= 60 \u0026\u0026 control.X \u003e= 60)  // upper right\n    {\n        car_movement(r_up, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else if (control.Y \u003c= -60 \u0026\u0026 control.X \u003e= 60)  // lower right\n    {\n        car_movement(r_down, control.speed);\n        strip.fill(0x00ff00, 0, 15);\n        strip.show();\n    }\n    else\n    {\n        car_movement(stop, 0);  // stop\n        if ((millis() - delaytime) \u003e 1000)\n        {\n            delaytime = millis();\n            strip.fill(random(1,16777215), 0, 15);\n            strip.show();\n        }\n    }\n}\n\nvoid buzzer_sound(unsigned int time_ms)\n{\n    while (time_ms)\n    {\n        time_ms--;\n        digitalWrite(BUZZER, 1);\n        delayMicroseconds(600);\n        digitalWrite(BUZZER, 0);\n        delayMicroseconds(400);\n    } \n}\n\nfloat SR04(int Trig, int Echo)\n{\n    digitalWrite(Trig, LOW);\n    delayMicroseconds(2);\n    digitalWrite(Trig, HIGH);\n    delayMicroseconds(10);\n    digitalWrite(Trig, LOW);\n    float distance = pulseIn(Echo, HIGH) / 58.00;\n    delay(10);\n    return distance;\n}\n\nvoid RX_information()\n{\n    if (Serial1.available())\n    {\n        Serial1.readBytes(RX_package, 7);\n        if (RX_package[0] == 0xA5 \u0026\u0026 RX_package[6] == 0x5A)\n        {\n            control.key1 = RX_package[1];\n            control.X = RX_package[2];\n            control.Y = RX_package[3];\n            control.speed = RX_package[4];\n            switch (control.key1)\n            {\n            case 0x10:\n                rabbit_model = 0;   // Free remote control mode\n            break;\n            case 0x20:\n                rabbit_model = 1;   // OA\n                break;\n            case 0x40:\n                rabbit_model = 2;   // Follow\n                break;\n            case 0x80:\n                rabbit_model = 3;   // tracking\n                break;\n            } \n        }\n        else\n        {\n            digitalWrite(led, !digitalRead(led));\n            control.X = 0;\n            control.Y = 0;\n            Serial1.flush();\n        }\n    }\n    else        // 超时600ms没有数据接收清空 Timeout 600ms No data receive clearing\n    {\n        delay(1);   \n        rx_timeout++;\n        if (rx_timeout \u003e 600)\n        {\n            rx_timeout = 0;\n            digitalWrite(led, !digitalRead(led));\n            control.X = 0;\n            control.Y = 0;\n            Serial1.flush();\n        }\n    }\n}\n\nvoid car_movement(em_dir direction, byte speed)\n{\n    speed = speed + 128;\n    switch (direction)\n    {\n    case forward:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    case backward:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case turnleft:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed-cha_speed);\n        analogWrite(RBA, speed-cha_speed);\n        analogWrite(RBB, 0);\n        break;\n    case turnright:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed-cha_speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed-cha_speed);\n        break;\n    case l_up:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, 0);\n        break;\n    case l_down:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case r_up:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    case r_down:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, 0);\n        break;\n    case Clockwise:\n        analogWrite(LFA, speed);\n        analogWrite(LFB, 0);\n        analogWrite(LBA, speed);\n        analogWrite(LBB, 0);\n        analogWrite(RFA, speed);\n        analogWrite(RFB, 0);\n        analogWrite(RBA, speed);\n        analogWrite(RBB, 0);\n        break;\n    case Contrarotate:\n        analogWrite(LFA, 0);\n        analogWrite(LFB, speed);\n        analogWrite(LBA, 0);\n        analogWrite(LBB, speed);\n        analogWrite(RFA, 0);\n        analogWrite(RFB, speed);\n        analogWrite(RBA, 0);\n        analogWrite(RBB, speed);\n        break;\n    default:\n        analogWrite(LFA, 255);\n        analogWrite(LFB, 255);\n        analogWrite(LBA, 255);\n        analogWrite(LBB, 255);\n        analogWrite(RFA, 255);\n        analogWrite(RFB, 255);\n        analogWrite(RBA, 255);\n        analogWrite(RBB, 255);\n        break;\n    }\n}\n\n"}]}}
<<<
Content-Length: 111

{"id":2,"jsonrpc":"2.0","method":"window/workDoneProgress/create","params":{"token":"backgroundIndexProgress"}}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":2,"result":null}
<<<
Content-Length: 143

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"begin","percentage":0,"title":"indexing"}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 141

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"0/1","percentage":0}}}Content-Length: 107

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"end"}}}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"10","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":26,"character":32}}}
<<<
Content-Length: 41

{"id":"10","jsonrpc":"2.0","result":null}
>>>
Content-Length: 250

{"jsonrpc":"2.0","id":"11","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":26,"character":31}}}
<<<
Content-Length: 41

{"id":"11","jsonrpc":"2.0","result":null}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"12","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":36,"character":19},"end":{"line":36,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"12","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"13","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":35,"character":19},"end":{"line":35,"character":19}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"13","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"14","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":34,"character":21},"end":{"line":34,"character":21}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"14","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 251

{"jsonrpc":"2.0","id":"15","method":"textDocument/hover","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":165,"character":53}}}
<<<
Content-Length: 272

{"id":"15","jsonrpc":"2.0","result":{"contents":{"kind":"markdown","value":"### variable `T2`  \n\n---\nType: `int`  \n\n---\n```cpp\n// In tracking_model\nint T2 = analogRead(Track2)\n```"},"range":{"end":{"character":54,"line":165},"start":{"character":52,"line":165}}}}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"16","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":18,"character":42}}}
<<<
Content-Length: 39

{"id":"16","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"17","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":18,"character":42},"end":{"line":18,"character":42}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"17","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"18","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":18,"character":42}}}
<<<
Content-Length: 39

{"id":"18","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"19","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":18,"character":42},"end":{"line":18,"character":42}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"19","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"20","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":17,"character":42}}}
<<<
Content-Length: 39

{"id":"20","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"21","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":17,"character":42},"end":{"line":17,"character":42}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"21","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"22","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":18,"character":42}}}
<<<
Content-Length: 39

{"id":"22","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"23","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":18,"character":42},"end":{"line":18,"character":42}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"23","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"24","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":19,"character":42}}}
<<<
Content-Length: 39

{"id":"24","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"25","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":19,"character":42},"end":{"line":19,"character":42}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"25","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"26","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":17,"character":42}}}
<<<
Content-Length: 39

{"id":"26","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"27","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":17,"character":42},"end":{"line":17,"character":42}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"27","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 262

{"jsonrpc":"2.0","id":"28","method":"textDocument/documentHighlight","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"position":{"line":25,"character":50}}}
<<<
Content-Length: 39

{"id":"28","jsonrpc":"2.0","result":[]}
>>>
Content-Length: 324

{"jsonrpc":"2.0","id":"29","method":"textDocument/codeAction","params":{"textDocument":{"uri":"file:///C:/Users/Administrator/AppData/Local/Temp/arduino-language-server633528422/sketch/rabbit_car_bluetooth.ino.cpp"},"range":{"start":{"line":25,"character":50},"end":{"line":25,"character":50}},"context":{"diagnostics":[]}}}
<<<
Content-Length: 39

{"id":"29","jsonrpc":"2.0","result":[]}