remove most of the defines

This commit is contained in:
2023-08-18 15:34:56 +02:00
parent 4cd2b9368d
commit a82b32087c
21 changed files with 155 additions and 285 deletions
+44 -24
View File
@@ -9,30 +9,50 @@
*
*/
/**
* @brief The MAC-Address saved in PS3-Controller
*
* The PS3-Controller only connects to the address which is saved in it.
*/
#define CONTROLLER_MAC "24:62:AB:F2:4B:3A"
#pragma once
/**
* @brief Prevents creation of the global object
*
* The PS3-Controller class creates a global object to use.
*/
#define NO_GLOBAL_INSTANCES
namespace PinNumbers {
constexpr uint8_t spiCopi = 16;
constexpr uint8_t spiCipo = 4;
constexpr uint8_t spiSck = 5;
constexpr uint8_t gnssSpiCs = 17;
/**
* @name SPI-Pins
* @brief Pins for SPI communication with the gnss module
*/
///@{
#define UBLOX_GNSS_SPI_CS 17
#define UBLOX_GNSS_SPI_COPI 16
#define UBLOX_GNSS_SPI_CIPO 4
#define UBLOX_GNSS_SPI_SCK 5
///@}
namespace LeftMotor {
constexpr uint8_t dir1 = 27;
constexpr uint8_t dir2 = 12;
constexpr uint8_t pwm = 13;
constexpr uint8_t encoder = 26;
constexpr uint8_t pmwChannel = 0;
}
#define RF24_CSN_PIN 18
#define RF24_CE_PIN 2
namespace RightMotor {
constexpr uint8_t dir1 = 14;
constexpr uint8_t dir2 = 23;
constexpr uint8_t pwm = 22;
constexpr uint8_t encoder = 33;
constexpr uint8_t pmwChannel = 0;
}
}
namespace Settings {
constexpr float wheelDiameter = 0.1263;
constexpr uint16_t encoderSteps = 360;
namespace Pid {
namespace Left {
constexpr uint8_t P = 75;
constexpr uint8_t I = 0;
constexpr uint8_t D = 0;
}
namespace Right {
constexpr uint8_t P = 75;
constexpr uint8_t I = 0;
constexpr uint8_t D = 0;
}
constexpr int8_t outMin = -100;
constexpr int8_t outMax = 100;
constexpr uint8_t sampleTime = 30;
}
}