From 6d4137c20bc7121d7ec605da945e78ff78342ab8 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 13:56:26 +0200 Subject: [PATCH 01/12] renamed Firmware dir to firmware --- Utils/Backtrace/backtrace.sh | 4 ++-- Utils/Scripts/generateHardwareConfig.js | 4 ++-- Utils/Scripts/run.js | 6 +++--- Utils/Serial/src/crashAnalyzer/analyze.cpp | 2 +- {Firmware => firmware}/.gitignore | 0 {Firmware => firmware}/include/hardware/angleAccessor.hpp | 0 {Firmware => firmware}/include/hardware/panto.hpp | 0 {Firmware => firmware}/include/hardware/spiCommands.hpp | 0 {Firmware => firmware}/include/hardware/spiEncoder.hpp | 0 {Firmware => firmware}/include/hardware/spiEncoderChain.hpp | 0 {Firmware => firmware}/include/hardware/spiPacket.hpp | 0 {Firmware => firmware}/include/ioMain.hpp | 0 {Firmware => firmware}/include/physics/annotatedEdge.hpp | 0 {Firmware => firmware}/include/physics/collider.hpp | 0 {Firmware => firmware}/include/physics/edge.hpp | 0 {Firmware => firmware}/include/physics/godObject.hpp | 0 {Firmware => firmware}/include/physics/godObjectAction.hpp | 0 .../include/physics/godObjectActionData.hpp | 0 .../include/physics/godObjectActionType.hpp | 0 {Firmware => firmware}/include/physics/hashtable.hpp | 0 {Firmware => firmware}/include/physics/indexedEdge.hpp | 0 {Firmware => firmware}/include/physics/obstacle.hpp | 0 {Firmware => firmware}/include/physics/pantoPhysics.hpp | 0 {Firmware => firmware}/include/physicsMain.hpp | 0 {Firmware => firmware}/include/tasks/task.hpp | 0 {Firmware => firmware}/include/tasks/taskFunction.hpp | 0 {Firmware => firmware}/include/tasks/taskRegistry.hpp | 0 {Firmware => firmware}/include/utils/assert.hpp | 0 {Firmware => firmware}/include/utils/crashDump.hpp | 0 {Firmware => firmware}/include/utils/framerateLimiter.hpp | 0 {Firmware => firmware}/include/utils/performanceMonitor.hpp | 0 {Firmware => firmware}/include/utils/receiveHandler.hpp | 0 {Firmware => firmware}/include/utils/receiveState.hpp | 0 {Firmware => firmware}/include/utils/serial.hpp | 0 {Firmware => firmware}/include/utils/utils.hpp | 0 {Firmware => firmware}/include/utils/vector.hpp | 0 {Firmware => firmware}/platformio.ini | 0 {Firmware => firmware}/src/hardware/panto.cpp | 0 {Firmware => firmware}/src/hardware/spiCommands.cpp | 0 {Firmware => firmware}/src/hardware/spiEncoder.cpp | 0 {Firmware => firmware}/src/hardware/spiEncoderChain.cpp | 0 {Firmware => firmware}/src/hardware/spiPacket.cpp | 0 {Firmware => firmware}/src/ioMain.cpp | 0 {Firmware => firmware}/src/main.cpp | 0 {Firmware => firmware}/src/physics/annotatedEdge.cpp | 0 {Firmware => firmware}/src/physics/collider.cpp | 0 {Firmware => firmware}/src/physics/godObject.cpp | 0 {Firmware => firmware}/src/physics/hashtable.cpp | 0 {Firmware => firmware}/src/physics/indexedEdge.cpp | 0 {Firmware => firmware}/src/physics/obstacle.cpp | 0 {Firmware => firmware}/src/physics/pantoPhysics.cpp | 0 {Firmware => firmware}/src/physicsMain.cpp | 0 {Firmware => firmware}/src/tasks/task.cpp | 0 {Firmware => firmware}/src/tasks/taskRegistry.cpp | 0 {Firmware => firmware}/src/utils/crashDump.cpp | 0 {Firmware => firmware}/src/utils/framerateLimiter.cpp | 0 {Firmware => firmware}/src/utils/performanceMonitor.cpp | 0 {Firmware => firmware}/src/utils/serial.cpp | 0 {Firmware => firmware}/src/utils/vector.cpp | 0 59 files changed, 8 insertions(+), 8 deletions(-) rename {Firmware => firmware}/.gitignore (100%) rename {Firmware => firmware}/include/hardware/angleAccessor.hpp (100%) rename {Firmware => firmware}/include/hardware/panto.hpp (100%) rename {Firmware => firmware}/include/hardware/spiCommands.hpp (100%) rename {Firmware => firmware}/include/hardware/spiEncoder.hpp (100%) rename {Firmware => firmware}/include/hardware/spiEncoderChain.hpp (100%) rename {Firmware => firmware}/include/hardware/spiPacket.hpp (100%) rename {Firmware => firmware}/include/ioMain.hpp (100%) rename {Firmware => firmware}/include/physics/annotatedEdge.hpp (100%) rename {Firmware => firmware}/include/physics/collider.hpp (100%) rename {Firmware => firmware}/include/physics/edge.hpp (100%) rename {Firmware => firmware}/include/physics/godObject.hpp (100%) rename {Firmware => firmware}/include/physics/godObjectAction.hpp (100%) rename {Firmware => firmware}/include/physics/godObjectActionData.hpp (100%) rename {Firmware => firmware}/include/physics/godObjectActionType.hpp (100%) rename {Firmware => firmware}/include/physics/hashtable.hpp (100%) rename {Firmware => firmware}/include/physics/indexedEdge.hpp (100%) rename {Firmware => firmware}/include/physics/obstacle.hpp (100%) rename {Firmware => firmware}/include/physics/pantoPhysics.hpp (100%) rename {Firmware => firmware}/include/physicsMain.hpp (100%) rename {Firmware => firmware}/include/tasks/task.hpp (100%) rename {Firmware => firmware}/include/tasks/taskFunction.hpp (100%) rename {Firmware => firmware}/include/tasks/taskRegistry.hpp (100%) rename {Firmware => firmware}/include/utils/assert.hpp (100%) rename {Firmware => firmware}/include/utils/crashDump.hpp (100%) rename {Firmware => firmware}/include/utils/framerateLimiter.hpp (100%) rename {Firmware => firmware}/include/utils/performanceMonitor.hpp (100%) rename {Firmware => firmware}/include/utils/receiveHandler.hpp (100%) rename {Firmware => firmware}/include/utils/receiveState.hpp (100%) rename {Firmware => firmware}/include/utils/serial.hpp (100%) rename {Firmware => firmware}/include/utils/utils.hpp (100%) rename {Firmware => firmware}/include/utils/vector.hpp (100%) rename {Firmware => firmware}/platformio.ini (100%) rename {Firmware => firmware}/src/hardware/panto.cpp (100%) rename {Firmware => firmware}/src/hardware/spiCommands.cpp (100%) rename {Firmware => firmware}/src/hardware/spiEncoder.cpp (100%) rename {Firmware => firmware}/src/hardware/spiEncoderChain.cpp (100%) rename {Firmware => firmware}/src/hardware/spiPacket.cpp (100%) rename {Firmware => firmware}/src/ioMain.cpp (100%) rename {Firmware => firmware}/src/main.cpp (100%) rename {Firmware => firmware}/src/physics/annotatedEdge.cpp (100%) rename {Firmware => firmware}/src/physics/collider.cpp (100%) rename {Firmware => firmware}/src/physics/godObject.cpp (100%) rename {Firmware => firmware}/src/physics/hashtable.cpp (100%) rename {Firmware => firmware}/src/physics/indexedEdge.cpp (100%) rename {Firmware => firmware}/src/physics/obstacle.cpp (100%) rename {Firmware => firmware}/src/physics/pantoPhysics.cpp (100%) rename {Firmware => firmware}/src/physicsMain.cpp (100%) rename {Firmware => firmware}/src/tasks/task.cpp (100%) rename {Firmware => firmware}/src/tasks/taskRegistry.cpp (100%) rename {Firmware => firmware}/src/utils/crashDump.cpp (100%) rename {Firmware => firmware}/src/utils/framerateLimiter.cpp (100%) rename {Firmware => firmware}/src/utils/performanceMonitor.cpp (100%) rename {Firmware => firmware}/src/utils/serial.cpp (100%) rename {Firmware => firmware}/src/utils/vector.cpp (100%) diff --git a/Utils/Backtrace/backtrace.sh b/Utils/Backtrace/backtrace.sh index e7e4475f..d2a8fc33 100644 --- a/Utils/Backtrace/backtrace.sh +++ b/Utils/Backtrace/backtrace.sh @@ -5,10 +5,10 @@ # The default target is set for running this script from the base framework dir. # Alternatively, you may pass an path to the elf as the first argument. # Default usage: ./Utils/Backtrace/backtrace.sh "0x40085698:0x3ffb5e80 [...]" -# Alternative usage example for running from this dir: ./backtrace.sh ./../../Firmware/.pioenvs/esp32dev/firmware.elf "0x40085698:0x3ffb5e80 [...]" +# Alternative usage example for running from this dir: ./backtrace.sh ./../../firmware/.pioenvs/esp32dev/firmware.elf "0x40085698:0x3ffb5e80 [...]" if [ "$#" -eq 1 ]; then - target=./Firmware/.pioenvs/esp32dev/firmware.elf + target=./firmware/.pioenvs/esp32dev/firmware.elf backtrace=$1 echo "Using default target $target" else diff --git a/Utils/Scripts/generateHardwareConfig.js b/Utils/Scripts/generateHardwareConfig.js index ed3469e8..fca699ae 100644 --- a/Utils/Scripts/generateHardwareConfig.js +++ b/Utils/Scripts/generateHardwareConfig.js @@ -232,7 +232,7 @@ constexpr double hashtableStepSizeY = ${hashtable.stepSizeY}; const uint32_t obstacleChangesPerFrame = ${input.obstacleChangesPerFrame};`; console.log(headerOutput); -const headerDir = 'Firmware/include/config/'; +const headerDir = 'firmware/include/config/'; if (!fs.existsSync(headerDir)) { fs.mkdirSync(headerDir, {recursive: true}); } @@ -253,7 +253,7 @@ float pidFactor[${pantoCount*3}][3] = { };`; console.log(sourceOutput); -const sourceDir = 'Firmware/src/config/'; +const sourceDir = 'firmware/src/config/'; if (!fs.existsSync(sourceDir)) { fs.mkdirSync(sourceDir, {recursive: true}); } diff --git a/Utils/Scripts/run.js b/Utils/Scripts/run.js index 360d81b6..7198f21d 100644 --- a/Utils/Scripts/run.js +++ b/Utils/Scripts/run.js @@ -84,8 +84,8 @@ const cleanHandlers = { return true; }, 'firmware': () => { - return remove('./Firmware/src/config/config.cpp') - & remove('./Firmware/include/config/config.hpp') + return remove('./firmware/src/config/config.cpp') + & remove('./firmware/include/config/config.hpp') & platformio('clean'); } }; @@ -124,7 +124,7 @@ function platformio(command) { command = '.'; } log(`Running platformio ${command}`, color.green); - return exec(platformioExec, ['run', '-d Firmware', `-t ${command}`]); + return exec(platformioExec, ['run', '-d firmware', `-t ${command}`]); } function plotter() { diff --git a/Utils/Serial/src/crashAnalyzer/analyze.cpp b/Utils/Serial/src/crashAnalyzer/analyze.cpp index 4a864f9f..0d69baa0 100644 --- a/Utils/Serial/src/crashAnalyzer/analyze.cpp +++ b/Utils/Serial/src/crashAnalyzer/analyze.cpp @@ -74,7 +74,7 @@ void CrashAnalyzer::addr2line(std::vector addresses) std::ostringstream command; command << ADDR2LINE_PATH - << " -e ./Firmware/.pio/build/esp32dev/firmware.elf" + << " -e ./firmware/.pio/build/esp32dev/firmware.elf" << " -fpCis" // see https://linux.die.net/man/1/addr2line << " > " << outputFile; for (const auto &address : addresses) diff --git a/Firmware/.gitignore b/firmware/.gitignore similarity index 100% rename from Firmware/.gitignore rename to firmware/.gitignore diff --git a/Firmware/include/hardware/angleAccessor.hpp b/firmware/include/hardware/angleAccessor.hpp similarity index 100% rename from Firmware/include/hardware/angleAccessor.hpp rename to firmware/include/hardware/angleAccessor.hpp diff --git a/Firmware/include/hardware/panto.hpp b/firmware/include/hardware/panto.hpp similarity index 100% rename from Firmware/include/hardware/panto.hpp rename to firmware/include/hardware/panto.hpp diff --git a/Firmware/include/hardware/spiCommands.hpp b/firmware/include/hardware/spiCommands.hpp similarity index 100% rename from Firmware/include/hardware/spiCommands.hpp rename to firmware/include/hardware/spiCommands.hpp diff --git a/Firmware/include/hardware/spiEncoder.hpp b/firmware/include/hardware/spiEncoder.hpp similarity index 100% rename from Firmware/include/hardware/spiEncoder.hpp rename to firmware/include/hardware/spiEncoder.hpp diff --git a/Firmware/include/hardware/spiEncoderChain.hpp b/firmware/include/hardware/spiEncoderChain.hpp similarity index 100% rename from Firmware/include/hardware/spiEncoderChain.hpp rename to firmware/include/hardware/spiEncoderChain.hpp diff --git a/Firmware/include/hardware/spiPacket.hpp b/firmware/include/hardware/spiPacket.hpp similarity index 100% rename from Firmware/include/hardware/spiPacket.hpp rename to firmware/include/hardware/spiPacket.hpp diff --git a/Firmware/include/ioMain.hpp b/firmware/include/ioMain.hpp similarity index 100% rename from Firmware/include/ioMain.hpp rename to firmware/include/ioMain.hpp diff --git a/Firmware/include/physics/annotatedEdge.hpp b/firmware/include/physics/annotatedEdge.hpp similarity index 100% rename from Firmware/include/physics/annotatedEdge.hpp rename to firmware/include/physics/annotatedEdge.hpp diff --git a/Firmware/include/physics/collider.hpp b/firmware/include/physics/collider.hpp similarity index 100% rename from Firmware/include/physics/collider.hpp rename to firmware/include/physics/collider.hpp diff --git a/Firmware/include/physics/edge.hpp b/firmware/include/physics/edge.hpp similarity index 100% rename from Firmware/include/physics/edge.hpp rename to firmware/include/physics/edge.hpp diff --git a/Firmware/include/physics/godObject.hpp b/firmware/include/physics/godObject.hpp similarity index 100% rename from Firmware/include/physics/godObject.hpp rename to firmware/include/physics/godObject.hpp diff --git a/Firmware/include/physics/godObjectAction.hpp b/firmware/include/physics/godObjectAction.hpp similarity index 100% rename from Firmware/include/physics/godObjectAction.hpp rename to firmware/include/physics/godObjectAction.hpp diff --git a/Firmware/include/physics/godObjectActionData.hpp b/firmware/include/physics/godObjectActionData.hpp similarity index 100% rename from Firmware/include/physics/godObjectActionData.hpp rename to firmware/include/physics/godObjectActionData.hpp diff --git a/Firmware/include/physics/godObjectActionType.hpp b/firmware/include/physics/godObjectActionType.hpp similarity index 100% rename from Firmware/include/physics/godObjectActionType.hpp rename to firmware/include/physics/godObjectActionType.hpp diff --git a/Firmware/include/physics/hashtable.hpp b/firmware/include/physics/hashtable.hpp similarity index 100% rename from Firmware/include/physics/hashtable.hpp rename to firmware/include/physics/hashtable.hpp diff --git a/Firmware/include/physics/indexedEdge.hpp b/firmware/include/physics/indexedEdge.hpp similarity index 100% rename from Firmware/include/physics/indexedEdge.hpp rename to firmware/include/physics/indexedEdge.hpp diff --git a/Firmware/include/physics/obstacle.hpp b/firmware/include/physics/obstacle.hpp similarity index 100% rename from Firmware/include/physics/obstacle.hpp rename to firmware/include/physics/obstacle.hpp diff --git a/Firmware/include/physics/pantoPhysics.hpp b/firmware/include/physics/pantoPhysics.hpp similarity index 100% rename from Firmware/include/physics/pantoPhysics.hpp rename to firmware/include/physics/pantoPhysics.hpp diff --git a/Firmware/include/physicsMain.hpp b/firmware/include/physicsMain.hpp similarity index 100% rename from Firmware/include/physicsMain.hpp rename to firmware/include/physicsMain.hpp diff --git a/Firmware/include/tasks/task.hpp b/firmware/include/tasks/task.hpp similarity index 100% rename from Firmware/include/tasks/task.hpp rename to firmware/include/tasks/task.hpp diff --git a/Firmware/include/tasks/taskFunction.hpp b/firmware/include/tasks/taskFunction.hpp similarity index 100% rename from Firmware/include/tasks/taskFunction.hpp rename to firmware/include/tasks/taskFunction.hpp diff --git a/Firmware/include/tasks/taskRegistry.hpp b/firmware/include/tasks/taskRegistry.hpp similarity index 100% rename from Firmware/include/tasks/taskRegistry.hpp rename to firmware/include/tasks/taskRegistry.hpp diff --git a/Firmware/include/utils/assert.hpp b/firmware/include/utils/assert.hpp similarity index 100% rename from Firmware/include/utils/assert.hpp rename to firmware/include/utils/assert.hpp diff --git a/Firmware/include/utils/crashDump.hpp b/firmware/include/utils/crashDump.hpp similarity index 100% rename from Firmware/include/utils/crashDump.hpp rename to firmware/include/utils/crashDump.hpp diff --git a/Firmware/include/utils/framerateLimiter.hpp b/firmware/include/utils/framerateLimiter.hpp similarity index 100% rename from Firmware/include/utils/framerateLimiter.hpp rename to firmware/include/utils/framerateLimiter.hpp diff --git a/Firmware/include/utils/performanceMonitor.hpp b/firmware/include/utils/performanceMonitor.hpp similarity index 100% rename from Firmware/include/utils/performanceMonitor.hpp rename to firmware/include/utils/performanceMonitor.hpp diff --git a/Firmware/include/utils/receiveHandler.hpp b/firmware/include/utils/receiveHandler.hpp similarity index 100% rename from Firmware/include/utils/receiveHandler.hpp rename to firmware/include/utils/receiveHandler.hpp diff --git a/Firmware/include/utils/receiveState.hpp b/firmware/include/utils/receiveState.hpp similarity index 100% rename from Firmware/include/utils/receiveState.hpp rename to firmware/include/utils/receiveState.hpp diff --git a/Firmware/include/utils/serial.hpp b/firmware/include/utils/serial.hpp similarity index 100% rename from Firmware/include/utils/serial.hpp rename to firmware/include/utils/serial.hpp diff --git a/Firmware/include/utils/utils.hpp b/firmware/include/utils/utils.hpp similarity index 100% rename from Firmware/include/utils/utils.hpp rename to firmware/include/utils/utils.hpp diff --git a/Firmware/include/utils/vector.hpp b/firmware/include/utils/vector.hpp similarity index 100% rename from Firmware/include/utils/vector.hpp rename to firmware/include/utils/vector.hpp diff --git a/Firmware/platformio.ini b/firmware/platformio.ini similarity index 100% rename from Firmware/platformio.ini rename to firmware/platformio.ini diff --git a/Firmware/src/hardware/panto.cpp b/firmware/src/hardware/panto.cpp similarity index 100% rename from Firmware/src/hardware/panto.cpp rename to firmware/src/hardware/panto.cpp diff --git a/Firmware/src/hardware/spiCommands.cpp b/firmware/src/hardware/spiCommands.cpp similarity index 100% rename from Firmware/src/hardware/spiCommands.cpp rename to firmware/src/hardware/spiCommands.cpp diff --git a/Firmware/src/hardware/spiEncoder.cpp b/firmware/src/hardware/spiEncoder.cpp similarity index 100% rename from Firmware/src/hardware/spiEncoder.cpp rename to firmware/src/hardware/spiEncoder.cpp diff --git a/Firmware/src/hardware/spiEncoderChain.cpp b/firmware/src/hardware/spiEncoderChain.cpp similarity index 100% rename from Firmware/src/hardware/spiEncoderChain.cpp rename to firmware/src/hardware/spiEncoderChain.cpp diff --git a/Firmware/src/hardware/spiPacket.cpp b/firmware/src/hardware/spiPacket.cpp similarity index 100% rename from Firmware/src/hardware/spiPacket.cpp rename to firmware/src/hardware/spiPacket.cpp diff --git a/Firmware/src/ioMain.cpp b/firmware/src/ioMain.cpp similarity index 100% rename from Firmware/src/ioMain.cpp rename to firmware/src/ioMain.cpp diff --git a/Firmware/src/main.cpp b/firmware/src/main.cpp similarity index 100% rename from Firmware/src/main.cpp rename to firmware/src/main.cpp diff --git a/Firmware/src/physics/annotatedEdge.cpp b/firmware/src/physics/annotatedEdge.cpp similarity index 100% rename from Firmware/src/physics/annotatedEdge.cpp rename to firmware/src/physics/annotatedEdge.cpp diff --git a/Firmware/src/physics/collider.cpp b/firmware/src/physics/collider.cpp similarity index 100% rename from Firmware/src/physics/collider.cpp rename to firmware/src/physics/collider.cpp diff --git a/Firmware/src/physics/godObject.cpp b/firmware/src/physics/godObject.cpp similarity index 100% rename from Firmware/src/physics/godObject.cpp rename to firmware/src/physics/godObject.cpp diff --git a/Firmware/src/physics/hashtable.cpp b/firmware/src/physics/hashtable.cpp similarity index 100% rename from Firmware/src/physics/hashtable.cpp rename to firmware/src/physics/hashtable.cpp diff --git a/Firmware/src/physics/indexedEdge.cpp b/firmware/src/physics/indexedEdge.cpp similarity index 100% rename from Firmware/src/physics/indexedEdge.cpp rename to firmware/src/physics/indexedEdge.cpp diff --git a/Firmware/src/physics/obstacle.cpp b/firmware/src/physics/obstacle.cpp similarity index 100% rename from Firmware/src/physics/obstacle.cpp rename to firmware/src/physics/obstacle.cpp diff --git a/Firmware/src/physics/pantoPhysics.cpp b/firmware/src/physics/pantoPhysics.cpp similarity index 100% rename from Firmware/src/physics/pantoPhysics.cpp rename to firmware/src/physics/pantoPhysics.cpp diff --git a/Firmware/src/physicsMain.cpp b/firmware/src/physicsMain.cpp similarity index 100% rename from Firmware/src/physicsMain.cpp rename to firmware/src/physicsMain.cpp diff --git a/Firmware/src/tasks/task.cpp b/firmware/src/tasks/task.cpp similarity index 100% rename from Firmware/src/tasks/task.cpp rename to firmware/src/tasks/task.cpp diff --git a/Firmware/src/tasks/taskRegistry.cpp b/firmware/src/tasks/taskRegistry.cpp similarity index 100% rename from Firmware/src/tasks/taskRegistry.cpp rename to firmware/src/tasks/taskRegistry.cpp diff --git a/Firmware/src/utils/crashDump.cpp b/firmware/src/utils/crashDump.cpp similarity index 100% rename from Firmware/src/utils/crashDump.cpp rename to firmware/src/utils/crashDump.cpp diff --git a/Firmware/src/utils/framerateLimiter.cpp b/firmware/src/utils/framerateLimiter.cpp similarity index 100% rename from Firmware/src/utils/framerateLimiter.cpp rename to firmware/src/utils/framerateLimiter.cpp diff --git a/Firmware/src/utils/performanceMonitor.cpp b/firmware/src/utils/performanceMonitor.cpp similarity index 100% rename from Firmware/src/utils/performanceMonitor.cpp rename to firmware/src/utils/performanceMonitor.cpp diff --git a/Firmware/src/utils/serial.cpp b/firmware/src/utils/serial.cpp similarity index 100% rename from Firmware/src/utils/serial.cpp rename to firmware/src/utils/serial.cpp diff --git a/Firmware/src/utils/vector.cpp b/firmware/src/utils/vector.cpp similarity index 100% rename from Firmware/src/utils/vector.cpp rename to firmware/src/utils/vector.cpp From 91d2f17fbec0ba2b93734980fdd09300797dfb36 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 13:58:05 +0200 Subject: [PATCH 02/12] renamed Hardware dir to hardware --- Utils/Scripts/generateHardwareConfig.js | 2 +- {Hardware => hardware}/BP1.json | 0 {Hardware => hardware}/LP1.json | 0 {Hardware => hardware}/LP_PCB.json | 0 {Hardware => hardware}/LP_PCB_ESP32.json | 0 {Hardware => hardware}/angie.json | 0 {Hardware => hardware}/barbie.json | 0 {Hardware => hardware}/chantalle.json | 0 {Hardware => hardware}/doerte.json | 0 {Hardware => hardware}/mab_opt2k4_dir_esp32.json | 0 10 files changed, 1 insertion(+), 1 deletion(-) rename {Hardware => hardware}/BP1.json (100%) rename {Hardware => hardware}/LP1.json (100%) rename {Hardware => hardware}/LP_PCB.json (100%) rename {Hardware => hardware}/LP_PCB_ESP32.json (100%) rename {Hardware => hardware}/angie.json (100%) rename {Hardware => hardware}/barbie.json (100%) rename {Hardware => hardware}/chantalle.json (100%) rename {Hardware => hardware}/doerte.json (100%) rename {Hardware => hardware}/mab_opt2k4_dir_esp32.json (100%) diff --git a/Utils/Scripts/generateHardwareConfig.js b/Utils/Scripts/generateHardwareConfig.js index fca699ae..cf2f415a 100644 --- a/Utils/Scripts/generateHardwareConfig.js +++ b/Utils/Scripts/generateHardwareConfig.js @@ -4,7 +4,7 @@ /* eslint-disable require-jsdoc */ // the template strings can't ne broken into multiple lines /* eslint-disable max-len */ -const input = require('../../Hardware/'+process.argv[2]+'.json'); +const input = require('../../hardware/'+process.argv[2]+'.json'); const fs = require('fs'); const crypto = require('crypto'); const hash = crypto.createHash('md5').update(JSON.stringify(input)).digest(); diff --git a/Hardware/BP1.json b/hardware/BP1.json similarity index 100% rename from Hardware/BP1.json rename to hardware/BP1.json diff --git a/Hardware/LP1.json b/hardware/LP1.json similarity index 100% rename from Hardware/LP1.json rename to hardware/LP1.json diff --git a/Hardware/LP_PCB.json b/hardware/LP_PCB.json similarity index 100% rename from Hardware/LP_PCB.json rename to hardware/LP_PCB.json diff --git a/Hardware/LP_PCB_ESP32.json b/hardware/LP_PCB_ESP32.json similarity index 100% rename from Hardware/LP_PCB_ESP32.json rename to hardware/LP_PCB_ESP32.json diff --git a/Hardware/angie.json b/hardware/angie.json similarity index 100% rename from Hardware/angie.json rename to hardware/angie.json diff --git a/Hardware/barbie.json b/hardware/barbie.json similarity index 100% rename from Hardware/barbie.json rename to hardware/barbie.json diff --git a/Hardware/chantalle.json b/hardware/chantalle.json similarity index 100% rename from Hardware/chantalle.json rename to hardware/chantalle.json diff --git a/Hardware/doerte.json b/hardware/doerte.json similarity index 100% rename from Hardware/doerte.json rename to hardware/doerte.json diff --git a/Hardware/mab_opt2k4_dir_esp32.json b/hardware/mab_opt2k4_dir_esp32.json similarity index 100% rename from Hardware/mab_opt2k4_dir_esp32.json rename to hardware/mab_opt2k4_dir_esp32.json From 2f674eb815de5e6d364ac57741349ac23e81099d Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 14:00:44 +0200 Subject: [PATCH 03/12] renamed Protocol dir to protocol --- Utils/Scripts/run.js | 4 ++-- binding.gyp | 4 ++-- firmware/platformio.ini | 2 +- {Protocol => protocol}/include/protocol/header.hpp | 0 {Protocol => protocol}/include/protocol/messageType.hpp | 0 {Protocol => protocol}/include/protocol/protocol.hpp | 0 {Protocol => protocol}/src/protocol/protocol.cpp | 0 7 files changed, 5 insertions(+), 5 deletions(-) rename {Protocol => protocol}/include/protocol/header.hpp (100%) rename {Protocol => protocol}/include/protocol/messageType.hpp (100%) rename {Protocol => protocol}/include/protocol/protocol.hpp (100%) rename {Protocol => protocol}/src/protocol/protocol.cpp (100%) diff --git a/Utils/Scripts/run.js b/Utils/Scripts/run.js index 7198f21d..6c0bdb9b 100644 --- a/Utils/Scripts/run.js +++ b/Utils/Scripts/run.js @@ -35,9 +35,9 @@ const buildHandlers = { process.platform == 'win32' ? 'Utils/Serial/src/serial/win.cpp' : 'Utils/Serial/src/serial/unix.cpp', - 'Protocol/src/protocol/protocol.cpp', + 'protocol/src/protocol/protocol.cpp', '-IUtils/Serial/include', - '-IProtocol/include', + '-Iprotocol/include', '-o Utils/Serial/serial'])); }, 'firmware': () => { diff --git a/binding.gyp b/binding.gyp index 69faf664..f178af76 100644 --- a/binding.gyp +++ b/binding.gyp @@ -14,7 +14,7 @@ "./Utils/Serial/src/serial/shared.cpp", "./Utils/Serial/src/crashAnalyzer/buffer.cpp", "./Utils/Serial/src/crashAnalyzer/analyze.cpp", - "./Protocol/src/protocol/protocol.cpp" + "./protocol/src/protocol/protocol.cpp" ], "conditions": [ ["OS=='win'", { @@ -26,7 +26,7 @@ ], "include_dirs": [ "./Utils/Serial/include", - "./Protocol/include" + "./protocol/include" ], "defines": [ "<@(cppdefs)" diff --git a/firmware/platformio.ini b/firmware/platformio.ini index 96b6c482..cc469467 100644 --- a/firmware/platformio.ini +++ b/firmware/platformio.ini @@ -2,7 +2,7 @@ description = Dualpanto firmware [protocol] -base_dir = ../Protocol +base_dir = ../protocol include_dir = ${protocol.base_dir}/include src_dir = ${protocol.base_dir}/src src_filter = +<../${protocol.src_dir}> diff --git a/Protocol/include/protocol/header.hpp b/protocol/include/protocol/header.hpp similarity index 100% rename from Protocol/include/protocol/header.hpp rename to protocol/include/protocol/header.hpp diff --git a/Protocol/include/protocol/messageType.hpp b/protocol/include/protocol/messageType.hpp similarity index 100% rename from Protocol/include/protocol/messageType.hpp rename to protocol/include/protocol/messageType.hpp diff --git a/Protocol/include/protocol/protocol.hpp b/protocol/include/protocol/protocol.hpp similarity index 100% rename from Protocol/include/protocol/protocol.hpp rename to protocol/include/protocol/protocol.hpp diff --git a/Protocol/src/protocol/protocol.cpp b/protocol/src/protocol/protocol.cpp similarity index 100% rename from Protocol/src/protocol/protocol.cpp rename to protocol/src/protocol/protocol.cpp From 57ff281061496e439b1991c45cf0eb292916834f Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 15:09:19 +0200 Subject: [PATCH 04/12] changed all the things in utils into lower case --- .gitignore | 6 ++--- binding.gyp | 24 ++++++++--------- lib/dualpantoframework.js | 2 +- package.json | 6 ++--- .../backtrace}/backtrace.sh | 2 +- .../geogebra}/forwardKinematics.html | 0 .../geogebra}/forwardKinematics.txt | 0 .../geogebra}/inverseKinematics.html | 0 .../geogebra}/inverseKinematics.txt | 0 {Utils/GeoGebra => utils/geogebra}/readme.md | 0 {Utils => utils}/plotter/index.html | 0 {Utils => utils}/plotter/panto.js | 0 {Utils => utils}/plotter/plotter.js | 0 .../scripts}/createJsCommitHook.js | 0 {Utils/Scripts => utils/scripts}/docs.js | 0 .../scripts}/generateHardwareConfig.js | 0 {Utils/Scripts => utils/scripts}/run.js | 26 +++++++++---------- {Utils/Scripts => utils/scripts}/tools.js | 0 .../serial}/include/crashAnalyzer.hpp | 0 .../Serial => utils/serial}/include/node.hpp | 0 .../serial}/include/serial.hpp | 0 .../serial}/include/standalone.hpp | 0 .../serial}/src/crashAnalyzer/analyze.cpp | 0 .../serial}/src/crashAnalyzer/buffer.cpp | 0 .../Serial => utils/serial}/src/node/main.cpp | 0 .../Serial => utils/serial}/src/node/poll.cpp | 0 .../serial}/src/node/receiveHelpers.cpp | 0 .../Serial => utils/serial}/src/node/send.cpp | 0 .../serial}/src/node/sendHelpers.cpp | 0 .../serial}/src/node/setup.cpp | 0 .../serial}/src/serial/shared.cpp | 0 .../serial}/src/serial/unix.cpp | 0 .../serial}/src/serial/win.cpp | 0 .../serial}/src/standalone/main.cpp | 0 .../serial}/src/standalone/standalone.cpp | 0 {Utils => utils}/svgConverter/fileCreator.js | 0 {Utils => utils}/svgConverter/svgConverter.js | 0 {Utils => utils}/svgConverter/svgToJs.js | 0 {Utils => utils}/svgConverter/utils.js | 0 {Utils/ViDeb => utils/viDeb}/index.html | 0 {Utils/ViDeb => utils/viDeb}/index.js | 0 .../viDeb}/static/css/bootstrap.min.css | 0 .../viDeb}/static/js/LP_PCB.json | 0 .../ViDeb => utils/viDeb}/static/js/Vector.js | 0 .../viDeb}/static/js/bootstrap.min.js | 0 .../viDeb}/static/js/graphics.js | 0 .../viDeb}/static/js/jquery.min.js | 0 {Utils/ViDeb => utils/viDeb}/static/js/map.js | 0 {Utils/ViDeb => utils/viDeb}/static/map.html | 0 49 files changed, 33 insertions(+), 33 deletions(-) rename {Utils/Backtrace => utils/backtrace}/backtrace.sh (93%) rename {Utils/GeoGebra => utils/geogebra}/forwardKinematics.html (100%) rename {Utils/GeoGebra => utils/geogebra}/forwardKinematics.txt (100%) rename {Utils/GeoGebra => utils/geogebra}/inverseKinematics.html (100%) rename {Utils/GeoGebra => utils/geogebra}/inverseKinematics.txt (100%) rename {Utils/GeoGebra => utils/geogebra}/readme.md (100%) rename {Utils => utils}/plotter/index.html (100%) rename {Utils => utils}/plotter/panto.js (100%) rename {Utils => utils}/plotter/plotter.js (100%) rename {Utils/Scripts => utils/scripts}/createJsCommitHook.js (100%) rename {Utils/Scripts => utils/scripts}/docs.js (100%) rename {Utils/Scripts => utils/scripts}/generateHardwareConfig.js (100%) rename {Utils/Scripts => utils/scripts}/run.js (87%) rename {Utils/Scripts => utils/scripts}/tools.js (100%) rename {Utils/Serial => utils/serial}/include/crashAnalyzer.hpp (100%) rename {Utils/Serial => utils/serial}/include/node.hpp (100%) rename {Utils/Serial => utils/serial}/include/serial.hpp (100%) rename {Utils/Serial => utils/serial}/include/standalone.hpp (100%) rename {Utils/Serial => utils/serial}/src/crashAnalyzer/analyze.cpp (100%) rename {Utils/Serial => utils/serial}/src/crashAnalyzer/buffer.cpp (100%) rename {Utils/Serial => utils/serial}/src/node/main.cpp (100%) rename {Utils/Serial => utils/serial}/src/node/poll.cpp (100%) rename {Utils/Serial => utils/serial}/src/node/receiveHelpers.cpp (100%) rename {Utils/Serial => utils/serial}/src/node/send.cpp (100%) rename {Utils/Serial => utils/serial}/src/node/sendHelpers.cpp (100%) rename {Utils/Serial => utils/serial}/src/node/setup.cpp (100%) rename {Utils/Serial => utils/serial}/src/serial/shared.cpp (100%) rename {Utils/Serial => utils/serial}/src/serial/unix.cpp (100%) rename {Utils/Serial => utils/serial}/src/serial/win.cpp (100%) rename {Utils/Serial => utils/serial}/src/standalone/main.cpp (100%) rename {Utils/Serial => utils/serial}/src/standalone/standalone.cpp (100%) rename {Utils => utils}/svgConverter/fileCreator.js (100%) rename {Utils => utils}/svgConverter/svgConverter.js (100%) rename {Utils => utils}/svgConverter/svgToJs.js (100%) rename {Utils => utils}/svgConverter/utils.js (100%) rename {Utils/ViDeb => utils/viDeb}/index.html (100%) rename {Utils/ViDeb => utils/viDeb}/index.js (100%) rename {Utils/ViDeb => utils/viDeb}/static/css/bootstrap.min.css (100%) rename {Utils/ViDeb => utils/viDeb}/static/js/LP_PCB.json (100%) rename {Utils/ViDeb => utils/viDeb}/static/js/Vector.js (100%) rename {Utils/ViDeb => utils/viDeb}/static/js/bootstrap.min.js (100%) rename {Utils/ViDeb => utils/viDeb}/static/js/graphics.js (100%) rename {Utils/ViDeb => utils/viDeb}/static/js/jquery.min.js (100%) rename {Utils/ViDeb => utils/viDeb}/static/js/map.js (100%) rename {Utils/ViDeb => utils/viDeb}/static/map.html (100%) diff --git a/.gitignore b/.gitignore index c8ff8260..eb0e357c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -Utils/Serial/* -!Utils/Serial/include -!Utils/Serial/src +utils/serial/* +!utils/serial/include +!utils/serial/src !voice-command/build/build-release.js build/ node_modules/ diff --git a/binding.gyp b/binding.gyp index f178af76..7f28a7f1 100644 --- a/binding.gyp +++ b/binding.gyp @@ -5,27 +5,27 @@ "targets": [{ "target_name": "serial", "sources": [ - "./Utils/Serial/src/node/main.cpp", - "./Utils/Serial/src/node/setup.cpp", - "./Utils/Serial/src/node/poll.cpp", - "./Utils/Serial/src/node/send.cpp", - "./Utils/Serial/src/node/receiveHelpers.cpp", - "./Utils/Serial/src/node/sendHelpers.cpp", - "./Utils/Serial/src/serial/shared.cpp", - "./Utils/Serial/src/crashAnalyzer/buffer.cpp", - "./Utils/Serial/src/crashAnalyzer/analyze.cpp", + "./utils/serial/src/node/main.cpp", + "./utils/serial/src/node/setup.cpp", + "./utils/serial/src/node/poll.cpp", + "./utils/serial/src/node/send.cpp", + "./utils/serial/src/node/receiveHelpers.cpp", + "./utils/serial/src/node/sendHelpers.cpp", + "./utils/serial/src/serial/shared.cpp", + "./utils/serial/src/crashAnalyzer/buffer.cpp", + "./utils/serial/src/crashAnalyzer/analyze.cpp", "./protocol/src/protocol/protocol.cpp" ], "conditions": [ ["OS=='win'", { - "sources": ["./Utils/Serial/src/serial/win.cpp"] + "sources": ["./utils/serial/src/serial/win.cpp"] }], ["OS!='win'", { - "sources": ["./Utils/Serial/src/serial/unix.cpp"] + "sources": ["./utils/serial/src/serial/unix.cpp"] }], ], "include_dirs": [ - "./Utils/Serial/include", + "./utils/serial/include", "./protocol/include" ], "defines": [ diff --git a/lib/dualpantoframework.js b/lib/dualpantoframework.js index 899e4301..8a542ce0 100644 --- a/lib/dualpantoframework.js +++ b/lib/dualpantoframework.js @@ -22,7 +22,7 @@ module.exports = { // require async to dirty fix cyclic dependency process.nextTick(() => { - require('../Utils/ViDeb/index'); + require('../utils/viDeb/index'); }); // @TODO: move the following stuff into the correct files diff --git a/package.json b/package.json index 0c598c59..5550ecac 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,9 @@ "config": "npm run script config", "plotter": "npm run script plotter", "docs": "npm run script docs", - "script": "node ./Utils/Scripts/run.js", - "svgToJs": "node ./Utils/svgConverter/svgToJs.js", - "setup-commit-hook": "if-env NODE_ENV=production && echo \" production mode \" || node ./Utils/Scripts/createJsCommitHook.js" + "script": "node ./utils/scripts/run.js", + "svgToJs": "node ./utils/svgConverter/svgToJs.js", + "setup-commit-hook": "if-env NODE_ENV=production && echo \" production mode \" || node ./utils/scripts/createJsCommitHook.js" }, "repository": { "type": "git", diff --git a/Utils/Backtrace/backtrace.sh b/utils/backtrace/backtrace.sh similarity index 93% rename from Utils/Backtrace/backtrace.sh rename to utils/backtrace/backtrace.sh index d2a8fc33..4b75654b 100644 --- a/Utils/Backtrace/backtrace.sh +++ b/utils/backtrace/backtrace.sh @@ -4,7 +4,7 @@ # In order to find line numbers, add -g3 to the PlatformIO build flags. # The default target is set for running this script from the base framework dir. # Alternatively, you may pass an path to the elf as the first argument. -# Default usage: ./Utils/Backtrace/backtrace.sh "0x40085698:0x3ffb5e80 [...]" +# Default usage: ./utils/backtrace/backtrace.sh "0x40085698:0x3ffb5e80 [...]" # Alternative usage example for running from this dir: ./backtrace.sh ./../../firmware/.pioenvs/esp32dev/firmware.elf "0x40085698:0x3ffb5e80 [...]" if [ "$#" -eq 1 ]; then diff --git a/Utils/GeoGebra/forwardKinematics.html b/utils/geogebra/forwardKinematics.html similarity index 100% rename from Utils/GeoGebra/forwardKinematics.html rename to utils/geogebra/forwardKinematics.html diff --git a/Utils/GeoGebra/forwardKinematics.txt b/utils/geogebra/forwardKinematics.txt similarity index 100% rename from Utils/GeoGebra/forwardKinematics.txt rename to utils/geogebra/forwardKinematics.txt diff --git a/Utils/GeoGebra/inverseKinematics.html b/utils/geogebra/inverseKinematics.html similarity index 100% rename from Utils/GeoGebra/inverseKinematics.html rename to utils/geogebra/inverseKinematics.html diff --git a/Utils/GeoGebra/inverseKinematics.txt b/utils/geogebra/inverseKinematics.txt similarity index 100% rename from Utils/GeoGebra/inverseKinematics.txt rename to utils/geogebra/inverseKinematics.txt diff --git a/Utils/GeoGebra/readme.md b/utils/geogebra/readme.md similarity index 100% rename from Utils/GeoGebra/readme.md rename to utils/geogebra/readme.md diff --git a/Utils/plotter/index.html b/utils/plotter/index.html similarity index 100% rename from Utils/plotter/index.html rename to utils/plotter/index.html diff --git a/Utils/plotter/panto.js b/utils/plotter/panto.js similarity index 100% rename from Utils/plotter/panto.js rename to utils/plotter/panto.js diff --git a/Utils/plotter/plotter.js b/utils/plotter/plotter.js similarity index 100% rename from Utils/plotter/plotter.js rename to utils/plotter/plotter.js diff --git a/Utils/Scripts/createJsCommitHook.js b/utils/scripts/createJsCommitHook.js similarity index 100% rename from Utils/Scripts/createJsCommitHook.js rename to utils/scripts/createJsCommitHook.js diff --git a/Utils/Scripts/docs.js b/utils/scripts/docs.js similarity index 100% rename from Utils/Scripts/docs.js rename to utils/scripts/docs.js diff --git a/Utils/Scripts/generateHardwareConfig.js b/utils/scripts/generateHardwareConfig.js similarity index 100% rename from Utils/Scripts/generateHardwareConfig.js rename to utils/scripts/generateHardwareConfig.js diff --git a/Utils/Scripts/run.js b/utils/scripts/run.js similarity index 87% rename from Utils/Scripts/run.js rename to utils/scripts/run.js index 6c0bdb9b..1c191294 100644 --- a/Utils/Scripts/run.js +++ b/utils/scripts/run.js @@ -27,18 +27,18 @@ const buildHandlers = { return exec( cppExec, cppArgs.concat(cppDefines.map((d) => cppDefinePrefix + d)).concat([ - 'Utils/Serial/src/standalone/main.cpp', - 'Utils/Serial/src/standalone/standalone.cpp', - 'Utils/Serial/src/serial/shared.cpp', - 'Utils/Serial/src/crashAnalyzer/analyze.cpp', - 'Utils/Serial/src/crashAnalyzer/buffer.cpp', + 'utils/serial/src/standalone/main.cpp', + 'utils/serial/src/standalone/standalone.cpp', + 'utils/serial/src/serial/shared.cpp', + 'utils/serial/src/crashAnalyzer/analyze.cpp', + 'utils/serial/src/crashAnalyzer/buffer.cpp', process.platform == 'win32' ? - 'Utils/Serial/src/serial/win.cpp' : - 'Utils/Serial/src/serial/unix.cpp', + 'utils/serial/src/serial/win.cpp' : + 'utils/serial/src/serial/unix.cpp', 'protocol/src/protocol/protocol.cpp', - '-IUtils/Serial/include', + '-Iutils/serial/include', '-Iprotocol/include', - '-o Utils/Serial/serial'])); + '-o utils/serial/serial'])); }, 'firmware': () => { return config(process.argv[4]) @@ -116,7 +116,7 @@ function config(target) { target = 'doerte'; } log(`Generating config ${target}`, color.green); - return exec('node', ['Utils/Scripts/generateHardwareConfig.js', target]); + return exec('node', ['utils/scripts/generateHardwareConfig.js', target]); } function platformio(command) { @@ -128,12 +128,12 @@ function platformio(command) { } function plotter() { - return exec('http-server', ['Utils/plotter/']); + return exec('http-server', ['utils/plotter/']); } function docs() { log(`Building docs`, color.green); - return exec('node', ['Utils/Scripts/docs.js']); + return exec('node', ['utils/scripts/docs.js']); } const handlers = { @@ -159,7 +159,7 @@ if (process.platform == 'win32') { platformioExec = path.join(platformioDir, '/penv/Scripts/platformio'); cppExec = 'cl'; cppDefinePrefix = '/D'; - cppArgs = ['/Fo:Utils\\Serial\\']; + cppArgs = ['/Fo:utils\\serial\\']; const addr2lineDefine = 'ADDR2LINE_PATH=\"' + addr2linePath + '\"'; cppDefines.push(escape(addr2lineDefine)); } else { diff --git a/Utils/Scripts/tools.js b/utils/scripts/tools.js similarity index 100% rename from Utils/Scripts/tools.js rename to utils/scripts/tools.js diff --git a/Utils/Serial/include/crashAnalyzer.hpp b/utils/serial/include/crashAnalyzer.hpp similarity index 100% rename from Utils/Serial/include/crashAnalyzer.hpp rename to utils/serial/include/crashAnalyzer.hpp diff --git a/Utils/Serial/include/node.hpp b/utils/serial/include/node.hpp similarity index 100% rename from Utils/Serial/include/node.hpp rename to utils/serial/include/node.hpp diff --git a/Utils/Serial/include/serial.hpp b/utils/serial/include/serial.hpp similarity index 100% rename from Utils/Serial/include/serial.hpp rename to utils/serial/include/serial.hpp diff --git a/Utils/Serial/include/standalone.hpp b/utils/serial/include/standalone.hpp similarity index 100% rename from Utils/Serial/include/standalone.hpp rename to utils/serial/include/standalone.hpp diff --git a/Utils/Serial/src/crashAnalyzer/analyze.cpp b/utils/serial/src/crashAnalyzer/analyze.cpp similarity index 100% rename from Utils/Serial/src/crashAnalyzer/analyze.cpp rename to utils/serial/src/crashAnalyzer/analyze.cpp diff --git a/Utils/Serial/src/crashAnalyzer/buffer.cpp b/utils/serial/src/crashAnalyzer/buffer.cpp similarity index 100% rename from Utils/Serial/src/crashAnalyzer/buffer.cpp rename to utils/serial/src/crashAnalyzer/buffer.cpp diff --git a/Utils/Serial/src/node/main.cpp b/utils/serial/src/node/main.cpp similarity index 100% rename from Utils/Serial/src/node/main.cpp rename to utils/serial/src/node/main.cpp diff --git a/Utils/Serial/src/node/poll.cpp b/utils/serial/src/node/poll.cpp similarity index 100% rename from Utils/Serial/src/node/poll.cpp rename to utils/serial/src/node/poll.cpp diff --git a/Utils/Serial/src/node/receiveHelpers.cpp b/utils/serial/src/node/receiveHelpers.cpp similarity index 100% rename from Utils/Serial/src/node/receiveHelpers.cpp rename to utils/serial/src/node/receiveHelpers.cpp diff --git a/Utils/Serial/src/node/send.cpp b/utils/serial/src/node/send.cpp similarity index 100% rename from Utils/Serial/src/node/send.cpp rename to utils/serial/src/node/send.cpp diff --git a/Utils/Serial/src/node/sendHelpers.cpp b/utils/serial/src/node/sendHelpers.cpp similarity index 100% rename from Utils/Serial/src/node/sendHelpers.cpp rename to utils/serial/src/node/sendHelpers.cpp diff --git a/Utils/Serial/src/node/setup.cpp b/utils/serial/src/node/setup.cpp similarity index 100% rename from Utils/Serial/src/node/setup.cpp rename to utils/serial/src/node/setup.cpp diff --git a/Utils/Serial/src/serial/shared.cpp b/utils/serial/src/serial/shared.cpp similarity index 100% rename from Utils/Serial/src/serial/shared.cpp rename to utils/serial/src/serial/shared.cpp diff --git a/Utils/Serial/src/serial/unix.cpp b/utils/serial/src/serial/unix.cpp similarity index 100% rename from Utils/Serial/src/serial/unix.cpp rename to utils/serial/src/serial/unix.cpp diff --git a/Utils/Serial/src/serial/win.cpp b/utils/serial/src/serial/win.cpp similarity index 100% rename from Utils/Serial/src/serial/win.cpp rename to utils/serial/src/serial/win.cpp diff --git a/Utils/Serial/src/standalone/main.cpp b/utils/serial/src/standalone/main.cpp similarity index 100% rename from Utils/Serial/src/standalone/main.cpp rename to utils/serial/src/standalone/main.cpp diff --git a/Utils/Serial/src/standalone/standalone.cpp b/utils/serial/src/standalone/standalone.cpp similarity index 100% rename from Utils/Serial/src/standalone/standalone.cpp rename to utils/serial/src/standalone/standalone.cpp diff --git a/Utils/svgConverter/fileCreator.js b/utils/svgConverter/fileCreator.js similarity index 100% rename from Utils/svgConverter/fileCreator.js rename to utils/svgConverter/fileCreator.js diff --git a/Utils/svgConverter/svgConverter.js b/utils/svgConverter/svgConverter.js similarity index 100% rename from Utils/svgConverter/svgConverter.js rename to utils/svgConverter/svgConverter.js diff --git a/Utils/svgConverter/svgToJs.js b/utils/svgConverter/svgToJs.js similarity index 100% rename from Utils/svgConverter/svgToJs.js rename to utils/svgConverter/svgToJs.js diff --git a/Utils/svgConverter/utils.js b/utils/svgConverter/utils.js similarity index 100% rename from Utils/svgConverter/utils.js rename to utils/svgConverter/utils.js diff --git a/Utils/ViDeb/index.html b/utils/viDeb/index.html similarity index 100% rename from Utils/ViDeb/index.html rename to utils/viDeb/index.html diff --git a/Utils/ViDeb/index.js b/utils/viDeb/index.js similarity index 100% rename from Utils/ViDeb/index.js rename to utils/viDeb/index.js diff --git a/Utils/ViDeb/static/css/bootstrap.min.css b/utils/viDeb/static/css/bootstrap.min.css similarity index 100% rename from Utils/ViDeb/static/css/bootstrap.min.css rename to utils/viDeb/static/css/bootstrap.min.css diff --git a/Utils/ViDeb/static/js/LP_PCB.json b/utils/viDeb/static/js/LP_PCB.json similarity index 100% rename from Utils/ViDeb/static/js/LP_PCB.json rename to utils/viDeb/static/js/LP_PCB.json diff --git a/Utils/ViDeb/static/js/Vector.js b/utils/viDeb/static/js/Vector.js similarity index 100% rename from Utils/ViDeb/static/js/Vector.js rename to utils/viDeb/static/js/Vector.js diff --git a/Utils/ViDeb/static/js/bootstrap.min.js b/utils/viDeb/static/js/bootstrap.min.js similarity index 100% rename from Utils/ViDeb/static/js/bootstrap.min.js rename to utils/viDeb/static/js/bootstrap.min.js diff --git a/Utils/ViDeb/static/js/graphics.js b/utils/viDeb/static/js/graphics.js similarity index 100% rename from Utils/ViDeb/static/js/graphics.js rename to utils/viDeb/static/js/graphics.js diff --git a/Utils/ViDeb/static/js/jquery.min.js b/utils/viDeb/static/js/jquery.min.js similarity index 100% rename from Utils/ViDeb/static/js/jquery.min.js rename to utils/viDeb/static/js/jquery.min.js diff --git a/Utils/ViDeb/static/js/map.js b/utils/viDeb/static/js/map.js similarity index 100% rename from Utils/ViDeb/static/js/map.js rename to utils/viDeb/static/js/map.js diff --git a/Utils/ViDeb/static/map.html b/utils/viDeb/static/map.html similarity index 100% rename from Utils/ViDeb/static/map.html rename to utils/viDeb/static/map.html From bd203b66b5bbc283ca31512bf5ce51a8dfae86d7 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 15:11:30 +0200 Subject: [PATCH 05/12] renamed readme to lower case --- README.md => readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename README.md => readme.md (100%) diff --git a/README.md b/readme.md similarity index 100% rename from README.md rename to readme.md From ad7a54f73cfa9896d34817365d087945f0a904a6 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 16:15:59 +0200 Subject: [PATCH 06/12] added an overview of all the stuff in the repo --- readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/readme.md b/readme.md index adb22961..d1591f3c 100644 --- a/readme.md +++ b/readme.md @@ -74,3 +74,24 @@ The `examples` dir contains multiple example programs, as we ll as programs for - `speakText.js` - Uses the voice output. - `wall` - Obstacle testing. - `wallGenerator.js` - generates a circle obstacle, subdivided into a given number of edges. + +## Repository Overview + +- `documentation` - \[Markdown\] Contains the documentation about interfaces and setup. + - `classes` - Documentaion for the classes exported by the framework. Build this using `npm run docs`. + - `protocol` - Definition of the serial communication protocol. The shared source files implementing this can be found in `./protocol/`. The serial implementations are stored in `./firmware/utils/` (firmware side) and `./utils/serial/` (framework side). + - `setup` - Instuctions on how to set up the framework for different operating systems. +- `examples` - \[JavaScript\] Example scripts on how to use the framework. See [example section](#Examples). +- `firmware` - \[C++\] The firmware for the ESP32 built into the device. Build using the [platformio command](#Available-Scripts). +- `hardware` - \[JSON\] Config files for different hardware iterations. These are used with the [configure command](#Available-Scripts) to generate source files which are then compiled into the firmware. +- `lib` - \[JavaScript\] The dualpantoframework library. Refer the [docs](documentation/classes/index.md) for more info about the files. +- `protocol` - \[C++\] Serial protocol base files, shared between firmware and framework. Based on the specification stored in `./documentation/protocol/`. +- `utils` - Mixed helpers for building and debugging. + - `backtrace` - \[sh\] Bash script vor decoding the ESP32's crash backtrace. Functionality is built into the framework's serial plugin now, but this script may be used without a platformio installation. + - `geogebra` - Geometric representations of forward and inverse kinematics. Contains both complete websites for easy use, as well as the scripts used to create those websites. + - `plotter` - \[JavaScript\] Visualization of the panto's available space and the resolution. Use the [plotter command](#Available-Scripts) to start a server, open the page (note: due to a bug in a dependency, go directly to `[...]/index.html`) and upload one of the hardware config files. + - `scripts` - \[JavaScript\] The scripts behind the [commands](#Available-Scripts). Check out `./package.json` and `./utils/scripts/run.js` if you want to add functionality. + - `serial` - \[C++\] The serial plugin for the framework. Uses the shared protocol files (`./protocol/`) to implement the specification (`./documentation/protocol/`). + - `svgConverter` - \[JavaScript\] Converts a `svg` file of a level into a `prototype.js` script. Use the [svgToJs command](#Available-Scripts). + - `viDeb` - \[JavaScript\] Implements a emulated device. +- `voice-interaction` - \[JavaScript\] Voice input plugin used by the framework. \ No newline at end of file From 66cffb1b7bd028136a890d48f5ce35303306963f Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 16:30:19 +0200 Subject: [PATCH 07/12] moved voice-command to utils dir and adapted dir name --- .gitignore | 8 ++++---- lib/voice-interaction.js | 2 +- readme.md | 2 +- utils/scripts/run.js | 4 ++-- {voice-command => utils/voiceCommand}/LICENSE.md | 0 {voice-command => utils/voiceCommand}/README.md | 0 .../voiceCommand}/build/build-release.js | 0 {voice-command => utils/voiceCommand}/index.js | 0 {voice-command => utils/voiceCommand}/package.json | 0 .../voiceCommand}/src/linux/voice-command/build.sh | 0 .../voiceCommand}/src/linux/voice-command/voice-command.c | 0 .../voice-command/voice-command.xcodeproj/project.pbxproj | 0 .../project.xcworkspace/contents.xcworkspacedata | 0 .../src/osx/voice-command/voice-command/CommandListener.h | 0 .../src/osx/voice-command/voice-command/CommandListener.m | 0 .../src/osx/voice-command/voice-command/CommandReporter.h | 0 .../src/osx/voice-command/voice-command/Speech.h | 0 .../voice-command/voice-command/StandardOutputInterop.h | 0 .../voice-command/voice-command/StandardOutputReporter.h | 0 .../voice-command/voice-command/StandardOutputReporter.m | 0 .../src/osx/voice-command/voice-command/main.m | 0 .../voiceCommand}/src/win/voice-command/App.config | 0 .../src/win/voice-command/CommandListener.cs | 0 .../src/win/voice-command/ICommandReporter.cs | 0 .../voiceCommand}/src/win/voice-command/Program.cs | 0 .../src/win/voice-command/Properties/AssemblyInfo.cs | 0 .../src/win/voice-command/StandardOutputReporter.cs | 0 .../src/win/voice-command/voice-command.csproj | 0 .../voiceCommand}/src/win/voice-command/voice-command.sln | 0 {voice-command => utils/voiceCommand}/test/run.js | 0 30 files changed, 8 insertions(+), 8 deletions(-) rename {voice-command => utils/voiceCommand}/LICENSE.md (100%) rename {voice-command => utils/voiceCommand}/README.md (100%) rename {voice-command => utils/voiceCommand}/build/build-release.js (100%) rename {voice-command => utils/voiceCommand}/index.js (100%) rename {voice-command => utils/voiceCommand}/package.json (100%) rename {voice-command => utils/voiceCommand}/src/linux/voice-command/build.sh (100%) mode change 100755 => 100644 rename {voice-command => utils/voiceCommand}/src/linux/voice-command/voice-command.c (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command.xcodeproj/project.pbxproj (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/CommandListener.h (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/CommandListener.m (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/CommandReporter.h (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/Speech.h (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/StandardOutputInterop.h (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/StandardOutputReporter.h (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/StandardOutputReporter.m (100%) rename {voice-command => utils/voiceCommand}/src/osx/voice-command/voice-command/main.m (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/App.config (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/CommandListener.cs (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/ICommandReporter.cs (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/Program.cs (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/Properties/AssemblyInfo.cs (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/StandardOutputReporter.cs (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/voice-command.csproj (100%) rename {voice-command => utils/voiceCommand}/src/win/voice-command/voice-command.sln (100%) rename {voice-command => utils/voiceCommand}/test/run.js (100%) diff --git a/.gitignore b/.gitignore index eb0e357c..21c379fd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ utils/serial/* !utils/serial/include !utils/serial/src -!voice-command/build/build-release.js +!utils/voiceCommand/build/build-release.js build/ node_modules/ package-lock.json @@ -12,7 +12,7 @@ persistent.json *.exe -src/osx/voice-command/build +src/osx/voiceCommand/build .bin/ @@ -25,8 +25,8 @@ src/osx/voice-command/build *.sln.docstates *.plist *.xccheckout -!voice-command/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/xcuserdata/baluubas.xcuserdatad -!voice-command/src/osx/voice-command/voice-command.xcodeproj/xcuserdata/baluubas.xcuserdatad +!utils/voiceCommand/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/xcuserdata/baluubas.xcuserdatad +!utils/voiceCommand/src/osx/voice-command/voice-command.xcodeproj/xcuserdata/baluubas.xcuserdatad *.xcuserdatad # User-specific files (MonoDevelop/Xamarin Studio) diff --git a/lib/voice-interaction.js b/lib/voice-interaction.js index 43e9fb69..dcbd946e 100644 --- a/lib/voice-interaction.js +++ b/lib/voice-interaction.js @@ -2,7 +2,7 @@ const EventEmitter = require('events').EventEmitter; const say = require('say'); -const VoiceCommand = require('../voice-command'); +const VoiceCommand = require('../utils/voiceCommand'); const Player = require('./player'); /** diff --git a/readme.md b/readme.md index d1591f3c..ffa71414 100644 --- a/readme.md +++ b/readme.md @@ -94,4 +94,4 @@ The `examples` dir contains multiple example programs, as we ll as programs for - `serial` - \[C++\] The serial plugin for the framework. Uses the shared protocol files (`./protocol/`) to implement the specification (`./documentation/protocol/`). - `svgConverter` - \[JavaScript\] Converts a `svg` file of a level into a `prototype.js` script. Use the [svgToJs command](#Available-Scripts). - `viDeb` - \[JavaScript\] Implements a emulated device. -- `voice-interaction` - \[JavaScript\] Voice input plugin used by the framework. \ No newline at end of file + - `voiceInteraction` - \[JavaScript\] Voice input plugin used by the framework. \ No newline at end of file diff --git a/utils/scripts/run.js b/utils/scripts/run.js index 1c191294..0bd51851 100644 --- a/utils/scripts/run.js +++ b/utils/scripts/run.js @@ -16,7 +16,7 @@ const buildHandlers = { & build('serial-standalone'); }, 'voice-command': () => { - return exec('node', ['./voice-command/build/build-release.js']); + return exec('node', ['./utils/voiceCommand/build/build-release.js']); }, 'serial-plugin': () => { const gypDef = '--cppdefs="NODE_GYP ' + escape(cppDefines.join(' ')) + '"'; @@ -74,7 +74,7 @@ const cleanHandlers = { & clean('serial-standalone'); }, 'voice-command': () => { - return remove('./voice-command/.bin'); + return remove('./utils/voiceCommand/.bin'); }, 'serial-plugin': () => { return remove('./build'); diff --git a/voice-command/LICENSE.md b/utils/voiceCommand/LICENSE.md similarity index 100% rename from voice-command/LICENSE.md rename to utils/voiceCommand/LICENSE.md diff --git a/voice-command/README.md b/utils/voiceCommand/README.md similarity index 100% rename from voice-command/README.md rename to utils/voiceCommand/README.md diff --git a/voice-command/build/build-release.js b/utils/voiceCommand/build/build-release.js similarity index 100% rename from voice-command/build/build-release.js rename to utils/voiceCommand/build/build-release.js diff --git a/voice-command/index.js b/utils/voiceCommand/index.js similarity index 100% rename from voice-command/index.js rename to utils/voiceCommand/index.js diff --git a/voice-command/package.json b/utils/voiceCommand/package.json similarity index 100% rename from voice-command/package.json rename to utils/voiceCommand/package.json diff --git a/voice-command/src/linux/voice-command/build.sh b/utils/voiceCommand/src/linux/voice-command/build.sh old mode 100755 new mode 100644 similarity index 100% rename from voice-command/src/linux/voice-command/build.sh rename to utils/voiceCommand/src/linux/voice-command/build.sh diff --git a/voice-command/src/linux/voice-command/voice-command.c b/utils/voiceCommand/src/linux/voice-command/voice-command.c similarity index 100% rename from voice-command/src/linux/voice-command/voice-command.c rename to utils/voiceCommand/src/linux/voice-command/voice-command.c diff --git a/voice-command/src/osx/voice-command/voice-command.xcodeproj/project.pbxproj b/utils/voiceCommand/src/osx/voice-command/voice-command.xcodeproj/project.pbxproj similarity index 100% rename from voice-command/src/osx/voice-command/voice-command.xcodeproj/project.pbxproj rename to utils/voiceCommand/src/osx/voice-command/voice-command.xcodeproj/project.pbxproj diff --git a/voice-command/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/utils/voiceCommand/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from voice-command/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to utils/voiceCommand/src/osx/voice-command/voice-command.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/voice-command/src/osx/voice-command/voice-command/CommandListener.h b/utils/voiceCommand/src/osx/voice-command/voice-command/CommandListener.h similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/CommandListener.h rename to utils/voiceCommand/src/osx/voice-command/voice-command/CommandListener.h diff --git a/voice-command/src/osx/voice-command/voice-command/CommandListener.m b/utils/voiceCommand/src/osx/voice-command/voice-command/CommandListener.m similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/CommandListener.m rename to utils/voiceCommand/src/osx/voice-command/voice-command/CommandListener.m diff --git a/voice-command/src/osx/voice-command/voice-command/CommandReporter.h b/utils/voiceCommand/src/osx/voice-command/voice-command/CommandReporter.h similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/CommandReporter.h rename to utils/voiceCommand/src/osx/voice-command/voice-command/CommandReporter.h diff --git a/voice-command/src/osx/voice-command/voice-command/Speech.h b/utils/voiceCommand/src/osx/voice-command/voice-command/Speech.h similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/Speech.h rename to utils/voiceCommand/src/osx/voice-command/voice-command/Speech.h diff --git a/voice-command/src/osx/voice-command/voice-command/StandardOutputInterop.h b/utils/voiceCommand/src/osx/voice-command/voice-command/StandardOutputInterop.h similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/StandardOutputInterop.h rename to utils/voiceCommand/src/osx/voice-command/voice-command/StandardOutputInterop.h diff --git a/voice-command/src/osx/voice-command/voice-command/StandardOutputReporter.h b/utils/voiceCommand/src/osx/voice-command/voice-command/StandardOutputReporter.h similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/StandardOutputReporter.h rename to utils/voiceCommand/src/osx/voice-command/voice-command/StandardOutputReporter.h diff --git a/voice-command/src/osx/voice-command/voice-command/StandardOutputReporter.m b/utils/voiceCommand/src/osx/voice-command/voice-command/StandardOutputReporter.m similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/StandardOutputReporter.m rename to utils/voiceCommand/src/osx/voice-command/voice-command/StandardOutputReporter.m diff --git a/voice-command/src/osx/voice-command/voice-command/main.m b/utils/voiceCommand/src/osx/voice-command/voice-command/main.m similarity index 100% rename from voice-command/src/osx/voice-command/voice-command/main.m rename to utils/voiceCommand/src/osx/voice-command/voice-command/main.m diff --git a/voice-command/src/win/voice-command/App.config b/utils/voiceCommand/src/win/voice-command/App.config similarity index 100% rename from voice-command/src/win/voice-command/App.config rename to utils/voiceCommand/src/win/voice-command/App.config diff --git a/voice-command/src/win/voice-command/CommandListener.cs b/utils/voiceCommand/src/win/voice-command/CommandListener.cs similarity index 100% rename from voice-command/src/win/voice-command/CommandListener.cs rename to utils/voiceCommand/src/win/voice-command/CommandListener.cs diff --git a/voice-command/src/win/voice-command/ICommandReporter.cs b/utils/voiceCommand/src/win/voice-command/ICommandReporter.cs similarity index 100% rename from voice-command/src/win/voice-command/ICommandReporter.cs rename to utils/voiceCommand/src/win/voice-command/ICommandReporter.cs diff --git a/voice-command/src/win/voice-command/Program.cs b/utils/voiceCommand/src/win/voice-command/Program.cs similarity index 100% rename from voice-command/src/win/voice-command/Program.cs rename to utils/voiceCommand/src/win/voice-command/Program.cs diff --git a/voice-command/src/win/voice-command/Properties/AssemblyInfo.cs b/utils/voiceCommand/src/win/voice-command/Properties/AssemblyInfo.cs similarity index 100% rename from voice-command/src/win/voice-command/Properties/AssemblyInfo.cs rename to utils/voiceCommand/src/win/voice-command/Properties/AssemblyInfo.cs diff --git a/voice-command/src/win/voice-command/StandardOutputReporter.cs b/utils/voiceCommand/src/win/voice-command/StandardOutputReporter.cs similarity index 100% rename from voice-command/src/win/voice-command/StandardOutputReporter.cs rename to utils/voiceCommand/src/win/voice-command/StandardOutputReporter.cs diff --git a/voice-command/src/win/voice-command/voice-command.csproj b/utils/voiceCommand/src/win/voice-command/voice-command.csproj similarity index 100% rename from voice-command/src/win/voice-command/voice-command.csproj rename to utils/voiceCommand/src/win/voice-command/voice-command.csproj diff --git a/voice-command/src/win/voice-command/voice-command.sln b/utils/voiceCommand/src/win/voice-command/voice-command.sln similarity index 100% rename from voice-command/src/win/voice-command/voice-command.sln rename to utils/voiceCommand/src/win/voice-command/voice-command.sln diff --git a/voice-command/test/run.js b/utils/voiceCommand/test/run.js similarity index 100% rename from voice-command/test/run.js rename to utils/voiceCommand/test/run.js From 83cdfa30f1e30e4aa6b7a878b6a6a365c4c83e5e Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 16:39:32 +0200 Subject: [PATCH 08/12] fixed paths in voice command build script (and the readme) also lol I won't touch this code --- readme.md | 2 +- utils/voiceCommand/build/build-release.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index ffa71414..2bbf21da 100644 --- a/readme.md +++ b/readme.md @@ -94,4 +94,4 @@ The `examples` dir contains multiple example programs, as we ll as programs for - `serial` - \[C++\] The serial plugin for the framework. Uses the shared protocol files (`./protocol/`) to implement the specification (`./documentation/protocol/`). - `svgConverter` - \[JavaScript\] Converts a `svg` file of a level into a `prototype.js` script. Use the [svgToJs command](#Available-Scripts). - `viDeb` - \[JavaScript\] Implements a emulated device. - - `voiceInteraction` - \[JavaScript\] Voice input plugin used by the framework. \ No newline at end of file + - `voiceCommand` - \[JavaScript\] Voice input plugin used by the framework. \ No newline at end of file diff --git a/utils/voiceCommand/build/build-release.js b/utils/voiceCommand/build/build-release.js index cad054ba..b74e698a 100644 --- a/utils/voiceCommand/build/build-release.js +++ b/utils/voiceCommand/build/build-release.js @@ -1,3 +1,4 @@ +/* eslint-disable */ var os = require('os'), fs = require('fs'), spawn = require('child_process').spawn; @@ -7,13 +8,13 @@ var platform = os.platform(); console.log(platform); if(platform === 'darwin') { var child = spawn('xcodebuild', { - cwd: './voice-command/src/osx/voice-command/' + cwd: './utils/voiceCommand/src/osx/voice-command/' }); } else if (platform == "win32") { var msbuild = 'C:/Windows/Microsoft.NET/Framework64/v4.0.30319/msbuild.exe'; var child = spawn(msbuild, ['/p:Configuration=Release', 'voice-command.csproj', '/p:Platform=AnyCPU'], { - cwd: './voice-command/src/win/voice-command/' + cwd: './utils/voiceCommand/src/win/voice-command/' }); child.stdout.on('data', function (data) { console.log('' + data); }); child.stderr.on('data', function (data) { console.log('' + data); }); From 37944f75505bf24caad903f347908230f31dc6a1 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 16:42:40 +0200 Subject: [PATCH 09/12] moved serial plugin stuff into correct dir --- .gitignore | 1 + binding.gyp | 35 ----------------------------------- lib/device.js | 2 +- utils/scripts/run.js | 4 ++-- utils/serial/binding.gyp | 35 +++++++++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 38 deletions(-) delete mode 100644 binding.gyp create mode 100644 utils/serial/binding.gyp diff --git a/.gitignore b/.gitignore index 21c379fd..20041405 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ utils/serial/* !utils/serial/include !utils/serial/src +!utils/serial/binding.gyp !utils/voiceCommand/build/build-release.js build/ node_modules/ diff --git a/binding.gyp b/binding.gyp deleted file mode 100644 index 7f28a7f1..00000000 --- a/binding.gyp +++ /dev/null @@ -1,35 +0,0 @@ -{ - "variables": { - "cppdefs": "NODE_GYP", - }, - "targets": [{ - "target_name": "serial", - "sources": [ - "./utils/serial/src/node/main.cpp", - "./utils/serial/src/node/setup.cpp", - "./utils/serial/src/node/poll.cpp", - "./utils/serial/src/node/send.cpp", - "./utils/serial/src/node/receiveHelpers.cpp", - "./utils/serial/src/node/sendHelpers.cpp", - "./utils/serial/src/serial/shared.cpp", - "./utils/serial/src/crashAnalyzer/buffer.cpp", - "./utils/serial/src/crashAnalyzer/analyze.cpp", - "./protocol/src/protocol/protocol.cpp" - ], - "conditions": [ - ["OS=='win'", { - "sources": ["./utils/serial/src/serial/win.cpp"] - }], - ["OS!='win'", { - "sources": ["./utils/serial/src/serial/unix.cpp"] - }], - ], - "include_dirs": [ - "./utils/serial/include", - "./protocol/include" - ], - "defines": [ - "<@(cppdefs)" - ] - }] -} diff --git a/lib/device.js b/lib/device.js index 17f20635..2e0340af 100644 --- a/lib/device.js +++ b/lib/device.js @@ -1,6 +1,6 @@ 'use strict'; -const serial = require('../build/Release/serial'); +const serial = require('../utils/serial/build/Release/serial'); const Vector = require('./vector'); const HapticObject = require('./hapticObject'); const HandleMovement = require('./handleMovement'); diff --git a/utils/scripts/run.js b/utils/scripts/run.js index 0bd51851..307da204 100644 --- a/utils/scripts/run.js +++ b/utils/scripts/run.js @@ -20,8 +20,8 @@ const buildHandlers = { }, 'serial-plugin': () => { const gypDef = '--cppdefs="NODE_GYP ' + escape(cppDefines.join(' ')) + '"'; - return exec('node-gyp', ['configure', gypDef]) - & exec('node-gyp', ['build']); + return exec('node-gyp', ['configure', '-C utils/serial', gypDef]) + & exec('node-gyp', ['build', '-C utils/serial']); }, 'serial-standalone': () => { return exec( diff --git a/utils/serial/binding.gyp b/utils/serial/binding.gyp new file mode 100644 index 00000000..62218a74 --- /dev/null +++ b/utils/serial/binding.gyp @@ -0,0 +1,35 @@ +{ + "variables": { + "cppdefs": "NODE_GYP", + }, + "targets": [{ + "target_name": "serial", + "sources": [ + "./src/node/main.cpp", + "./src/node/setup.cpp", + "./src/node/poll.cpp", + "./src/node/send.cpp", + "./src/node/receiveHelpers.cpp", + "./src/node/sendHelpers.cpp", + "./src/serial/shared.cpp", + "./src/crashAnalyzer/buffer.cpp", + "./src/crashAnalyzer/analyze.cpp", + "../../protocol/src/protocol/protocol.cpp" + ], + "conditions": [ + ["OS=='win'", { + "sources": ["./src/serial/win.cpp"] + }], + ["OS!='win'", { + "sources": ["./src/serial/unix.cpp"] + }], + ], + "include_dirs": [ + "./include", + "../../protocol/include" + ], + "defines": [ + "<@(cppdefs)" + ] + }] +} From b2bf4d156dfbfe22f8d9790dd580a4d1008002ac Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 16:47:19 +0200 Subject: [PATCH 10/12] moved protocol to utils dir --- firmware/platformio.ini | 2 +- {protocol => utils/protocol}/include/protocol/header.hpp | 0 {protocol => utils/protocol}/include/protocol/messageType.hpp | 0 {protocol => utils/protocol}/include/protocol/protocol.hpp | 0 {protocol => utils/protocol}/src/protocol/protocol.cpp | 0 utils/scripts/run.js | 4 ++-- utils/serial/binding.gyp | 4 ++-- 7 files changed, 5 insertions(+), 5 deletions(-) rename {protocol => utils/protocol}/include/protocol/header.hpp (100%) rename {protocol => utils/protocol}/include/protocol/messageType.hpp (100%) rename {protocol => utils/protocol}/include/protocol/protocol.hpp (100%) rename {protocol => utils/protocol}/src/protocol/protocol.cpp (100%) diff --git a/firmware/platformio.ini b/firmware/platformio.ini index cc469467..2eefd36e 100644 --- a/firmware/platformio.ini +++ b/firmware/platformio.ini @@ -2,7 +2,7 @@ description = Dualpanto firmware [protocol] -base_dir = ../protocol +base_dir = ../utils/protocol include_dir = ${protocol.base_dir}/include src_dir = ${protocol.base_dir}/src src_filter = +<../${protocol.src_dir}> diff --git a/protocol/include/protocol/header.hpp b/utils/protocol/include/protocol/header.hpp similarity index 100% rename from protocol/include/protocol/header.hpp rename to utils/protocol/include/protocol/header.hpp diff --git a/protocol/include/protocol/messageType.hpp b/utils/protocol/include/protocol/messageType.hpp similarity index 100% rename from protocol/include/protocol/messageType.hpp rename to utils/protocol/include/protocol/messageType.hpp diff --git a/protocol/include/protocol/protocol.hpp b/utils/protocol/include/protocol/protocol.hpp similarity index 100% rename from protocol/include/protocol/protocol.hpp rename to utils/protocol/include/protocol/protocol.hpp diff --git a/protocol/src/protocol/protocol.cpp b/utils/protocol/src/protocol/protocol.cpp similarity index 100% rename from protocol/src/protocol/protocol.cpp rename to utils/protocol/src/protocol/protocol.cpp diff --git a/utils/scripts/run.js b/utils/scripts/run.js index 307da204..11591ee1 100644 --- a/utils/scripts/run.js +++ b/utils/scripts/run.js @@ -35,9 +35,9 @@ const buildHandlers = { process.platform == 'win32' ? 'utils/serial/src/serial/win.cpp' : 'utils/serial/src/serial/unix.cpp', - 'protocol/src/protocol/protocol.cpp', + 'utils/protocol/src/protocol/protocol.cpp', '-Iutils/serial/include', - '-Iprotocol/include', + '-Iutils/protocol/include', '-o utils/serial/serial'])); }, 'firmware': () => { diff --git a/utils/serial/binding.gyp b/utils/serial/binding.gyp index 62218a74..1d00d648 100644 --- a/utils/serial/binding.gyp +++ b/utils/serial/binding.gyp @@ -14,7 +14,7 @@ "./src/serial/shared.cpp", "./src/crashAnalyzer/buffer.cpp", "./src/crashAnalyzer/analyze.cpp", - "../../protocol/src/protocol/protocol.cpp" + "../protocol/src/protocol/protocol.cpp" ], "conditions": [ ["OS=='win'", { @@ -26,7 +26,7 @@ ], "include_dirs": [ "./include", - "../../protocol/include" + "../protocol/include" ], "defines": [ "<@(cppdefs)" From f2a5d20aabf86eea2b34bab0fb4320d1003e7c6b Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 16:51:16 +0200 Subject: [PATCH 11/12] fixed readme --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index 2bbf21da..af711fd6 100644 --- a/readme.md +++ b/readme.md @@ -79,19 +79,19 @@ The `examples` dir contains multiple example programs, as we ll as programs for - `documentation` - \[Markdown\] Contains the documentation about interfaces and setup. - `classes` - Documentaion for the classes exported by the framework. Build this using `npm run docs`. - - `protocol` - Definition of the serial communication protocol. The shared source files implementing this can be found in `./protocol/`. The serial implementations are stored in `./firmware/utils/` (firmware side) and `./utils/serial/` (framework side). + - `protocol` - Definition of the serial communication protocol. The shared source files implementing this can be found in `./utils/protocol/`. The serial implementations are stored in `./firmware/utils/` (firmware side) and `./utils/serial/` (framework side). - `setup` - Instuctions on how to set up the framework for different operating systems. - `examples` - \[JavaScript\] Example scripts on how to use the framework. See [example section](#Examples). - `firmware` - \[C++\] The firmware for the ESP32 built into the device. Build using the [platformio command](#Available-Scripts). - `hardware` - \[JSON\] Config files for different hardware iterations. These are used with the [configure command](#Available-Scripts) to generate source files which are then compiled into the firmware. - `lib` - \[JavaScript\] The dualpantoframework library. Refer the [docs](documentation/classes/index.md) for more info about the files. -- `protocol` - \[C++\] Serial protocol base files, shared between firmware and framework. Based on the specification stored in `./documentation/protocol/`. - `utils` - Mixed helpers for building and debugging. - `backtrace` - \[sh\] Bash script vor decoding the ESP32's crash backtrace. Functionality is built into the framework's serial plugin now, but this script may be used without a platformio installation. - `geogebra` - Geometric representations of forward and inverse kinematics. Contains both complete websites for easy use, as well as the scripts used to create those websites. - `plotter` - \[JavaScript\] Visualization of the panto's available space and the resolution. Use the [plotter command](#Available-Scripts) to start a server, open the page (note: due to a bug in a dependency, go directly to `[...]/index.html`) and upload one of the hardware config files. + - `protocol` - \[C++\] Serial protocol base files, shared between firmware and framework. Based on the specification stored in `./documentation/protocol/`. - `scripts` - \[JavaScript\] The scripts behind the [commands](#Available-Scripts). Check out `./package.json` and `./utils/scripts/run.js` if you want to add functionality. - - `serial` - \[C++\] The serial plugin for the framework. Uses the shared protocol files (`./protocol/`) to implement the specification (`./documentation/protocol/`). + - `serial` - \[C++\] The serial plugin for the framework. Uses the shared protocol files (`./utils/protocol/`) to implement the specification (`./documentation/protocol/`). - `svgConverter` - \[JavaScript\] Converts a `svg` file of a level into a `prototype.js` script. Use the [svgToJs command](#Available-Scripts). - `viDeb` - \[JavaScript\] Implements a emulated device. - `voiceCommand` - \[JavaScript\] Voice input plugin used by the framework. \ No newline at end of file From 58b5f1aaf25b6efef7e931897cad624c3c52af43 Mon Sep 17 00:00:00 2001 From: Lukas Wagner Date: Mon, 23 Sep 2019 17:18:31 +0200 Subject: [PATCH 12/12] minor fixes --- .gitignore | 2 +- utils/scripts/run.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 20041405..6bb9e21b 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ persistent.json *.exe -src/osx/voiceCommand/build +src/osx/voice-command/build .bin/ diff --git a/utils/scripts/run.js b/utils/scripts/run.js index 11591ee1..4d054569 100644 --- a/utils/scripts/run.js +++ b/utils/scripts/run.js @@ -77,7 +77,7 @@ const cleanHandlers = { return remove('./utils/voiceCommand/.bin'); }, 'serial-plugin': () => { - return remove('./build'); + return remove('./utils/serial/build'); }, 'serial-standalone': () => { log('Clean serial-standalone not implemented yet', color.yellow);