From 6c29da3909718d5b2ddaff18422b67447949e77c Mon Sep 17 00:00:00 2001 From: Luftalian Date: Mon, 18 Sep 2023 22:51:32 +0900 Subject: [PATCH] make new version --- src/main.cpp | 37 ------------------- {src => v1/src}/domain/data.h | 0 .../src}/infrastructure/icm20948_handler.h | 0 .../src}/infrastructure/lps25_handler.h | 0 {src => v1/src}/infrastructure/router.h | 0 .../src}/infrastructure/serial_handler.h | 0 .../src}/infrastructure/spicreatehandler.h | 0 .../src}/infrastructure/spiflash_handler.h | 0 .../controller/icm20948_controller.h | 0 .../interfaces/controller/lps25_controller.h | 0 .../interfaces/database/icm20948_handler.h | 0 .../interfaces/database/icm20948_repository.h | 0 .../src}/interfaces/database/lps25_handler.h | 0 .../interfaces/database/lps25_repository.h | 0 .../interfaces/database/spicreate_handler.h | 0 .../interfaces/database/spiflash_handler.h | 0 v1/src/main.cpp | 37 +++++++++++++++++++ {src => v1/src}/usecase/icm20948_interactor.h | 0 .../usecase/icm20948_repository_usecase.h | 0 {src => v1/src}/usecase/lps25_interactor.h | 0 .../src}/usecase/lps25_repository_usecase.h | 0 21 files changed, 37 insertions(+), 37 deletions(-) rename {src => v1/src}/domain/data.h (100%) rename {src => v1/src}/infrastructure/icm20948_handler.h (100%) rename {src => v1/src}/infrastructure/lps25_handler.h (100%) rename {src => v1/src}/infrastructure/router.h (100%) rename {src => v1/src}/infrastructure/serial_handler.h (100%) rename {src => v1/src}/infrastructure/spicreatehandler.h (100%) rename {src => v1/src}/infrastructure/spiflash_handler.h (100%) rename {src => v1/src}/interfaces/controller/icm20948_controller.h (100%) rename {src => v1/src}/interfaces/controller/lps25_controller.h (100%) rename {src => v1/src}/interfaces/database/icm20948_handler.h (100%) rename {src => v1/src}/interfaces/database/icm20948_repository.h (100%) rename {src => v1/src}/interfaces/database/lps25_handler.h (100%) rename {src => v1/src}/interfaces/database/lps25_repository.h (100%) rename {src => v1/src}/interfaces/database/spicreate_handler.h (100%) rename {src => v1/src}/interfaces/database/spiflash_handler.h (100%) create mode 100644 v1/src/main.cpp rename {src => v1/src}/usecase/icm20948_interactor.h (100%) rename {src => v1/src}/usecase/icm20948_repository_usecase.h (100%) rename {src => v1/src}/usecase/lps25_interactor.h (100%) rename {src => v1/src}/usecase/lps25_repository_usecase.h (100%) diff --git a/src/main.cpp b/src/main.cpp index 6778c62..e69de29 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,37 +0,0 @@ -#include - -#include - -#include "infrastructure/router.h" - -void loop() -{ - bool check = Router1.icm20948Controller->Add(address); - if (check) - { - Serial.println("Success"); - } - else - { - Serial.println("Failed"); - } - - delay(1000); - - // int16_t rx[6] = {}; - // uint8_t rx_buf[12] = {}; - // Data result = Router1.icm20948Controller->Get(rx, rx_buf); - // Serial.println(result.accel[0]); - // Serial.println(result.accel[1]); - // Serial.println(result.accel[2]); - - - // uint8_t rx2[3] = {}; - // Data result2 = Router1.lps25Controller->Get(rx2); - // Serial.println(result2.pressure[0]); - // Serial.println(result2.pressure[1]); - // Serial.println(result2.pressure[2]); - - Router1.icm20948Controller->Add(address); - delay(1000); -} diff --git a/src/domain/data.h b/v1/src/domain/data.h similarity index 100% rename from src/domain/data.h rename to v1/src/domain/data.h diff --git a/src/infrastructure/icm20948_handler.h b/v1/src/infrastructure/icm20948_handler.h similarity index 100% rename from src/infrastructure/icm20948_handler.h rename to v1/src/infrastructure/icm20948_handler.h diff --git a/src/infrastructure/lps25_handler.h b/v1/src/infrastructure/lps25_handler.h similarity index 100% rename from src/infrastructure/lps25_handler.h rename to v1/src/infrastructure/lps25_handler.h diff --git a/src/infrastructure/router.h b/v1/src/infrastructure/router.h similarity index 100% rename from src/infrastructure/router.h rename to v1/src/infrastructure/router.h diff --git a/src/infrastructure/serial_handler.h b/v1/src/infrastructure/serial_handler.h similarity index 100% rename from src/infrastructure/serial_handler.h rename to v1/src/infrastructure/serial_handler.h diff --git a/src/infrastructure/spicreatehandler.h b/v1/src/infrastructure/spicreatehandler.h similarity index 100% rename from src/infrastructure/spicreatehandler.h rename to v1/src/infrastructure/spicreatehandler.h diff --git a/src/infrastructure/spiflash_handler.h b/v1/src/infrastructure/spiflash_handler.h similarity index 100% rename from src/infrastructure/spiflash_handler.h rename to v1/src/infrastructure/spiflash_handler.h diff --git a/src/interfaces/controller/icm20948_controller.h b/v1/src/interfaces/controller/icm20948_controller.h similarity index 100% rename from src/interfaces/controller/icm20948_controller.h rename to v1/src/interfaces/controller/icm20948_controller.h diff --git a/src/interfaces/controller/lps25_controller.h b/v1/src/interfaces/controller/lps25_controller.h similarity index 100% rename from src/interfaces/controller/lps25_controller.h rename to v1/src/interfaces/controller/lps25_controller.h diff --git a/src/interfaces/database/icm20948_handler.h b/v1/src/interfaces/database/icm20948_handler.h similarity index 100% rename from src/interfaces/database/icm20948_handler.h rename to v1/src/interfaces/database/icm20948_handler.h diff --git a/src/interfaces/database/icm20948_repository.h b/v1/src/interfaces/database/icm20948_repository.h similarity index 100% rename from src/interfaces/database/icm20948_repository.h rename to v1/src/interfaces/database/icm20948_repository.h diff --git a/src/interfaces/database/lps25_handler.h b/v1/src/interfaces/database/lps25_handler.h similarity index 100% rename from src/interfaces/database/lps25_handler.h rename to v1/src/interfaces/database/lps25_handler.h diff --git a/src/interfaces/database/lps25_repository.h b/v1/src/interfaces/database/lps25_repository.h similarity index 100% rename from src/interfaces/database/lps25_repository.h rename to v1/src/interfaces/database/lps25_repository.h diff --git a/src/interfaces/database/spicreate_handler.h b/v1/src/interfaces/database/spicreate_handler.h similarity index 100% rename from src/interfaces/database/spicreate_handler.h rename to v1/src/interfaces/database/spicreate_handler.h diff --git a/src/interfaces/database/spiflash_handler.h b/v1/src/interfaces/database/spiflash_handler.h similarity index 100% rename from src/interfaces/database/spiflash_handler.h rename to v1/src/interfaces/database/spiflash_handler.h diff --git a/v1/src/main.cpp b/v1/src/main.cpp new file mode 100644 index 0000000..6778c62 --- /dev/null +++ b/v1/src/main.cpp @@ -0,0 +1,37 @@ +#include + +#include + +#include "infrastructure/router.h" + +void loop() +{ + bool check = Router1.icm20948Controller->Add(address); + if (check) + { + Serial.println("Success"); + } + else + { + Serial.println("Failed"); + } + + delay(1000); + + // int16_t rx[6] = {}; + // uint8_t rx_buf[12] = {}; + // Data result = Router1.icm20948Controller->Get(rx, rx_buf); + // Serial.println(result.accel[0]); + // Serial.println(result.accel[1]); + // Serial.println(result.accel[2]); + + + // uint8_t rx2[3] = {}; + // Data result2 = Router1.lps25Controller->Get(rx2); + // Serial.println(result2.pressure[0]); + // Serial.println(result2.pressure[1]); + // Serial.println(result2.pressure[2]); + + Router1.icm20948Controller->Add(address); + delay(1000); +} diff --git a/src/usecase/icm20948_interactor.h b/v1/src/usecase/icm20948_interactor.h similarity index 100% rename from src/usecase/icm20948_interactor.h rename to v1/src/usecase/icm20948_interactor.h diff --git a/src/usecase/icm20948_repository_usecase.h b/v1/src/usecase/icm20948_repository_usecase.h similarity index 100% rename from src/usecase/icm20948_repository_usecase.h rename to v1/src/usecase/icm20948_repository_usecase.h diff --git a/src/usecase/lps25_interactor.h b/v1/src/usecase/lps25_interactor.h similarity index 100% rename from src/usecase/lps25_interactor.h rename to v1/src/usecase/lps25_interactor.h diff --git a/src/usecase/lps25_repository_usecase.h b/v1/src/usecase/lps25_repository_usecase.h similarity index 100% rename from src/usecase/lps25_repository_usecase.h rename to v1/src/usecase/lps25_repository_usecase.h