Fixed status reporting

This commit is contained in:
Hakan Bastedt
2025-02-17 09:22:07 +01:00
parent 8e127929c4
commit 7e0225711b
3 changed files with 107 additions and 100 deletions

View File

@@ -8,99 +8,97 @@
{ {
"name": "PlatformIO", "name": "PlatformIO",
"includePath": [ "includePath": [
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/include", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/include",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/src", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/src",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/MyMCP3221", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes-esi",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes-esi", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/MyMCP3221",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/MCP3X21", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/MCP3X21",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/ADS1X15", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/ADS1X15",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Wire/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Wire/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SPI/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SPI/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/avr", "/home/debian/.platformio/packages/framework-arduinoststm32/cores/arduino/avr",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32", "/home/debian/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc/LL", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc/LL",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/inc", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/inc", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Inc", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Src", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/STM32F4xx", "/home/debian/.platformio/packages/framework-arduinoststm32/system/STM32F4xx",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver",
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/Core/Include", "/home/debian/.platformio/packages/framework-cmsis/CMSIS/Core/Include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc",
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/Include", "/home/debian/.platformio/packages/framework-cmsis/CMSIS/DSP/Include",
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude", "/home/debian/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino", "/home/debian/.platformio/packages/framework-arduinoststm32/cores/arduino",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T", "/home/debian/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T",
"C:/Users/Hakan/.platformio/lib/RunningAverage", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/CMSIS_DSP/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/CMSIS_DSP/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/EEPROM/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/EEPROM/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/IWatchdog/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/IWatchdog/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Keyboard/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Keyboard/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Mouse/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Mouse/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/RGB_LED_TLC59731/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/RGB_LED_TLC59731/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Servo/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Servo/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SoftwareSerial/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SoftwareSerial/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SubGhz/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SubGhz/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/src",
"" ""
], ],
"browse": { "browse": {
"limitSymbolsToIncludedHeaders": true, "limitSymbolsToIncludedHeaders": true,
"path": [ "path": [
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/include", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/include",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/src", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/src",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/MyMCP3221", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes-esi",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes-esi", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/soes", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/lib/MyMCP3221",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/MCP3X21", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/MCP3X21",
"Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/ADS1X15", "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/libdeps/genericSTM32F407VGT6/ADS1X15",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Wire/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Wire/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SPI/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SPI/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/avr", "/home/debian/.platformio/packages/framework-arduinoststm32/cores/arduino/avr",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32", "/home/debian/.platformio/packages/framework-arduinoststm32/cores/arduino/stm32",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc/LL", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/inc/LL",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/inc", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/inc", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Inc", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Src", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/STM32F4xx_HAL_Driver/Src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/STM32F4xx", "/home/debian/.platformio/packages/framework-arduinoststm32/system/STM32F4xx",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/ST/STM32_USB_Device_Library/Core/Src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/open-amp/lib/include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/libmetal/lib/include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Middlewares/OpenAMP/virtual_driver",
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/Core/Include", "/home/debian/.platformio/packages/framework-cmsis/CMSIS/Core/Include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Include",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc", "/home/debian/.platformio/packages/framework-arduinoststm32/system/Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc",
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/Include", "/home/debian/.platformio/packages/framework-cmsis/CMSIS/DSP/Include",
"C:/Users/Hakan/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude", "/home/debian/.platformio/packages/framework-cmsis/CMSIS/DSP/PrivateInclude",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/cores/arduino", "/home/debian/.platformio/packages/framework-arduinoststm32/cores/arduino",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T", "/home/debian/.platformio/packages/framework-arduinoststm32/variants/STM32F4xx/F407V(E-G)T_F417V(E-G)T",
"C:/Users/Hakan/.platformio/lib/RunningAverage", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/CMSIS_DSP/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/CMSIS_DSP/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/EEPROM/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/EEPROM/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/IWatchdog/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/IWatchdog/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Keyboard/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Keyboard/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Mouse/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Mouse/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/RGB_LED_TLC59731/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/RGB_LED_TLC59731/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/Servo/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/Servo/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SoftwareSerial/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SoftwareSerial/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/SubGhz/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/SubGhz/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/USBDevice/src", "/home/debian/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/src",
"C:/Users/Hakan/.platformio/packages/framework-arduinoststm32/libraries/VirtIO/src",
"" ""
] ]
}, },
@@ -124,7 +122,7 @@
], ],
"cStandard": "gnu17", "cStandard": "gnu17",
"cppStandard": "gnu++17", "cppStandard": "gnu++17",
"compilerPath": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc.exe", "compilerPath": "/home/debian/.platformio/packages/toolchain-gccarmnoneeabi/bin/arm-none-eabi-gcc",
"compilerArgs": [ "compilerArgs": [
"-mcpu=cortex-m4", "-mcpu=cortex-m4",
"-mthumb", "-mthumb",

View File

@@ -12,11 +12,11 @@
"type": "platformio-debug", "type": "platformio-debug",
"request": "launch", "request": "launch",
"name": "PIO Debug", "name": "PIO Debug",
"executable": "Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/build/genericSTM32F407VGT6/firmware.elf", "executable": "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/build/genericSTM32F407VGT6/firmware.elf",
"projectEnvName": "genericSTM32F407VGT6", "projectEnvName": "genericSTM32F407VGT6",
"toolchainBinDir": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin", "toolchainBinDir": "/home/debian/.platformio/packages/toolchain-gccarmnoneeabi/bin",
"internalConsoleOptions": "openOnSessionStart", "internalConsoleOptions": "openOnSessionStart",
"svdPath": "C:/Users/Hakan/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd", "svdPath": "/home/debian/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd",
"preLaunchTask": { "preLaunchTask": {
"type": "PlatformIO", "type": "PlatformIO",
"task": "Pre-Debug" "task": "Pre-Debug"
@@ -26,21 +26,21 @@
"type": "platformio-debug", "type": "platformio-debug",
"request": "launch", "request": "launch",
"name": "PIO Debug (skip Pre-Debug)", "name": "PIO Debug (skip Pre-Debug)",
"executable": "Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/build/genericSTM32F407VGT6/firmware.elf", "executable": "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/build/genericSTM32F407VGT6/firmware.elf",
"projectEnvName": "genericSTM32F407VGT6", "projectEnvName": "genericSTM32F407VGT6",
"toolchainBinDir": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin", "toolchainBinDir": "/home/debian/.platformio/packages/toolchain-gccarmnoneeabi/bin",
"internalConsoleOptions": "openOnSessionStart", "internalConsoleOptions": "openOnSessionStart",
"svdPath": "C:/Users/Hakan/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd" "svdPath": "/home/debian/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd"
}, },
{ {
"type": "platformio-debug", "type": "platformio-debug",
"request": "launch", "request": "launch",
"name": "PIO Debug (without uploading)", "name": "PIO Debug (without uploading)",
"executable": "Z:/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/build/genericSTM32F407VGT6/firmware.elf", "executable": "/mnt/server/src/MyOwnEtherCATDevice/Cards/EaserCAT-7000-DIO+THCAD+I2C/Firmware/.pio/build/genericSTM32F407VGT6/firmware.elf",
"projectEnvName": "genericSTM32F407VGT6", "projectEnvName": "genericSTM32F407VGT6",
"toolchainBinDir": "C:/Users/Hakan/.platformio/packages/toolchain-gccarmnoneeabi/bin", "toolchainBinDir": "/home/debian/.platformio/packages/toolchain-gccarmnoneeabi/bin",
"internalConsoleOptions": "openOnSessionStart", "internalConsoleOptions": "openOnSessionStart",
"svdPath": "C:/Users/Hakan/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd", "svdPath": "/home/debian/.platformio/platforms/ststm32/misc/svd/STM32F40x.svd",
"loadMode": "manual" "loadMode": "manual"
} }
] ]

View File

@@ -16,6 +16,9 @@ HardwareSerial Serial1(PA10, PA9);
uint8_t inputPin[] = {PD15, PD14, PD13, PD12, PD11, PD10, PD9, PD8, PB15, PB14, PB13, PB12}; uint8_t inputPin[] = {PD15, PD14, PD13, PD12, PD11, PD10, PD9, PD8, PB15, PB14, PB13, PB12};
uint8_t outputPin[] = {PE10, PE9, PE8, PE7}; uint8_t outputPin[] = {PE10, PE9, PE8, PE7};
const uint32_t I2C_BUS_SPEED = 100000;
uint32_t I2C_restarts = 0;
#include "Wire.h" #include "Wire.h"
TwoWire Wire2(PB11, PB10); TwoWire Wire2(PB11, PB10);
@@ -47,7 +50,8 @@ void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
if (scale == 0.0) if (scale == 0.0)
scale = 1.0; scale = 1.0;
int data0 = mcp3221_0.getData(); int data0 = mcp3221_0.getData();
if ((Obj.Status = mcp3221_0.ping()) == 0) int stat;
if ((stat = mcp3221_0.ping()) == 0)
{ // Read good value { // Read good value
Obj.CalculatedVoltage = scale * data0 + Obj.VoltageOffset; // Obj.CalculatedVoltage = scale * data0 + Obj.VoltageOffset; //
Obj.RawData = data0; // Raw voltage, read by ADC Obj.RawData = data0; // Raw voltage, read by ADC
@@ -59,7 +63,12 @@ void cb_get_inputs(void) // Set Master inputs, slave outputs, last operation
Obj.CalculatedVoltage = validVoltage0; // Use value from previous call Obj.CalculatedVoltage = validVoltage0; // Use value from previous call
Obj.RawData = validData0; Obj.RawData = validData0;
// Reset wire here // Reset wire here
Wire2.end();
Wire2.begin();
Wire2.setClock(I2C_BUS_SPEED);
I2C_restarts++;
} }
Obj.Status = I2C_restarts + (stat << 28); // Put status as bits 28-31, the lower are number of restarts (restart attempts)
} }
void ESC_interrupt_enable(uint32_t mask); void ESC_interrupt_enable(uint32_t mask);
@@ -111,7 +120,7 @@ void setup(void)
digitalWrite(PB7, LOW); digitalWrite(PB7, LOW);
Wire2.begin(); Wire2.begin();
Wire2.setClock(400000); Wire2.setClock(I2C_BUS_SPEED);
#ifdef ECAT #ifdef ECAT
ecat_slv_init(&config); ecat_slv_init(&config);