






Started logging.

<<<
Content-Length: 3286

{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":9912,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"e:\\5-教程\\1.tutorial\\ZYC0088越野红外版兔子车\\code_infrared\\rabbit_car1","rootUri":"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/code_infrared/rabbit_car1","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},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":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]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"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,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"initializationOptions":{},"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/code_infrared/rabbit_car1","name":"rabbit_car1"}]}}
>>>
Content-Length: 936

{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"completionProvider":{"triggerCharacters":[".","\u003c","\u003e",":","\"","/"],"allCommitCharacters":[" ","\t","(",")","[","]","{","}","\u003c","\u003e",":",";",",","+","-","/","*","%","^","\u0026","#","?",".","=","\"","'","|"],"completionItem":{}},"hoverProvider":{},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":{},"documentHighlightProvider":{},"documentSymbolProvider":{},"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"documentFormattingProvider":{},"documentRangeFormattingProvider":{},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n"},"renameProvider":{},"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"workspaceSymbolProvider":{}},"serverInfo":{"name":"arduino-language-server","version":"0.7.2"}}}
<<<
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"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/code_infrared/rabbit_car1/rabbit_car1.ino","languageId":"cpp","version":1,"text":"#include <Adafruit_NeoPixel.h>\r\n#include <IRremote.h>\r\n\r\nstatic const uint8_t LFA = 8;\r\nstatic const uint8_t LFB = 9;\r\nstatic const uint8_t LBA = 10;\r\nstatic const uint8_t LBB = 11;\r\nstatic const uint8_t RFA = 12;\r\nstatic const uint8_t RFB = 13;\r\nstatic const uint8_t RBA = 14;\r\nstatic const uint8_t RBB = 15;\r\n\r\nstatic const uint8_t BUZZER = 16;\r\n\r\nstatic const uint8_t led = 25;\r\n\r\nstatic const uint8_t Track0 = 26; // ADC0\r\nstatic const uint8_t Track1 = 27; // ADC1\r\nstatic const uint8_t Track2 = 28; // ADC2\r\n\r\nstatic const uint8_t TRIG = 6;\r\nstatic const uint8_t ECHO = 7;\r\n\r\nstatic const int RECV = 18;\r\n\r\n#define NUM_LEDS 15       // LED灯珠数量\r\n#define LED_DT 17         // Arduino输出控制信号引脚\r\n#define LED_TYPE WS2812   // LED灯带型号\r\n#define COLOR_ORDER GRB   // RGB灯珠中红色、绿色、蓝色LED的排列顺序\r\nuint8_t max_bright = 127; // LED亮度控制变量，可使用数值为 0 ～ 255， 数值越大则光带亮度越高\r\n\r\nbyte rabbit_model = 0;\r\nint Black_Line = 200;\r\nuint64_t delaytime;\r\nbyte IR_DATA = 0;\r\n\r\nAdafruit_NeoPixel strip(NUM_LEDS, LED_DT, NEO_GRB + NEO_KHZ800);\r\n\r\nenum em_dir\r\n{\r\n    stop = 0,\r\n    forward,\r\n    backward,\r\n    turnleft,\r\n    turnright,\r\n    l_up,\r\n    l_down,\r\n    r_up,\r\n    r_down,\r\n    Contrarotate, // 逆时针\r\n    Clockwise     // 顺时针\r\n};\r\n\r\nvoid setup()\r\n{\r\n    Serial1.begin(9600);\r\n    Serial1.setTimeout(60);\r\n\r\n    IrReceiver.begin(RECV, DISABLE_LED_FEEDBACK);\r\n\r\n    pinMode(LFA, OUTPUT);\r\n    pinMode(LFB, OUTPUT);\r\n    pinMode(LBA, OUTPUT);\r\n    pinMode(LBB, OUTPUT);\r\n    pinMode(RFA, OUTPUT);\r\n    pinMode(RFB, OUTPUT);\r\n    pinMode(RBA, OUTPUT);\r\n    pinMode(RBB, OUTPUT);\r\n\r\n    pinMode(BUZZER, OUTPUT);\r\n\r\n    pinMode(led, OUTPUT);\r\n\r\n    pinMode(TRIG, OUTPUT);\r\n    pinMode(ECHO, INPUT);\r\n\r\n    strip.begin();\r\n    strip.setBrightness(max_bright);\r\n    for (size_t i = 0; i < 15; i++)\r\n    {\r\n        strip.setPixelColor(i, 255, 0, 0);\r\n        strip.show();\r\n        delay(200);\r\n        strip.clear();\r\n        strip.show();\r\n    }\r\n\r\n    delaytime = millis();\r\n\r\n    Serial1.print(\"asdadad: \");\r\n}\r\n\r\nvoid loop()\r\n{\r\n    IR_DATA = 0;\r\n    if (IrReceiver.decode())\r\n    {                                                           //当接收到信号时\r\n//         Serial1.println(IrReceiver.decodedIRData.command, HEX); //打印遥控按键编码\r\n        IR_DATA = IrReceiver.decodedIRData.command;\r\n        IrReceiver.resume();\r\n        switch (IR_DATA)\r\n        {\r\n        case 0xC:\r\n            rabbit_model = 0;\r\n            break;\r\n        case 0x18:\r\n            rabbit_model = 1;\r\n            break;\r\n        case 0x5E:\r\n            rabbit_model = 2;\r\n            break;\r\n        case 0x8:\r\n            rabbit_model = 3;\r\n            break;\r\n        default:\r\n            break;\r\n        }\r\n        \r\n    }\r\n    switch (rabbit_model)\r\n    {\r\n    case 1:\r\n        obstacle_avoidance_model();\r\n        break;\r\n    case 2:\r\n        follow_model();\r\n        break;\r\n    case 3:\r\n        tracking_model();\r\n        break;\r\n    default:\r\n        free_model();\r\n        break;\r\n    }\r\n}\r\n\r\nvoid tracking_model() // 循迹模式\r\n{\r\n    while(3 == rabbit_model)\r\n    {\r\n        int T0 = analogRead(Track0);\r\n        int T1 = analogRead(Track1);\r\n        int T2 = analogRead(Track2);\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;  \r\n             }\r\n        }\r\n        Serial1.print(\"IR_DATA:  \");\r\n        Serial1.println(IR_DATA);\r\n        Serial1.print(\"rabbit_model:  \");\r\n        Serial1.println(rabbit_model);\r\n        Serial1.println();\r\n        Serial1.println();\r\n        strip.fill(0x00ffff, 0, 15);\r\n        strip.show();\r\n        if (T0 > Black_Line && T1 <= Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(forward);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 <= Black_Line && T1 > Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(Clockwise);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 <= Black_Line && T1 <= Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(Clockwise);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 > Black_Line && T1 > Black_Line && T2 <= Black_Line)\r\n        {\r\n            car_movement(Contrarotate);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break; \r\n                } \r\n            }\r\n        }\r\n        else if (T0 > Black_Line && T1 <= Black_Line && T2 <= Black_Line)\r\n        {\r\n            car_movement(Contrarotate);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 > Black_Line && T1 > Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(forward);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 <= Black_Line && T1 <= Black_Line && T2 <= Black_Line)\r\n        {\r\n            car_movement(stop);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break; \r\n                } \r\n            }\r\n        }\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }\r\n            \r\n        }\r\n        Serial1.print(IR_DATA);\r\n    }\r\n}\r\n\r\nvoid follow_model() // 跟随模式\r\n{\r\n    int Avoidance_distance = SR04(TRIG, ECHO);\r\n    strip.fill(0x8B00FF, 0, 15);\r\n    strip.show();\r\n    if (IrReceiver.decode())\r\n    {                                                           //当接收到信号时\r\n        IR_DATA = IrReceiver.decodedIRData.command;\r\n        IrReceiver.resume();\r\n        switch (IR_DATA)\r\n        {\r\n        case 0xC:\r\n            rabbit_model = 0;\r\n            break;\r\n        case 0x18:\r\n            rabbit_model = 1;\r\n            break;\r\n        case 0x5E:\r\n            rabbit_model = 2;\r\n            break;\r\n        case 0x8:\r\n            rabbit_model = 3;\r\n            break;\r\n        }   \r\n    }\r\n    if (Avoidance_distance <= 15)\r\n    {\r\n        buzzer_sound(100);\r\n        car_movement(backward);\r\n    }\r\n    else if (15 <= Avoidance_distance && Avoidance_distance <= 20)\r\n    {\r\n        car_movement(stop); // 停止\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }   \r\n        }\r\n    }\r\n    else if (20 <= Avoidance_distance && Avoidance_distance <= 35)\r\n    {\r\n        car_movement(forward);\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }   \r\n        }\r\n    }\r\n    else\r\n    {\r\n        car_movement(stop); // 停止\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }   \r\n        }\r\n    }\r\n    if (IrReceiver.decode())\r\n    {                                                           //当接收到信号时\r\n        IR_DATA = IrReceiver.decodedIRData.command;\r\n        IrReceiver.resume();\r\n        switch (IR_DATA)\r\n        {\r\n        case 0xC:\r\n            rabbit_model = 0;\r\n            break;\r\n        case 0x18:\r\n            rabbit_model = 1;\r\n            break;\r\n        case 0x5E:\r\n            rabbit_model = 2;\r\n            break;\r\n        case 0x8:\r\n            rabbit_model = 3;\r\n            break;\r\n        }   \r\n    }\r\n}\r\n\r\nvoid obstacle_avoidance_model() // 避障模式\r\n{\r\n    int Avoidance_distance = SR04(TRIG, ECHO);\r\n    strip.fill(0x0000ff, 0, 15);\r\n    strip.show();\r\n    if (Avoidance_distance <= 25)\r\n    {\r\n        buzzer_sound(100);\r\n        if (Avoidance_distance <= 15)\r\n        {\r\n            car_movement(stop); // 停止\r\n            if(false == delay50ms(5)) return;\r\n            car_movement(backward);\r\n            if(false == delay50ms(5)) return;\r\n            car_movement(Clockwise);\r\n            if(false == delay50ms(2)) return;\r\n        }\r\n        else\r\n        {\r\n            car_movement(stop); // 停止\r\n            if(false == delay50ms(5)) return;\r\n            car_movement(backward);\r\n            if(false == delay50ms(6)) return;\r\n            car_movement(Contrarotate);\r\n            if(false == delay50ms(5)) return;\r\n        }\r\n    }\r\n    else\r\n    {\r\n        car_movement(forward);\r\n    }\r\n}\r\n\r\nbool delay50ms(uint32_t ms)\r\n{\r\n    for(; ms>0; ms--)\r\n    {\r\n        delay(50);  \r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                return false;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                return false;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                return false;\r\n                break;\r\n            default:\r\n                break;\r\n            }\r\n            \r\n        }   \r\n    } \r\n    return true;\r\n}\r\n\r\nvoid free_model() // 遥控模式\r\n{\r\n    if (IR_DATA == 0x15) // 顺时针\r\n    {\r\n        car_movement(Clockwise);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x47) // 喇叭\r\n    {\r\n        buzzer_sound(100);\r\n    }\r\n    else if (IR_DATA == 0x40) // 前进\r\n    {\r\n        car_movement(forward);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x19) // 后退\r\n    {\r\n        car_movement(backward);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x7) // 左平移\r\n    {\r\n        car_movement(turnleft);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x9) // 右平移\r\n    {\r\n        car_movement(turnright);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x44) // 左上\r\n    {\r\n        car_movement(l_up);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x16) // 左下\r\n    {\r\n        car_movement(l_down);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x43) // 右上\r\n    {\r\n        car_movement(r_up);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0xD) // 右下\r\n    {\r\n        car_movement(r_down);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else\r\n    {\r\n        car_movement(stop); // 停止\r\n        if ((millis() - delaytime) > 1000)\r\n        {\r\n            delaytime = millis();\r\n            strip.fill(random(1, 16777215), 0, 15);\r\n            strip.show();\r\n        }\r\n    }\r\n    IR_DATA = 0;\r\n}\r\n\r\nvoid buzzer_sound(unsigned int time_ms)\r\n{\r\n    while (time_ms)\r\n    {\r\n        time_ms--;\r\n        digitalWrite(BUZZER, 1);\r\n        delayMicroseconds(600);\r\n        digitalWrite(BUZZER, 0);\r\n        delayMicroseconds(400);\r\n    }\r\n}\r\n\r\nfloat SR04(int Trig, int Echo)\r\n{\r\n    digitalWrite(Trig, LOW);\r\n    delayMicroseconds(2);\r\n    digitalWrite(Trig, HIGH);\r\n    delayMicroseconds(10);\r\n    digitalWrite(Trig, LOW);\r\n    float distance = pulseIn(Echo, HIGH) / 58.00;\r\n    delay(10);\r\n    return distance;\r\n}\r\n\r\nvoid car_movement(em_dir direction)\r\n{\r\n    switch (direction)\r\n    {\r\n    case forward:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    case backward:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case turnleft:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case turnright:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    case l_up:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case l_down:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case r_up:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    case r_down:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case Clockwise:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case Contrarotate:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    default:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    }\r\n}\r\n"}}}Content-Length: 365

{"jsonrpc":"2.0","id":1,"method":"textDocument/codeAction","params":{"textDocument":{"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/code_infrared/rabbit_car1/rabbit_car1.ino"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"context":{"diagnostics":[]}}}Content-Length: 266

{"jsonrpc":"2.0","id":2,"method":"textDocument/documentSymbol","params":{"textDocument":{"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/code_infrared/rabbit_car1/rabbit_car1.ino"}}}Content-Length: 293

{"jsonrpc":"2.0","id":3,"method":"textDocument/hover","params":{"textDocument":{"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/code_infrared/rabbit_car1/rabbit_car1.ino"},"position":{"line":3,"character":6}}}Content-Length: 62

{"jsonrpc":"2.0","method":"$/cancelRequest","params":{"id":3}}
>>>
Content-Length: 113

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

{"jsonrpc":"2.0","id":1,"result":[]}Content-Length: 9448

{"jsonrpc":"2.0","id":2,"result":[{"name":"LFA","detail":"const uint8_t","kind":13,"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":28}},"selectionRange":{"start":{"line":3,"character":21},"end":{"line":3,"character":24}}},{"name":"LFB","detail":"const uint8_t","kind":13,"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":28}},"selectionRange":{"start":{"line":4,"character":21},"end":{"line":4,"character":24}}},{"name":"LBA","detail":"const uint8_t","kind":13,"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":29}},"selectionRange":{"start":{"line":5,"character":21},"end":{"line":5,"character":24}}},{"name":"LBB","detail":"const uint8_t","kind":13,"range":{"start":{"line":6,"character":0},"end":{"line":6,"character":29}},"selectionRange":{"start":{"line":6,"character":21},"end":{"line":6,"character":24}}},{"name":"RFA","detail":"const uint8_t","kind":13,"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":29}},"selectionRange":{"start":{"line":7,"character":21},"end":{"line":7,"character":24}}},{"name":"RFB","detail":"const uint8_t","kind":13,"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":29}},"selectionRange":{"start":{"line":8,"character":21},"end":{"line":8,"character":24}}},{"name":"RBA","detail":"const uint8_t","kind":13,"range":{"start":{"line":9,"character":0},"end":{"line":9,"character":29}},"selectionRange":{"start":{"line":9,"character":21},"end":{"line":9,"character":24}}},{"name":"RBB","detail":"const uint8_t","kind":13,"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":29}},"selectionRange":{"start":{"line":10,"character":21},"end":{"line":10,"character":24}}},{"name":"BUZZER","detail":"const uint8_t","kind":13,"range":{"start":{"line":12,"character":0},"end":{"line":12,"character":32}},"selectionRange":{"start":{"line":12,"character":21},"end":{"line":12,"character":27}}},{"name":"led","detail":"const uint8_t","kind":13,"range":{"start":{"line":14,"character":0},"end":{"line":14,"character":29}},"selectionRange":{"start":{"line":14,"character":21},"end":{"line":14,"character":24}}},{"name":"Track0","detail":"const uint8_t","kind":13,"range":{"start":{"line":16,"character":0},"end":{"line":16,"character":32}},"selectionRange":{"start":{"line":16,"character":21},"end":{"line":16,"character":27}}},{"name":"Track1","detail":"const uint8_t","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":32}},"selectionRange":{"start":{"line":17,"character":21},"end":{"line":17,"character":27}}},{"name":"Track2","detail":"const uint8_t","kind":13,"range":{"start":{"line":18,"character":0},"end":{"line":18,"character":32}},"selectionRange":{"start":{"line":18,"character":21},"end":{"line":18,"character":27}}},{"name":"TRIG","detail":"const uint8_t","kind":13,"range":{"start":{"line":20,"character":0},"end":{"line":20,"character":29}},"selectionRange":{"start":{"line":20,"character":21},"end":{"line":20,"character":25}}},{"name":"ECHO","detail":"const uint8_t","kind":13,"range":{"start":{"line":21,"character":0},"end":{"line":21,"character":29}},"selectionRange":{"start":{"line":21,"character":21},"end":{"line":21,"character":25}}},{"name":"RECV","detail":"const int","kind":13,"range":{"start":{"line":23,"character":0},"end":{"line":23,"character":26}},"selectionRange":{"start":{"line":23,"character":17},"end":{"line":23,"character":21}}},{"name":"max_bright","detail":"uint8_t","kind":13,"range":{"start":{"line":29,"character":0},"end":{"line":29,"character":24}},"selectionRange":{"start":{"line":29,"character":8},"end":{"line":29,"character":18}}},{"name":"rabbit_model","detail":"byte","kind":13,"range":{"start":{"line":31,"character":0},"end":{"line":31,"character":21}},"selectionRange":{"start":{"line":31,"character":5},"end":{"line":31,"character":17}}},{"name":"Black_Line","detail":"int","kind":13,"range":{"start":{"line":32,"character":0},"end":{"line":32,"character":20}},"selectionRange":{"start":{"line":32,"character":4},"end":{"line":32,"character":14}}},{"name":"delaytime","detail":"uint64_t","kind":13,"range":{"start":{"line":33,"character":0},"end":{"line":33,"character":18}},"selectionRange":{"start":{"line":33,"character":9},"end":{"line":33,"character":18}}},{"name":"IR_DATA","detail":"byte","kind":13,"range":{"start":{"line":34,"character":0},"end":{"line":34,"character":16}},"selectionRange":{"start":{"line":34,"character":5},"end":{"line":34,"character":12}}},{"name":"strip","detail":"Adafruit_NeoPixel","kind":13,"range":{"start":{"line":36,"character":0},"end":{"line":36,"character":63}},"selectionRange":{"start":{"line":36,"character":18},"end":{"line":36,"character":23}}},{"name":"em_dir","detail":"enum","kind":10,"range":{"start":{"line":38,"character":0},"end":{"line":51,"character":1}},"selectionRange":{"start":{"line":38,"character":5},"end":{"line":38,"character":11}},"children":[{"name":"stop","detail":"em_dir","kind":22,"range":{"start":{"line":40,"character":4},"end":{"line":40,"character":12}},"selectionRange":{"start":{"line":40,"character":4},"end":{"line":40,"character":8}}},{"name":"forward","detail":"em_dir","kind":22,"range":{"start":{"line":41,"character":4},"end":{"line":41,"character":11}},"selectionRange":{"start":{"line":41,"character":4},"end":{"line":41,"character":11}}},{"name":"backward","detail":"em_dir","kind":22,"range":{"start":{"line":42,"character":4},"end":{"line":42,"character":12}},"selectionRange":{"start":{"line":42,"character":4},"end":{"line":42,"character":12}}},{"name":"turnleft","detail":"em_dir","kind":22,"range":{"start":{"line":43,"character":4},"end":{"line":43,"character":12}},"selectionRange":{"start":{"line":43,"character":4},"end":{"line":43,"character":12}}},{"name":"turnright","detail":"em_dir","kind":22,"range":{"start":{"line":44,"character":4},"end":{"line":44,"character":13}},"selectionRange":{"start":{"line":44,"character":4},"end":{"line":44,"character":13}}},{"name":"l_up","detail":"em_dir","kind":22,"range":{"start":{"line":45,"character":4},"end":{"line":45,"character":8}},"selectionRange":{"start":{"line":45,"character":4},"end":{"line":45,"character":8}}},{"name":"l_down","detail":"em_dir","kind":22,"range":{"start":{"line":46,"character":4},"end":{"line":46,"character":10}},"selectionRange":{"start":{"line":46,"character":4},"end":{"line":46,"character":10}}},{"name":"r_up","detail":"em_dir","kind":22,"range":{"start":{"line":47,"character":4},"end":{"line":47,"character":8}},"selectionRange":{"start":{"line":47,"character":4},"end":{"line":47,"character":8}}},{"name":"r_down","detail":"em_dir","kind":22,"range":{"start":{"line":48,"character":4},"end":{"line":48,"character":10}},"selectionRange":{"start":{"line":48,"character":4},"end":{"line":48,"character":10}}},{"name":"Contrarotate","detail":"em_dir","kind":22,"range":{"start":{"line":49,"character":4},"end":{"line":49,"character":16}},"selectionRange":{"start":{"line":49,"character":4},"end":{"line":49,"character":16}}},{"name":"Clockwise","detail":"em_dir","kind":22,"range":{"start":{"line":50,"character":4},"end":{"line":50,"character":13}},"selectionRange":{"start":{"line":50,"character":4},"end":{"line":50,"character":13}}}]},{"name":"setup","detail":"void ()","kind":12,"range":{"start":{"line":53,"character":0},"end":{"line":90,"character":1}},"selectionRange":{"start":{"line":53,"character":5},"end":{"line":53,"character":10}}},{"name":"loop","detail":"void ()","kind":12,"range":{"start":{"line":92,"character":0},"end":{"line":134,"character":1}},"selectionRange":{"start":{"line":92,"character":5},"end":{"line":92,"character":9}}},{"name":"tracking_model","detail":"void ()","kind":12,"range":{"start":{"line":136,"character":0},"end":{"line":362,"character":1}},"selectionRange":{"start":{"line":136,"character":5},"end":{"line":136,"character":19}}},{"name":"follow_model","detail":"void ()","kind":12,"range":{"start":{"line":364,"character":0},"end":{"line":486,"character":1}},"selectionRange":{"start":{"line":364,"character":5},"end":{"line":364,"character":17}}},{"name":"obstacle_avoidance_model","detail":"void ()","kind":12,"range":{"start":{"line":488,"character":0},"end":{"line":519,"character":1}},"selectionRange":{"start":{"line":488,"character":5},"end":{"line":488,"character":29}}},{"name":"delay50ms","detail":"bool (uint32_t)","kind":12,"range":{"start":{"line":521,"character":0},"end":{"line":554,"character":1}},"selectionRange":{"start":{"line":521,"character":5},"end":{"line":521,"character":14}}},{"name":"free_model","detail":"void ()","kind":12,"range":{"start":{"line":556,"character":0},"end":{"line":636,"character":1}},"selectionRange":{"start":{"line":556,"character":5},"end":{"line":556,"character":15}}},{"name":"buzzer_sound","detail":"void (unsigned int)","kind":12,"range":{"start":{"line":638,"character":0},"end":{"line":648,"character":1}},"selectionRange":{"start":{"line":638,"character":5},"end":{"line":638,"character":17}}},{"name":"SR04","detail":"float (int, int)","kind":12,"range":{"start":{"line":650,"character":0},"end":{"line":660,"character":1}},"selectionRange":{"start":{"line":650,"character":6},"end":{"line":650,"character":10}}},{"name":"car_movement","detail":"void (em_dir)","kind":12,"range":{"start":{"line":662,"character":0},"end":{"line":777,"character":1}},"selectionRange":{"start":{"line":662,"character":5},"end":{"line":662,"character":17}}}]}Content-Length: 268

{"jsonrpc":"2.0","id":3,"result":{"contents":{"kind":"markdown","value":"### variable `LFA`  \n\n---\nType: `const uint8_t`  \nValue = `8`  \n\n---\n```cpp\nstatic const uint8_t LFA = 8\n```"},"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":6}}}}
<<<
Content-Length: 40

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

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

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

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

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

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

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

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

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

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

{"jsonrpc":"2.0","method":"ino/didCompleteBuild","params":{"buildOutputUri":"file:///c%3A/Users/Administrator/AppData/Local/Temp/arduino-sketch-F0CD8E1201A1DB52CE202FAE4457DC37"}}
>>>
Content-Length: 144

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

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

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

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

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

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

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

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

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

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

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

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"backgroundIndexProgress","value":{"kind":"report","message":"17/35","percentage":48}}}Content-Length: 118

{"jsonrpc":"2.0","id":"2","method":"window/workDoneProgress/create","params":{"token":"arduinoLanguageServerRebuild"}}
<<<
Content-Length: 40

{"jsonrpc":"2.0","id":"2","result":null}
>>>
Content-Length: 140

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"arduinoLanguageServerRebuild","value":{"kind":"begin","title":"Building sketch"}}}Content-Length: 144

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

{"jsonrpc":"2.0","method":"$/progress","params":{"token":"arduinoLanguageServerRebuild","value":{"kind":"end","message":"done"}}}Content-Length: 144

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

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

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

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

{"jsonrpc":"2.0","id":4,"method":"textDocument/codeAction","params":{"textDocument":{"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/code_infrared/rabbit_car1/rabbit_car1.ino"},"range":{"start":{"line":12,"character":33},"end":{"line":12,"character":33}},"context":{"diagnostics":[]}}}
>>>
Content-Length: 36

{"jsonrpc":"2.0","id":4,"result":[]}
<<<
Content-Length: 369

{"jsonrpc":"2.0","id":5,"method":"textDocument/codeAction","params":{"textDocument":{"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/code_infrared/rabbit_car1/rabbit_car1.ino"},"range":{"start":{"line":14,"character":30},"end":{"line":14,"character":30}},"context":{"diagnostics":[]}}}
>>>
Content-Length: 36

{"jsonrpc":"2.0","id":5,"result":[]}
<<<
Content-Length: 58

{"jsonrpc":"2.0","id":6,"method":"shutdown","params":null}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":6,"result":null}
<<<
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}






Started logging.

<<<
Content-Length: 3321

{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":4924,"clientInfo":{"name":"vscode","version":"1.53.2"},"rootPath":"e:\\5-教程\\1.tutorial\\ZYC0088越野红外版兔子车\\4_Arduino_Code\\rabbit_car_infrared","rootUri":"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/4_Arduino_Code/rabbit_car_infrared","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},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]}},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":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]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}},"contextSupport":true},"definition":{"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,"isPreferredSupport":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true}},"window":{"workDoneProgress":true}},"initializationOptions":{},"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/4_Arduino_Code/rabbit_car_infrared","name":"rabbit_car_infrared"}]}}
>>>
Content-Length: 936

{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{"includeText":true}},"completionProvider":{"triggerCharacters":[".","\u003c","\u003e",":","\"","/"],"allCommitCharacters":[" ","\t","(",")","[","]","{","}","\u003c","\u003e",":",";",",","+","-","/","*","%","^","\u0026","#","?",".","=","\"","'","|"],"completionItem":{}},"hoverProvider":{},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":{},"documentHighlightProvider":{},"documentSymbolProvider":{},"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"documentFormattingProvider":{},"documentRangeFormattingProvider":{},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n"},"renameProvider":{},"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"workspaceSymbolProvider":{}},"serverInfo":{"name":"arduino-language-server","version":"0.7.2"}}}
<<<
Content-Length: 52

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

{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"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/4_Arduino_Code/rabbit_car_infrared/rabbit_car_infrared.ino","languageId":"cpp","version":1,"text":"#include <Adafruit_NeoPixel.h>\r\n#include <IRremote.h>\r\n\r\nstatic const uint8_t LFA = 8;\r\nstatic const uint8_t LFB = 9;\r\nstatic const uint8_t LBA = 10;\r\nstatic const uint8_t LBB = 11;\r\nstatic const uint8_t RFA = 12;\r\nstatic const uint8_t RFB = 13;\r\nstatic const uint8_t RBA = 14;\r\nstatic const uint8_t RBB = 15;\r\n\r\nstatic const uint8_t BUZZER = 16;\r\n\r\nstatic const uint8_t led = 25;\r\n\r\nstatic const uint8_t Track0 = 26; // ADC0\r\nstatic const uint8_t Track1 = 27; // ADC1\r\nstatic const uint8_t Track2 = 28; // ADC2\r\n\r\nstatic const uint8_t TRIG = 6;\r\nstatic const uint8_t ECHO = 7;\r\n\r\nstatic const int RECV = 18;\r\n\r\n#define NUM_LEDS 15       // LED灯珠数量\r\n#define LED_DT 17         // Arduino输出控制信号引脚\r\n#define LED_TYPE WS2812   // LED灯带型号\r\n#define COLOR_ORDER GRB   // RGB灯珠中红色、绿色、蓝色LED的排列顺序\r\nuint8_t max_bright = 127; // LED亮度控制变量，可使用数值为 0 ～ 255， 数值越大则光带亮度越高\r\n\r\nbyte rabbit_model = 0;\r\nint Black_Line = 200;\r\nuint64_t delaytime;\r\nbyte IR_DATA = 0;\r\n\r\nAdafruit_NeoPixel strip(NUM_LEDS, LED_DT, NEO_GRB + NEO_KHZ800);\r\n\r\nenum em_dir\r\n{\r\n    stop = 0,\r\n    forward,\r\n    backward,\r\n    turnleft,\r\n    turnright,\r\n    l_up,\r\n    l_down,\r\n    r_up,\r\n    r_down,\r\n    Contrarotate, // 逆时针\r\n    Clockwise     // 顺时针\r\n};\r\n\r\nvoid setup()\r\n{\r\n    Serial1.begin(9600);\r\n    Serial1.setTimeout(60);\r\n\r\n    IrReceiver.begin(RECV, DISABLE_LED_FEEDBACK);\r\n\r\n    pinMode(LFA, OUTPUT);\r\n    pinMode(LFB, OUTPUT);\r\n    pinMode(LBA, OUTPUT);\r\n    pinMode(LBB, OUTPUT);\r\n    pinMode(RFA, OUTPUT);\r\n    pinMode(RFB, OUTPUT);\r\n    pinMode(RBA, OUTPUT);\r\n    pinMode(RBB, OUTPUT);\r\n\r\n    pinMode(BUZZER, OUTPUT);\r\n\r\n    pinMode(led, OUTPUT);\r\n\r\n    pinMode(TRIG, OUTPUT);\r\n    pinMode(ECHO, INPUT);\r\n\r\n    strip.begin();\r\n    strip.setBrightness(max_bright);\r\n    for (size_t i = 0; i < 15; i++)\r\n    {\r\n        strip.setPixelColor(i, 255, 0, 0);\r\n        strip.show();\r\n        delay(200);\r\n        strip.clear();\r\n        strip.show();\r\n    }\r\n\r\n    delaytime = millis();\r\n\r\n    Serial1.print(\"asdadad: \");\r\n}\r\n\r\nvoid loop()\r\n{\r\n    IR_DATA = 0;\r\n    if (IrReceiver.decode())\r\n    {                                                           //当接收到信号时\r\n//         Serial1.println(IrReceiver.decodedIRData.command, HEX); //打印遥控按键编码\r\n        IR_DATA = IrReceiver.decodedIRData.command;\r\n        IrReceiver.resume();\r\n        switch (IR_DATA)\r\n        {\r\n        case 0xC:\r\n            rabbit_model = 0;\r\n            break;\r\n        case 0x18:\r\n            rabbit_model = 1;\r\n            break;\r\n        case 0x5E:\r\n            rabbit_model = 2;\r\n            break;\r\n        case 0x8:\r\n            rabbit_model = 3;\r\n            break;\r\n        default:\r\n            break;\r\n        }\r\n        \r\n    }\r\n    switch (rabbit_model)\r\n    {\r\n    case 1:\r\n        obstacle_avoidance_model();\r\n        break;\r\n    case 2:\r\n        follow_model();\r\n        break;\r\n    case 3:\r\n        tracking_model();\r\n        break;\r\n    default:\r\n        free_model();\r\n        break;\r\n    }\r\n}\r\n\r\nvoid tracking_model() // 循迹模式\r\n{\r\n    while(3 == rabbit_model)\r\n    {\r\n        int T0 = analogRead(Track0);\r\n        int T1 = analogRead(Track1);\r\n        int T2 = analogRead(Track2);\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;  \r\n             }\r\n        }\r\n        Serial1.print(\"IR_DATA:  \");\r\n        Serial1.println(IR_DATA);\r\n        Serial1.print(\"rabbit_model:  \");\r\n        Serial1.println(rabbit_model);\r\n        Serial1.println();\r\n        Serial1.println();\r\n        strip.fill(0x00ffff, 0, 15);\r\n        strip.show();\r\n        if (T0 > Black_Line && T1 <= Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(forward);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 <= Black_Line && T1 > Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(Clockwise);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 <= Black_Line && T1 <= Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(Clockwise);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 > Black_Line && T1 > Black_Line && T2 <= Black_Line)\r\n        {\r\n            car_movement(Contrarotate);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break; \r\n                } \r\n            }\r\n        }\r\n        else if (T0 > Black_Line && T1 <= Black_Line && T2 <= Black_Line)\r\n        {\r\n            car_movement(Contrarotate);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 > Black_Line && T1 > Black_Line && T2 > Black_Line)\r\n        {\r\n            car_movement(forward);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break;  \r\n                }\r\n            }\r\n        }\r\n        else if (T0 <= Black_Line && T1 <= Black_Line && T2 <= Black_Line)\r\n        {\r\n            car_movement(stop);\r\n            if (IrReceiver.decode())\r\n            {                                                           //当接收到信号时\r\n                IR_DATA = IrReceiver.decodedIRData.command;\r\n                IrReceiver.resume();\r\n                switch (IR_DATA)\r\n                {\r\n                case 0xC:\r\n                    rabbit_model = 0;\r\n                    break;\r\n                case 0x18:\r\n                    rabbit_model = 1;\r\n                    break;\r\n                case 0x5E:\r\n                    rabbit_model = 2;\r\n                    break;\r\n                case 0x8:\r\n                    rabbit_model = 3;\r\n                    break; \r\n                } \r\n            }\r\n        }\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }\r\n            \r\n        }\r\n        Serial1.print(IR_DATA);\r\n    }\r\n}\r\n\r\nvoid follow_model() // 跟随模式\r\n{\r\n    int Avoidance_distance = SR04(TRIG, ECHO);\r\n    strip.fill(0x8B00FF, 0, 15);\r\n    strip.show();\r\n    if (IrReceiver.decode())\r\n    {                                                           //当接收到信号时\r\n        IR_DATA = IrReceiver.decodedIRData.command;\r\n        IrReceiver.resume();\r\n        switch (IR_DATA)\r\n        {\r\n        case 0xC:\r\n            rabbit_model = 0;\r\n            break;\r\n        case 0x18:\r\n            rabbit_model = 1;\r\n            break;\r\n        case 0x5E:\r\n            rabbit_model = 2;\r\n            break;\r\n        case 0x8:\r\n            rabbit_model = 3;\r\n            break;\r\n        }   \r\n    }\r\n    if (Avoidance_distance <= 15)\r\n    {\r\n        buzzer_sound(100);\r\n        car_movement(backward);\r\n    }\r\n    else if (15 <= Avoidance_distance && Avoidance_distance <= 20)\r\n    {\r\n        car_movement(stop); // 停止\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }   \r\n        }\r\n    }\r\n    else if (20 <= Avoidance_distance && Avoidance_distance <= 35)\r\n    {\r\n        car_movement(forward);\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }   \r\n        }\r\n    }\r\n    else\r\n    {\r\n        car_movement(stop); // 停止\r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                break;\r\n            }   \r\n        }\r\n    }\r\n    if (IrReceiver.decode())\r\n    {                                                           //当接收到信号时\r\n        IR_DATA = IrReceiver.decodedIRData.command;\r\n        IrReceiver.resume();\r\n        switch (IR_DATA)\r\n        {\r\n        case 0xC:\r\n            rabbit_model = 0;\r\n            break;\r\n        case 0x18:\r\n            rabbit_model = 1;\r\n            break;\r\n        case 0x5E:\r\n            rabbit_model = 2;\r\n            break;\r\n        case 0x8:\r\n            rabbit_model = 3;\r\n            break;\r\n        }   \r\n    }\r\n}\r\n\r\nvoid obstacle_avoidance_model() // 避障模式\r\n{\r\n    int Avoidance_distance = SR04(TRIG, ECHO);\r\n    strip.fill(0x0000ff, 0, 15);\r\n    strip.show();\r\n    if (Avoidance_distance <= 25)\r\n    {\r\n        buzzer_sound(100);\r\n        if (Avoidance_distance <= 15)\r\n        {\r\n            car_movement(stop); // 停止\r\n            if(false == delay50ms(5)) return;\r\n            car_movement(backward);\r\n            if(false == delay50ms(5)) return;\r\n            car_movement(Clockwise);\r\n            if(false == delay50ms(2)) return;\r\n        }\r\n        else\r\n        {\r\n            car_movement(stop); // 停止\r\n            if(false == delay50ms(5)) return;\r\n            car_movement(backward);\r\n            if(false == delay50ms(6)) return;\r\n            car_movement(Contrarotate);\r\n            if(false == delay50ms(5)) return;\r\n        }\r\n    }\r\n    else\r\n    {\r\n        car_movement(forward);\r\n    }\r\n}\r\n\r\nbool delay50ms(uint32_t ms)\r\n{\r\n    for(; ms>0; ms--)\r\n    {\r\n        delay(50);  \r\n        if (IrReceiver.decode())\r\n        {                                                           //当接收到信号时\r\n            IR_DATA = IrReceiver.decodedIRData.command;\r\n            IrReceiver.resume();\r\n            switch (IR_DATA)\r\n            {\r\n            case 0xC:\r\n                rabbit_model = 0;\r\n                return false;\r\n                break;\r\n            case 0x18:\r\n                rabbit_model = 1;\r\n                break;\r\n            case 0x5E:\r\n                rabbit_model = 2;\r\n                return false;\r\n                break;\r\n            case 0x8:\r\n                rabbit_model = 3;\r\n                return false;\r\n                break;\r\n            default:\r\n                break;\r\n            }\r\n            \r\n        }   \r\n    } \r\n    return true;\r\n}\r\n\r\nvoid free_model() // 遥控模式\r\n{\r\n    if (IR_DATA == 0x15) // 顺时针\r\n    {\r\n        car_movement(Clockwise);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x47) // 喇叭\r\n    {\r\n        buzzer_sound(100);\r\n    }\r\n    else if (IR_DATA == 0x40) // 前进\r\n    {\r\n        car_movement(forward);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x19) // 后退\r\n    {\r\n        car_movement(backward);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x7) // 左平移\r\n    {\r\n        car_movement(turnleft);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x9) // 右平移\r\n    {\r\n        car_movement(turnright);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x44) // 左上\r\n    {\r\n        car_movement(l_up);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x16) // 左下\r\n    {\r\n        car_movement(l_down);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0x43) // 右上\r\n    {\r\n        car_movement(r_up);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else if (IR_DATA == 0xD) // 右下\r\n    {\r\n        car_movement(r_down);\r\n        delay(100);\r\n        strip.fill(0x00ff00, 0, 15);\r\n        strip.show();\r\n    }\r\n    else\r\n    {\r\n        car_movement(stop); // 停止\r\n        if ((millis() - delaytime) > 1000)\r\n        {\r\n            delaytime = millis();\r\n            strip.fill(random(1, 16777215), 0, 15);\r\n            strip.show();\r\n        }\r\n    }\r\n    IR_DATA = 0;\r\n}\r\n\r\nvoid buzzer_sound(unsigned int time_ms)\r\n{\r\n    while (time_ms)\r\n    {\r\n        time_ms--;\r\n        digitalWrite(BUZZER, 1);\r\n        delayMicroseconds(600);\r\n        digitalWrite(BUZZER, 0);\r\n        delayMicroseconds(400);\r\n    }\r\n}\r\n\r\nfloat SR04(int Trig, int Echo)\r\n{\r\n    digitalWrite(Trig, LOW);\r\n    delayMicroseconds(2);\r\n    digitalWrite(Trig, HIGH);\r\n    delayMicroseconds(10);\r\n    digitalWrite(Trig, LOW);\r\n    float distance = pulseIn(Echo, HIGH) / 58.00;\r\n    delay(10);\r\n    return distance;\r\n}\r\n\r\nvoid car_movement(em_dir direction)\r\n{\r\n    switch (direction)\r\n    {\r\n    case forward:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    case backward:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case turnleft:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case turnright:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    case l_up:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case l_down:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case r_up:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    case r_down:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case Clockwise:\r\n        digitalWrite(LFA, 1);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 1);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 1);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 1);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    case Contrarotate:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 1);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 1);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 1);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 1);\r\n        break;\r\n    default:\r\n        digitalWrite(LFA, 0);\r\n        digitalWrite(LFB, 0);\r\n        digitalWrite(LBA, 0);\r\n        digitalWrite(LBB, 0);\r\n        digitalWrite(RFA, 0);\r\n        digitalWrite(RFB, 0);\r\n        digitalWrite(RBA, 0);\r\n        digitalWrite(RBB, 0);\r\n        break;\r\n    }\r\n}\r\n"}}}Content-Length: 386

{"jsonrpc":"2.0","id":1,"method":"textDocument/codeAction","params":{"textDocument":{"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/4_Arduino_Code/rabbit_car_infrared/rabbit_car_infrared.ino"},"range":{"start":{"line":663,"character":1},"end":{"line":663,"character":1}},"context":{"diagnostics":[]}}}Content-Length: 283

{"jsonrpc":"2.0","id":2,"method":"textDocument/documentSymbol","params":{"textDocument":{"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/4_Arduino_Code/rabbit_car_infrared/rabbit_car_infrared.ino"}}}
>>>
Content-Length: 113

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

{"jsonrpc":"2.0","id":1,"result":[]}Content-Length: 9448

{"jsonrpc":"2.0","id":2,"result":[{"name":"LFA","detail":"const uint8_t","kind":13,"range":{"start":{"line":3,"character":0},"end":{"line":3,"character":28}},"selectionRange":{"start":{"line":3,"character":21},"end":{"line":3,"character":24}}},{"name":"LFB","detail":"const uint8_t","kind":13,"range":{"start":{"line":4,"character":0},"end":{"line":4,"character":28}},"selectionRange":{"start":{"line":4,"character":21},"end":{"line":4,"character":24}}},{"name":"LBA","detail":"const uint8_t","kind":13,"range":{"start":{"line":5,"character":0},"end":{"line":5,"character":29}},"selectionRange":{"start":{"line":5,"character":21},"end":{"line":5,"character":24}}},{"name":"LBB","detail":"const uint8_t","kind":13,"range":{"start":{"line":6,"character":0},"end":{"line":6,"character":29}},"selectionRange":{"start":{"line":6,"character":21},"end":{"line":6,"character":24}}},{"name":"RFA","detail":"const uint8_t","kind":13,"range":{"start":{"line":7,"character":0},"end":{"line":7,"character":29}},"selectionRange":{"start":{"line":7,"character":21},"end":{"line":7,"character":24}}},{"name":"RFB","detail":"const uint8_t","kind":13,"range":{"start":{"line":8,"character":0},"end":{"line":8,"character":29}},"selectionRange":{"start":{"line":8,"character":21},"end":{"line":8,"character":24}}},{"name":"RBA","detail":"const uint8_t","kind":13,"range":{"start":{"line":9,"character":0},"end":{"line":9,"character":29}},"selectionRange":{"start":{"line":9,"character":21},"end":{"line":9,"character":24}}},{"name":"RBB","detail":"const uint8_t","kind":13,"range":{"start":{"line":10,"character":0},"end":{"line":10,"character":29}},"selectionRange":{"start":{"line":10,"character":21},"end":{"line":10,"character":24}}},{"name":"BUZZER","detail":"const uint8_t","kind":13,"range":{"start":{"line":12,"character":0},"end":{"line":12,"character":32}},"selectionRange":{"start":{"line":12,"character":21},"end":{"line":12,"character":27}}},{"name":"led","detail":"const uint8_t","kind":13,"range":{"start":{"line":14,"character":0},"end":{"line":14,"character":29}},"selectionRange":{"start":{"line":14,"character":21},"end":{"line":14,"character":24}}},{"name":"Track0","detail":"const uint8_t","kind":13,"range":{"start":{"line":16,"character":0},"end":{"line":16,"character":32}},"selectionRange":{"start":{"line":16,"character":21},"end":{"line":16,"character":27}}},{"name":"Track1","detail":"const uint8_t","kind":13,"range":{"start":{"line":17,"character":0},"end":{"line":17,"character":32}},"selectionRange":{"start":{"line":17,"character":21},"end":{"line":17,"character":27}}},{"name":"Track2","detail":"const uint8_t","kind":13,"range":{"start":{"line":18,"character":0},"end":{"line":18,"character":32}},"selectionRange":{"start":{"line":18,"character":21},"end":{"line":18,"character":27}}},{"name":"TRIG","detail":"const uint8_t","kind":13,"range":{"start":{"line":20,"character":0},"end":{"line":20,"character":29}},"selectionRange":{"start":{"line":20,"character":21},"end":{"line":20,"character":25}}},{"name":"ECHO","detail":"const uint8_t","kind":13,"range":{"start":{"line":21,"character":0},"end":{"line":21,"character":29}},"selectionRange":{"start":{"line":21,"character":21},"end":{"line":21,"character":25}}},{"name":"RECV","detail":"const int","kind":13,"range":{"start":{"line":23,"character":0},"end":{"line":23,"character":26}},"selectionRange":{"start":{"line":23,"character":17},"end":{"line":23,"character":21}}},{"name":"max_bright","detail":"uint8_t","kind":13,"range":{"start":{"line":29,"character":0},"end":{"line":29,"character":24}},"selectionRange":{"start":{"line":29,"character":8},"end":{"line":29,"character":18}}},{"name":"rabbit_model","detail":"byte","kind":13,"range":{"start":{"line":31,"character":0},"end":{"line":31,"character":21}},"selectionRange":{"start":{"line":31,"character":5},"end":{"line":31,"character":17}}},{"name":"Black_Line","detail":"int","kind":13,"range":{"start":{"line":32,"character":0},"end":{"line":32,"character":20}},"selectionRange":{"start":{"line":32,"character":4},"end":{"line":32,"character":14}}},{"name":"delaytime","detail":"uint64_t","kind":13,"range":{"start":{"line":33,"character":0},"end":{"line":33,"character":18}},"selectionRange":{"start":{"line":33,"character":9},"end":{"line":33,"character":18}}},{"name":"IR_DATA","detail":"byte","kind":13,"range":{"start":{"line":34,"character":0},"end":{"line":34,"character":16}},"selectionRange":{"start":{"line":34,"character":5},"end":{"line":34,"character":12}}},{"name":"strip","detail":"Adafruit_NeoPixel","kind":13,"range":{"start":{"line":36,"character":0},"end":{"line":36,"character":63}},"selectionRange":{"start":{"line":36,"character":18},"end":{"line":36,"character":23}}},{"name":"em_dir","detail":"enum","kind":10,"range":{"start":{"line":38,"character":0},"end":{"line":51,"character":1}},"selectionRange":{"start":{"line":38,"character":5},"end":{"line":38,"character":11}},"children":[{"name":"stop","detail":"em_dir","kind":22,"range":{"start":{"line":40,"character":4},"end":{"line":40,"character":12}},"selectionRange":{"start":{"line":40,"character":4},"end":{"line":40,"character":8}}},{"name":"forward","detail":"em_dir","kind":22,"range":{"start":{"line":41,"character":4},"end":{"line":41,"character":11}},"selectionRange":{"start":{"line":41,"character":4},"end":{"line":41,"character":11}}},{"name":"backward","detail":"em_dir","kind":22,"range":{"start":{"line":42,"character":4},"end":{"line":42,"character":12}},"selectionRange":{"start":{"line":42,"character":4},"end":{"line":42,"character":12}}},{"name":"turnleft","detail":"em_dir","kind":22,"range":{"start":{"line":43,"character":4},"end":{"line":43,"character":12}},"selectionRange":{"start":{"line":43,"character":4},"end":{"line":43,"character":12}}},{"name":"turnright","detail":"em_dir","kind":22,"range":{"start":{"line":44,"character":4},"end":{"line":44,"character":13}},"selectionRange":{"start":{"line":44,"character":4},"end":{"line":44,"character":13}}},{"name":"l_up","detail":"em_dir","kind":22,"range":{"start":{"line":45,"character":4},"end":{"line":45,"character":8}},"selectionRange":{"start":{"line":45,"character":4},"end":{"line":45,"character":8}}},{"name":"l_down","detail":"em_dir","kind":22,"range":{"start":{"line":46,"character":4},"end":{"line":46,"character":10}},"selectionRange":{"start":{"line":46,"character":4},"end":{"line":46,"character":10}}},{"name":"r_up","detail":"em_dir","kind":22,"range":{"start":{"line":47,"character":4},"end":{"line":47,"character":8}},"selectionRange":{"start":{"line":47,"character":4},"end":{"line":47,"character":8}}},{"name":"r_down","detail":"em_dir","kind":22,"range":{"start":{"line":48,"character":4},"end":{"line":48,"character":10}},"selectionRange":{"start":{"line":48,"character":4},"end":{"line":48,"character":10}}},{"name":"Contrarotate","detail":"em_dir","kind":22,"range":{"start":{"line":49,"character":4},"end":{"line":49,"character":16}},"selectionRange":{"start":{"line":49,"character":4},"end":{"line":49,"character":16}}},{"name":"Clockwise","detail":"em_dir","kind":22,"range":{"start":{"line":50,"character":4},"end":{"line":50,"character":13}},"selectionRange":{"start":{"line":50,"character":4},"end":{"line":50,"character":13}}}]},{"name":"setup","detail":"void ()","kind":12,"range":{"start":{"line":53,"character":0},"end":{"line":90,"character":1}},"selectionRange":{"start":{"line":53,"character":5},"end":{"line":53,"character":10}}},{"name":"loop","detail":"void ()","kind":12,"range":{"start":{"line":92,"character":0},"end":{"line":134,"character":1}},"selectionRange":{"start":{"line":92,"character":5},"end":{"line":92,"character":9}}},{"name":"tracking_model","detail":"void ()","kind":12,"range":{"start":{"line":136,"character":0},"end":{"line":362,"character":1}},"selectionRange":{"start":{"line":136,"character":5},"end":{"line":136,"character":19}}},{"name":"follow_model","detail":"void ()","kind":12,"range":{"start":{"line":364,"character":0},"end":{"line":486,"character":1}},"selectionRange":{"start":{"line":364,"character":5},"end":{"line":364,"character":17}}},{"name":"obstacle_avoidance_model","detail":"void ()","kind":12,"range":{"start":{"line":488,"character":0},"end":{"line":519,"character":1}},"selectionRange":{"start":{"line":488,"character":5},"end":{"line":488,"character":29}}},{"name":"delay50ms","detail":"bool (uint32_t)","kind":12,"range":{"start":{"line":521,"character":0},"end":{"line":554,"character":1}},"selectionRange":{"start":{"line":521,"character":5},"end":{"line":521,"character":14}}},{"name":"free_model","detail":"void ()","kind":12,"range":{"start":{"line":556,"character":0},"end":{"line":636,"character":1}},"selectionRange":{"start":{"line":556,"character":5},"end":{"line":556,"character":15}}},{"name":"buzzer_sound","detail":"void (unsigned int)","kind":12,"range":{"start":{"line":638,"character":0},"end":{"line":648,"character":1}},"selectionRange":{"start":{"line":638,"character":5},"end":{"line":638,"character":17}}},{"name":"SR04","detail":"float (int, int)","kind":12,"range":{"start":{"line":650,"character":0},"end":{"line":660,"character":1}},"selectionRange":{"start":{"line":650,"character":6},"end":{"line":650,"character":10}}},{"name":"car_movement","detail":"void (em_dir)","kind":12,"range":{"start":{"line":662,"character":0},"end":{"line":777,"character":1}},"selectionRange":{"start":{"line":662,"character":5},"end":{"line":662,"character":17}}}]}
<<<
Content-Length: 40

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

{"jsonrpc":"2.0","id":3,"method":"textDocument/hover","params":{"textDocument":{"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/4_Arduino_Code/rabbit_car_infrared/rabbit_car_infrared.ino"},"position":{"line":16,"character":29}}}
>>>
Content-Length: 295

{"jsonrpc":"2.0","id":3,"result":{"contents":{"kind":"markdown","value":"### variable `Track0`  \n\n---\nType: `const uint8_t`  \nValue = `26 (0x1a)`  \nADC0  \n\n---\n```cpp\nstatic const uint8_t Track0 = 26\n```"},"range":{"start":{"line":16,"character":28},"end":{"line":16,"character":29}}}}
<<<
Content-Length: 58

{"jsonrpc":"2.0","id":4,"method":"shutdown","params":null}
>>>
Content-Length: 38

{"jsonrpc":"2.0","id":4,"result":null}
<<<
Content-Length: 47

{"jsonrpc":"2.0","method":"exit","params":null}