From 39918e34b0161431c5adcad9e3fb48cd9e5893a0 Mon Sep 17 00:00:00 2001 From: Lim Chae Won Date: Mon, 12 Feb 2024 17:02:19 +0900 Subject: [PATCH] . --- .vscode/arduino.json | 6 +++--- code/SKIDAQ_DashBoard/SKIDAQ_DashBoard.ino | 24 ++-------------------- code/SKIDAQ_Main/SKIDAQ_Main.ino | 1 - 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/.vscode/arduino.json b/.vscode/arduino.json index 91e579b..395d9fd 100644 --- a/.vscode/arduino.json +++ b/.vscode/arduino.json @@ -1,9 +1,9 @@ { - "sketch": "code\\Display\\Display.ino", + "sketch": "code\\SKIDAQ_OBD2\\SKIDAQ_OBD2.ino", "board": "esp32:esp32:esp32s3", - "port": "COM5", + "port": "COM18", "output": "../build", "intelliSenseGen": "global", "programmer": "esptool", - "configuration": "JTAGAdapter=default,PSRAM=enabled,FlashMode=qio,FlashSize=4M,LoopCore=1,EventsCore=1,USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PartitionScheme=huge_app,CPUFreq=240,UploadSpeed=921600,DebugLevel=none,EraseFlash=none" + "configuration": "JTAGAdapter=builtin,PSRAM=enabled,FlashMode=qio,FlashSize=4M,LoopCore=1,EventsCore=1,USBMode=hwcdc,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PartitionScheme=huge_app,CPUFreq=240,UploadSpeed=921600,DebugLevel=none,EraseFlash=none" } \ No newline at end of file diff --git a/code/SKIDAQ_DashBoard/SKIDAQ_DashBoard.ino b/code/SKIDAQ_DashBoard/SKIDAQ_DashBoard.ino index 8a26ece..184b06b 100644 --- a/code/SKIDAQ_DashBoard/SKIDAQ_DashBoard.ino +++ b/code/SKIDAQ_DashBoard/SKIDAQ_DashBoard.ino @@ -212,30 +212,10 @@ void loop() { drsVal = digitalRead(drs); CANMessage frame; - if (gBlinkLedDate < millis()) + while (ACAN_ESP32::can.receive(frame)) { - gBlinkLedDate += 500; - digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); - Serial.print("Sent: "); - Serial.print(gSentFrameCount); - Serial.print(" "); - Serial.print("Receive: "); + Serial.print("Receive: "); Serial.print(gReceivedFrameCount); - Serial.print(" "); - Serial.print(" STATUS 0x"); - Serial.print(TWAI_STATUS_REG, HEX); - Serial.print(" RXERR "); - Serial.print(TWAI_RX_ERR_CNT_REG); - Serial.print(" TXERR "); - Serial.println(TWAI_TX_ERR_CNT_REG); - const bool ok = ACAN_ESP32::can.tryToSend(frame); - if (ok) - { - gSentFrameCount += 1; - } - } - while (ACAN_ESP32::can.receive(frame)) - { gReceivedFrameCount += 1; } diff --git a/code/SKIDAQ_Main/SKIDAQ_Main.ino b/code/SKIDAQ_Main/SKIDAQ_Main.ino index 9fbabf5..56645f7 100644 --- a/code/SKIDAQ_Main/SKIDAQ_Main.ino +++ b/code/SKIDAQ_Main/SKIDAQ_Main.ino @@ -21,7 +21,6 @@ Pin Summary GP4 - ADXL345 SDA Pin GP5 - ADXL345 SCL Pin - GP7 - DIAG Mode Interrupt GP9 - DynoJet Interrupt Output GP10 - DHT Temp/Humid Sensor GP12 - MOSFET Upshift