first try working module - fail

This commit is contained in:
2023-04-06 16:27:00 +02:00
parent f20f4938e4
commit ede68db3df
8 changed files with 85 additions and 30 deletions
+7 -2
View File
@@ -20,6 +20,7 @@
#include <iostream>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SPI.h>
#include "driveModi/driveManager.h"
#include "OutputBuf/outputBuf.h"
@@ -50,6 +51,7 @@ LcdWrapper* lcdWrapper;
OutputBuf* outputBuf;
DebugMqtt* debugMqtt = nullptr;
Battery* mainBattery;
SPIClass* spiPort;
ControlPad* controlPad;
bool wifiIsActive;
@@ -65,8 +67,11 @@ void setup() {
DebugTimes setupTime;
char wifiIndicator = 'X';
spiPort = new SPIClass(HSPI);
spiPort->begin(UBLOX_GNSS_SPI_SCK, UBLOX_GNSS_SPI_CIPO, UBLOX_GNSS_SPI_COPI, UBLOX_GNSS_SPI_CS);
mainBattery = new Battery(35, 692000, 218500);
controlPad = new ControlPad();
controlPad = new ControlPad(spiPort, RF24_CE_PIN, RF24_CSN_PIN);
controlPad->setMenuControl(main_m);
Wire.begin(21, 19);
@@ -97,7 +102,7 @@ void setup() {
std::cout << "Welcome to Kleiax-Rover" << std::endl;
std::cout << "All actions from the main program run on Core -> " << xPortGetCoreID() << std::endl;
driveManager = new DriveManager(&moveController, controlPad->getControlPadDataPtr(), wifiIsActive);
driveManager = new DriveManager(&moveController, spiPort, controlPad->getControlPadDataPtr(), wifiIsActive);
outputBuf->activateMqtt(false);