remove most of the defines
This commit is contained in:
+44
-24
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "motorControl.h"
|
||||
#include "speedometer.h"
|
||||
#include "moveControlConfig.h"
|
||||
#include "config.h"
|
||||
#include "debugTimes.h"
|
||||
#include "component.h"
|
||||
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* @file moveControlConfig.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief This file inherits some configurations for moveControl.h
|
||||
* @version 0.1
|
||||
* @date 2021-12-14
|
||||
*
|
||||
* @copyright Copyright (c) 2021
|
||||
*
|
||||
*/
|
||||
//Pin config
|
||||
//Left Motor
|
||||
#define M_DIR_11 27
|
||||
#define M_DIR_12 12
|
||||
#define M_PWM_1 13
|
||||
#define M_ENCODE_LEFT 26
|
||||
//Right Motor
|
||||
#define M_DIR_21 14
|
||||
#define M_DIR_22 23
|
||||
#define M_PWM_2 22
|
||||
#define M_ENCODE_RIGHT 33
|
||||
|
||||
// PID config
|
||||
#define PID_OUT_MIN -100
|
||||
#define PID_OUT_MAX 100
|
||||
#define PID_SAMPLETIME 30
|
||||
// Left PID
|
||||
#define PID_LEFT_P 75
|
||||
#define PID_LEFT_I 0
|
||||
#define PID_LEFT_D 0
|
||||
// Right PID
|
||||
#define PID_RIGHT_P 75
|
||||
#define PID_RIGHT_I 0
|
||||
#define PID_RIGHT_D 0
|
||||
|
||||
// PWM
|
||||
#define PWM_CHANNEL_M1 0
|
||||
#define PWM_CHANNEL_M2 1
|
||||
|
||||
// SPEEDOMETER
|
||||
#define WHEEL_DIAMETER 0.1263
|
||||
#define ENC_STEPS 360
|
||||
+2
-48
@@ -56,24 +56,13 @@
|
||||
#ifdef NTRIP_RTK2GO
|
||||
#define NTRIP_HOST "rtk2go.com"
|
||||
#define NTRIP_PORT 2101
|
||||
#define NTRIP_MOUNT_POINT "GER-Papenburg"
|
||||
#define NTRIP_MOUNT_POINT "GER-Dortmund"
|
||||
#define NTRIP_USER "alklein1@gmx.de"
|
||||
#define NTRIP_PASSWORD "none"
|
||||
#endif // NTRIP_RTK2GO
|
||||
|
||||
|
||||
#define RHEDE
|
||||
|
||||
//Network config ESP32
|
||||
#ifdef ESP32BROKER
|
||||
#define WLAN_SSID "ESP32-Broker"
|
||||
#define WLAN_PASSWORD "doit2022"
|
||||
#define WLAN_IP "192.168.4.77"
|
||||
#define WLAN_SUBNETMASK "255.255.255.0"
|
||||
#define WLAN_GATEWAY "192.168.4.1"
|
||||
#define MQTT_SERVER "192.168.4.1"
|
||||
#define MQTT_PORT 1883
|
||||
#endif //ESP32BROKER
|
||||
#define HOTSPOT
|
||||
|
||||
//Network config Hotspot
|
||||
#ifdef HOTSPOT
|
||||
@@ -114,38 +103,3 @@
|
||||
#define MQTT_PORT 1883
|
||||
#endif //DORO
|
||||
|
||||
//Network config HW1
|
||||
#ifdef HW1
|
||||
#define WLAN_SSID "hw1_gast"
|
||||
#define WLAN_PASSWORD "KeineAhnung"
|
||||
#define WLAN_IP "192.168.0.67"
|
||||
#define WLAN_SUBNETMASK "255.255.255.0"
|
||||
#define WLAN_GATEWAY "192.168.0.1"
|
||||
#define MQTT
|
||||
#define MQTT_SERVER "172.22.64.216"
|
||||
#define MQTT_PORT 1883
|
||||
#endif //HW1
|
||||
|
||||
//Network config FRENZY
|
||||
#ifdef FRENZY
|
||||
#define WLAN_SSID "GNX7EDD84-2"
|
||||
#define WLAN_PASSWORD "2W2ZLPJ9NVQ3"
|
||||
#define WLAN_IP 0x0F01a8c0 //192.168.1.15
|
||||
#define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0
|
||||
#define MQTT
|
||||
#define WLAN_GATEWAY 0xfe01a8c0 //192.168.1.254
|
||||
#define MQTT_SERVER 0x0201a8c0 //192.168.1.2
|
||||
#define MQTT_PORT 1883
|
||||
#endif //FRENZY
|
||||
|
||||
//Network config TPMOBIL
|
||||
#ifdef TPMOBIL
|
||||
#define WLAN_SSID "TP-Mobil"
|
||||
#define WLAN_PASSWORD "Punica-699"
|
||||
#define WLAN_IP 0x0F01a8c0 //192.168.1.15
|
||||
#define WLAN_SUBNETMASK 0x00FFFFFF //255.255.255.0
|
||||
#define WLAN_GATEWAY 0x0101a8c0 //192.168.1.1
|
||||
#define MQTT
|
||||
#define MQTT_SERVER 0x0201a8c0 //192.168.1.2
|
||||
#define MQTT_PORT 1883
|
||||
#endif //TPMOBIL
|
||||
|
||||
Reference in New Issue
Block a user