gps now over spi

This commit is contained in:
2022-12-09 14:10:57 +01:00
parent 599f176622
commit f14992c040
26 changed files with 974 additions and 225 deletions
+3 -2
View File
@@ -18,8 +18,8 @@ Modi& operator++(Modi& m, int) {
DriveManager::DriveManager(MoveControl *moveControl, bool wifi) {
this->moveControl = moveControl;
SPIClass spiPort(HSPI);
spiPort.begin(UBLOX_GNSS_SPI_SCK, UBLOX_GNSS_SPI_CIPO, UBLOX_GNSS_SPI_COPI, UBLOX_GNSS_SPI_CS);
this->spiPort = new SPIClass(HSPI);
spiPort->begin(UBLOX_GNSS_SPI_SCK, UBLOX_GNSS_SPI_CIPO, UBLOX_GNSS_SPI_COPI, UBLOX_GNSS_SPI_CS);
this->navigation = new Navigation(spiPort, UBLOX_GNSS_SPI_CS);
if (wifi)
this->navigation->initNtrip(NTRIP_HOST, NTRIP_PORT, NTRIP_MOUNT_POINT, NTRIP_USER, NTRIP_PASSWORD);
@@ -29,6 +29,7 @@ DriveManager::DriveManager(MoveControl *moveControl, bool wifi) {
DriveManager::~DriveManager() {
delete this->navigation;
delete this->spiPort;
}
void DriveManager::loop() {