Got the refactor building

This commit is contained in:
2024-08-22 23:00:55 -04:00
parent 3e4f0124db
commit 3a49761b66
10 changed files with 274 additions and 224 deletions

View File

@@ -8,55 +8,58 @@
#include <array>
#include "PINOUT.h"
#include "BoardDriverTypes.h"
#include "BoardTypes.h"
#include "Vector3D.h"
// define the physical dimensions of the board
static constexpr uint32_t BOARD_WIDTH{3};
static constexpr uint32_t BOARD_LENGTH{3};
static constexpr uint32_t BOARD_HEIGHT{3};
static constexpr V3D BOARD_DIMENSIONS{BOARD_WIDTH, BOARD_LENGTH, BOARD_HEIGHT};
// define the number of stacks
static constexpr uint32_t NUMBER_STACKS{BOARD_WIDTH * BOARD_LENGTH};
// define the CubeStacks
static BoardDriverTypes::CubeStack stack1{
static BOARD_TYPES::CubeStack stack1{
.adcPin=STACK1_ADC_PIN,
.ledPin=STACK1_LED_PIN
};
static BoardDriverTypes::CubeStack stack2{
static BOARD_TYPES::CubeStack stack2{
.adcPin=STACK2_ADC_PIN,
.ledPin=STACK2_LED_PIN
};
static BoardDriverTypes::CubeStack stack3{
static BOARD_TYPES::CubeStack stack3{
.adcPin=STACK3_ADC_PIN,
.ledPin=STACK3_LED_PIN
};
static BoardDriverTypes::CubeStack stack4{
static BOARD_TYPES::CubeStack stack4{
.adcPin=STACK4_ADC_PIN,
.ledPin=STACK4_LED_PIN
};
static BoardDriverTypes::CubeStack stack5{
static BOARD_TYPES::CubeStack stack5{
.adcPin=STACK5_ADC_PIN,
.ledPin=STACK5_LED_PIN
};
static BoardDriverTypes::CubeStack stack6{
static BOARD_TYPES::CubeStack stack6{
.adcPin=STACK6_ADC_PIN,
.ledPin=STACK6_LED_PIN
};
static BoardDriverTypes::CubeStack stack7{
static BOARD_TYPES::CubeStack stack7{
.adcPin=STACK7_ADC_PIN,
.ledPin=STACK7_LED_PIN
};
static BoardDriverTypes::CubeStack stack8{
static BOARD_TYPES::CubeStack stack8{
.adcPin=STACK8_ADC_PIN,
.ledPin=STACK8_LED_PIN
};
static BoardDriverTypes::CubeStack stack9{
static BOARD_TYPES::CubeStack stack9{
.adcPin=STACK9_ADC_PIN,
.ledPin=STACK9_LED_PIN
};
static std::array<BoardDriverTypes::CubeStack, NUMBER_STACKS> stacks{
static std::array<BOARD_TYPES::CubeStack, NUMBER_STACKS> stacks{
stack1, stack2, stack3,
stack4, stack5, stack6,
stack7, stack8, stack9